on 01-18-2012 10:30 AM
Hello,
I've some data stored in a database, they are PDFs files data.
How can I include them in a report
For example
I've a Table
MyTABLE with 2 Cols (Name STRING, data byte[]) (in fact it's a .NET/DataSet)
I would like to display the content of my table in a CR
I can include a static PDF in my report, but not a variable one.
Can anyone Help Me ?
Thanks
Marc
Something I don't understand here. PDF vs. .NET Dataset.
If the data is in a .NET Dataset; (in fact it's a .NET/DataSet)
Then all you should need to do is;
crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
or
crReportDocument.SetDataSource(dataSet)
or
crReportDocument.SetDataSource(dataSet.Tables(0))
How the dataset is created or what is behind the dataset should not be of any consequence. To ensure you get the fresh data, either don't enable the "Saved Data" option, or use .Refresh in your code.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc,
What version of CR Designer are you using?
If you have CR 2008 or CR 2011 you can set the XML export type to include Binary data using the Export Option from the File Menu. Then the XML file will have the PDF saved in binary mode in the XML file.
See if that works for you. This feature is not available in the .NET Report Viewer however it will use the saved option when exporting. Not sure if it will use it at runtime though or how to set it.
See if the help for the SDK's has any info, you can get them from help.sap.com
Don
Hello Don,
I don't know where i can have the DR Designer version ? i think it's the Last one for VS2010 and .NET 4.0
I've found a solution to my problems :
My images are stored in PDF.
I load then in EXCEL Sheet via VSTO.
I Use the clipboard to have a picture copy of it :
oleObject.copy()
byte[] tabBytes = (MemoryStream)(Clipboard.getData("PNG")).ToArray();
I store this bytes in a .net dataset (column type System.byte[]);
and I can include it in a report as an image.
Thanks for your Help
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.