on 07-28-2012 12:21 AM
I need a Crystal Reports subreport of mine to show a (.PDF File, MS Word File, or a MS Excel File) as a static OLE object within my Crystal Report.
I am using a LIMS database that will be sending this subreport a different file each and every time the report is executed / run.
I tried using the Graphic Location formula pointer to have the placeholder image replaced by what ever file is sent each time the report is executed.
I also tried using the Hyperlink formula box with the File option selected to have the placeholder image replaced by what ever file is sent each time the report is executed.
My LIMS database stores all the files in a directory on a server within my company and all my end users have access to this directory. It is a shared directory.
All users have reading privileges to the network directory as well.
Any help would be great!
Thank You.
Hi Stephen,
Well, I see that this is getting more and more popular!
If your .pdf was actually an image (.jpg,.bmp etc), the Graphic Location formula could have been put to use.
Unfortunately, this does not work for .pdf or for that matter .doc, .rtf or .xls files the way it does for images.
So, the only workaround is to insert the .pdf files in separate sections and conditionally supress them.
Please have a look at this thread where I posted a workaround as to how this needs to be done using sections. That's the only way this can be done for now.
Otherwise, you can log this as an idea at https://ideas.sap.com and have our developers have a look at it.
I'm sure there'll be many who want this feature badly. Please do post the Enhancement.
- Abhilash
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhilash,
If I had my end users convert all their files to (.jpg images) prior to uploading them into our LIMS database, what would the crystal syntax be for a formula to replace my placeholder image that is configured in my existing crystal report - under the "Format Graphic Editor/Picture Tab" (Graphic Location / X-2 / Formula Editor Graphic Location)?
The way our LIMS database currently is configured to handle these specific graphical image file uploads is that, our LIMS database saves the files on its server.
The folder that the LIMS database copies these files to is a shared folder that all my end users have access to.
The crystal report subreport will have an OLE static object that is a "default image placeholder".
This image is to be replaced by what the LIMS database field (doc_file.df_filename) has each and every time the report is run.
So this means that every time the report is run from numerous unique Sample IDs, a different image will be displayed in the report for that particular testing.
So I am using the "Format Graphic Editor/Picture Tab" (Graphic Location / X-2 / Formula Editor Graphic Location) to write my formula. I need help with the sytax of this formula.
Thanks
Stephen
818-576-3117
Hi Stephen,
So, the database hold the path to the .jpg files or the image itself?
If it's the path then you can do something like this:
For eg: Consider this dataset:
Id Name Image
1 Abhilash C:\Images\1.jpg
2 Stephen C:\Images\2.jpg
Then, you create a formula like this:
"C:\Images\"&{Id}&".jpg"
So, if you observe, the image names are similar to the IDs. This is what helps us to map them to the ID dynamically.
How are the images named in your folder and do you have a column with a similar name in the database?
- Abhilash
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Hello Abhilash,
The LIMS database does hold the path to the .jpg files.
The LIMS database field itself simply contains a link to the file that is located on our local LIMS server.
The image files will all have different names since they are coming from various sources.
We do not have a column with a similar name in the LIMS database.
Our LIMS database copies all the uploaded image files to this location on its server:
server name\D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc
I did variations of this formula with no success:
"D:\BlazeLIMS Data\Attachments\BlazeLIMS\TestDoc\" + ({doc_file.df_filename}) + "Image.jpg"
Hey Stephen,
Just to let everyone know, this was resolved by modifying the formula to use a 'UNC' path to the shared drive.
The database table held the Image name, for e.g: (Apple.jpg).
Once we modified the 'Graphic Location' formula to point to the UNC path alongwith the fieldname, the image came up fine.
I would appreciate if you could mark this thread as Answered...
- Abhilash
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Sorry Stephen - not sure, but the SCN support team should be able to help:
http://scn.sap.com/community/support
- Ludek
This thread was created in SCN Support, which is the support space for SAP Community Network and not SAP products. Please always select an appropriate space where topic experts will see and reply to it: SCN Site Index
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.