Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, April 26, 2024 
 
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!
 External Development Forums - General External Development
Forum to discuss general external development topic (related or not to SalesLogix development). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General External Development | New ThreadView:  Search:  
 Author  Thread: Read a Crystal Report from the PLUGIN table using C#
Adam Conde
Posts: 14
 
Read a Crystal Report from the PLUGIN table using C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
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?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Read a Crystal Report from the PLUGIN table using C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Adam Conde
Posts: 14
 
Re: Read a Crystal Report from the PLUGIN table using C#Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 07 6:41 PM
Thanks.
Makes sense, but I'm not entirely sure how to handle this. I made the leap to C# last week (so far I love it) and this is the first difficult road block I've encountered.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 4/26/2024 7:00:08 PM