on 2025 Mar 30 11:48 PM
Hello SAP community,
I am using CR 2016 to create a contract and am trying to embed a single paged PDF which changes from contract to contract. The report’s data source, SQL View in the case, correctly passes the path to the target PDF to the report: F:\Hunting Contracts\HuntMaps\<filename>.pdf
My issue is a very similar issue to this post which seemed to indicate this is functionality should be possible with CR 2016 but the user did not find resolution.
I have created the OLE Object two ways:
A:
as well as
B:
In both situations I define the default file which should only load when the dynamic path does not have a PDF to be a “No Map” file: F:\Hunting Contracts\HuntMaps\NoMap.pdf
I set Picture tab to path provided by report’s view:
When the report is previewed with data the “No Map” PDF is embedded into the report and not the target PDF. It is at this point that I need the target singled page PDF embedded into the report instead of the default "No Map":
I have not defined the Hyperlink tab. A single click on the embedded "No Map" does nothing. A double click and I’m either presented with browser to open a PDF which then opens in Adobe Reader (default app for .PDF files) or the default “No map” PDF is opened in external Adobe window; to clarify the target PDF is not used in this scenario
If I defined a hyperlink to the target file a single click on the embedded "No Map" PDF will open the target file in a separate Adobe Reader window. I mentioned this not because a hyperlink will work, it will not, but to indicated that the target path supplies a valid file.
Any help or suggestions are more than appreciated.
Thanks,
Russ
Request clarification before answering.
Hi Russ,
That is normal, Crystal Reports will only embed the PDF once and load it on Open. Same with Images.
To get this to work dynamically what you need to do is use a database field with the path the PDF file.
Then place the DB field in it's place.
And hit the F1 key to bring CR's help file and search for this:
To make a static dynamic
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What load it on open means is when CR SDK opens a report it loads the image saved int he RPT file and stops processing it... Refreshing will not reload the image or PDF if it's a static object at this point.
By linking the PDF using a database field CR Viewer will load the object on refresh, no matter what it's linked to when originally designed. If it doesn't have access to the DB then the default object is shown, the one when you designed the report.
So to clarify, when you design/create the report and embed the PDF CR converts the PDF into a BMP image file, that is why when you refresh it doesn't reload the file.
By using a formula field with the database field dropped into the formula that points to the OLE Object dynamically when viewing the report CR will query the DB for the location of the PDF file and display the new PDF file. If it's not found or doesn't have access to the folder CR will display the original PDF.
CR uses security on your PC, so make sure the folder where the PDF's are stored has read/write permissions for the App, otherwise the default image is shown.
Hope that clarifies things...
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.