Skip to Content
0

Crystal Reports - Serialization

Apr 11 at 04:49 PM

68

avatar image
Former Member

Hello,

I'm using CrystalDecisions 13.0.1 dll's. (unable to upgrade due to licensing issues)

I am using asp.net 4.7.

I would like to disable the use of sessions in my system. Therefor I can't save the "ReportDocument" object in a session so I could read it on postbacks (when using paging etc...).

So I would like to serialize the object so I could store it in my cache server (couchbase)

I saw this example:

ISCDReportClientDocument ReportClientDocument = doc.ReportClientDocument;

CrystalDecisions.ReportAppServer.Utilities.Conversion converter = new CrystalDecisions.ReportAppServer.Utilities.Conversion();

serializedCrystalReportDocument = converter.ToString(ReportClientDocument);

But "Utilities" namespace does not exist in my version of CrystalDecisions.ReportAppServer dll.

Do I have another way to serialize/deserialize this object?

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Daniel Paulsen
Apr 12 at 02:39 PM
1

To Deserialize , there is a method where you pass in the serialize string.

ReportClientDocument rcd = converter.ToReportClientDocument(serializedCrystalReportDocument)

This will only work in a client-server scenario where you are using a RAS server. In your case, you are not using a RAS server to process reports and your reports are running in-process. The ReportDocument and ISCDReportClientDocument objects are not serializable, which explains why your result is null.

The serialized string is not the document, but rather a string containing enough information to connect back to a RAS server where the document state is stored, so this will only work in the case where a report is processed on the backend RAS server. You need a BusinessObjects Enterprise system or Crystal Reports Server Edition for this.

Dan

Share
10 |10000 characters needed characters left characters exceeded
Daniel Paulsen
Apr 11 at 06:34 PM
1

Hi Alon,

the Utilities namespace can be found in the CrystalDecisions.ReportAppServer.DataSetConversion assembly,

Dan

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Apr 12 at 01:21 PM
0

Thanks Daniel Paulsen

I found the namespace and now i'm having trouble using it.

        ReportDocument doc = new ReportDocument();

        ..... loading the document with parameters ....

        ISCDReportClientDocument ReportClientDocument = doc.ReportClientDocument;
        CrystalDecisions.ReportAppServer.Utilities.Conversion converter = new CrystalDecisions.ReportAppServer.Utilities.Conversion();
        string serializedCrystalReportDocument = converter.ToString(ReportClientDocument);

serializedCrystalReportDocument is null.

Also, how do I deserialize and load it?

Share
10 |10000 characters needed characters left characters exceeded
Don Williams
Apr 12 at 02:55 PM
0

Hi Alon,

Also, you are using SP 1 of CR for VS, is it because you published your application to a third party WEB hosting site and that is what version they are using?

If so you really need to either get them to update to a more recent version, we are currently on SP 22, or find a site that is will to update.

Lots of security updates in more recent builds, at least get to SP 20, it's still using the old VC 2005 C++ runtime but will support most framework versions.

See the platform PDF:

SAP Crystal Reports, Developer Version for Microsoft Visual Studio – Supported Platforms

Don

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Don Williams,

Yes, we purchased several SP1 licenses in the past and we install CR on multiple client web servers.

The decision not to upgrade was made a few years ago by my company due to high costs. (personally, I've never heard of someone requiring to pay in order to install security updates and bug fixes in other products, unless its an upgrade to a new major version..)

0

Hi Alon,

CR for VS is a FREE product, no idea why whomever you got it from charged you or told you there was a charge to upgrade... I've never heard of that before either.

License PDF is here: Crystal Reports for Visual Studio Licensing

Only charge is each user to purchase a copy of CR Designer once, but depends on how you distribute it, it does not mean you have to upgrade CRD when updating the runtime. But check the License Doc to be clear on what charges you need to apply.

It will take a little to upgrade to SP 21 due to platform updates, but should be relatively easy to do.

And then you'll be up to date.

Don

0
Former Member
Don Williams

Hi Don Williams

Just so we're clear, we bought a CR Designer license but your Israeli representative also charged us for installing the runtime on our clients servers.

Upgrading our CR for VS (SDK) may be free but that would also require updating the runtime I assume for each of our clients to the same version and for that he wants to charge us again.

And for updating the CR Designer he also wants to charge us again.

Is that not how it works?

The license you've attached also says that you have to pay to upgrade. (Although it's not clear if you have to pay for CR Designer upgrades or for CR Runtime distribution upgrades or both.)

0