8/26/2025 11:32:38 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss general external development topic (related or not to SalesLogix development). View the code of conduct for posting guidelines.
|
|
|
|
Read a Crystal Report from the PLUGIN table using C#
Posted: 23 Aug 07 5:19 PM
|
I am trying to retrieve Crystal Reports from the DATA field in the PLUGIN table using C#. I'm using the oledb version of the function described on this Microsoft KB article: http://support.microsoft.com/kb/317043
I am not going through the SLX provider for this particular function because it won't parse the SQL that this function uses.
It does work at pulling out the data and building the .rpt file. However, the resulting file is corrupt. Comparing the generated file to the real file in windiff shows that the generated file was formed with the correct data, just built in the wrong order.
Any ideas? |
|
|
|
Re: Read a Crystal Report from the PLUGIN table using C#
Posted: 23 Aug 07 6:30 PM
|
It's not that the report is corrupt, but what you are reading out of the BLOB on the plugin table isn't just a report, it's a serialized Delphi TComponent that has the actual Crystal report appended to the end of it. A serialized component wil end in two consecutive null chars (0x00 0x00) and will not contain two consecutive null chars internally. So, what you need to do is read the BLOB contents out, then look for the two consecutive null chars. Everything following that is the report that you can write out to write out to the RPT file.
Does that make sense? I've got my own C# code that does just this and it works great.
-Ryan
|
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|