Rendering PDF's & Images

Craig Dubin shared this question 2 years ago
Answered

Hi there,

We're currently working on an SSRS report that will pull data and launch images/pdf's from the report (these are attachments to the base data for things like Accident Reports with photos of an accident). We're wondering if it would be possible to do the following:

1. Create a pixel-perfect report in YF with the accident data (not from SSRS, instead of SSRS)

2. Create some sort of JS code to pull those attachments into the report

3. These files get rendered within the actual pixel-perfect replrt

If you can point me in the right direction, that'd be great.


Thanks!

Replies (7)

photo
0

Hi Craig,

Thanks for reaching out.

Just trying to understand the requirement here.

We have a SSRS report that has data + launches attachments and we are trying to build a YF report on this SSRS that should also fetch the data +attachments?

or

Are we trying to build a report in YF (not based on SSRS) that would fetch the attachments?


If we looking for report field to have image then you may refer to this article: https://wiki.yellowfinbi.com/display/yfcurrent/Column+Formatting#:~:text=Image Link Formatter

Could you please share more information/image that would help understand the requirement.

Thanks,

Deepak

photo
0

Hi Deepak,

Thanks for the reply. First, sorry, I shouldn't have introduced the notion of the SSRS report; I think it just confused matters. I'm trying to build a report natively in YF with the Dashboard canvas to get a paginated feel to the report. In addition, I want to be able to render images dynamically based on a file path. So the file path text is in the data itself. If you select a record for example, it'll also have n number of file paths associated with the record. I'd like to render those images and pdfs dynamically within the report itself if possible. If that is NOT possible, is there a way to display the file paths from the data as clickable hyperlinks to launch the images or pdfs?

photo
0

Hi Craig,


Sure, so we have field that has the image URLs? We can change the format of the column to Image Link Formatter or URL hyperlink (Please refer to the attached ImageRender.mp4 video)

But I think we won't be able to retrieve the same images if there are on local machine unless we have a server. For example: I have images on my machine, I can only access those if there are in the proximity of server. I have my YF running, so I have placed inside the ROOT folder to access it. Then the URL would be- http:localhost:8080/image1.jpg

Please let me know if that helps.

Thanks,

Deepak

photo
0

Thanks Deepak. That looks great. Though it's a bit more complicated than that on our part. The file location is embedded in the database and is also saved on an application server. The images and pdfs need to stay on that server so they can still be accessed by the application. But I think we might be able to set up file movement so that when the files go to the application server, they also go to YF Root. I'll talk to the programmer on the team to see what he thinks and get back to you in a couple days. One note, can the same be done with pdfs? Is there a pdf formatter similar to the image formatter?

photo
0

Hi Craig,

In my example, I don't have any other means to host the images hence I have used the ROOT of yellowfin but if we have those images hosted on a different server, we can just include the URL of those images(as in my other video attached earlier). Because adding another copy of image to ROOT would be redundant and would obviously take up more space specially if we have thousands of images and they increase periodically. I would recommend finding an alternative to host the images.

I believe, we have to rely on URL hyperlink in the column formatter for pdfs field to open in a new tab as YF doesn't have pdf/file formatter.

Please let me know how that goes.

Thanks,

Deepak

photo
0

That worked great! The application we're getting the attachments from has web services, so just converted the file path to the url as you noted and working wonderfully.


Feel free to convert to the community board for others if you'd like.

photo
0

Hi Craig,

That's perfect! Glad to hear that it worked.

It's a good idea to convert this into a community post. I will do that right away.

Thanks,

Deepak

Leave a Comment
 
Attach a file