on 2024 Jul 09 10:49 AM
Hi I am quite new in Crystal Report, I have been assigned with a task where I have to add a pdf file at the end of the crystal report.
I tried searching on the internet and found some solution which were this and many more.
I like the way it was handled in this links(post). But I can only attach a static pdf file, If I try to do it dynamically it never changes.
Here is the example.
I have a report as demo and 2 pdf files
In the report I have added PDF1 as OLE pdf file and then using graphic location I am trying to set the location of another pdf that is PDF2.
But If I try to run/refresh the report I am still getting the same file that was attached before(PDF1).
My goal is I have a db field PdfPath which holds the pdf path location like "C:\apps\pdf1.pdf" now I want to show the pdf according to this path.
I am using Crystal Report 2016.
Thank you in advance.
Request clarification before answering.
In that case, afaik, the only solution is to use a UFL (User Function Library).
The report would have RFa, RFb, RFc, etc. for showing PDF Page 1, 2, 3, etc.
Each of these RF sections would be dynamically suppressed based on the number of pages in the PDF.
If the report doesn't know the number of pages, a UFL get provide a function to get that number.
A dummy picture in each of the RF sections would use the Graphic Location expression of the picture object to replace itself with the corresponding PDF page (or do nothing if the corresponding page number is higher than the actual number of pages).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here's a video demo of how this is done using my CUT Light UFL.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.