I posted this a week or so ago and no one responded. So I'm putting it up again. All I am trying to do is get the reportdocument object to serialize and store that in session. It should be pretty simple. But when I call out to the RAS DLL to serialize it, it returns null. Even for a report with just a single label on it.
I'm trying to understand how the RAS provided classes can be used to serialize a reportdocument into a string. I have seen many examples from the help and other threads, from my own threads, etc. But for whatever reason I cannot get even the most basic report to serialize to a string. So I must be missing a required step or I have the wrong version of Crystal. I downloaded the latest I could find, which was version 13 release 2. I have just the free basic Crystal developer edition for VS.Net 2010.
1.) What I did was create a report class and put a single label on the report. Then I run the report. It works fine.
2.) Then I coded a simple web page to display the report using the CrystalReportsViewer. That works fine.
3.) Then I tried to setup a test to serialize the report as a string using the RAS Utilities Conversion DLL. That doesn't work.
In this example, I am just trying to get the string to be equal to something. Currently it is always set to nothing/null when this runs.
Here's the code I am testing. Am I missing something?
Dim myReport As New CrystalReport1 u2018Empty report with just a label in the header. myReport.VerifyDatabase() '***Serialize Dim boReportClientDocument As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument boReportClientDocument = myReport.ReportClientDocument Dim myConversion As CrystalDecisions.ReportAppServer.Utilities.Conversion = New CrystalDecisions.ReportAppServer.Utilities.Conversion Dim mySerializedRcd As String = myConversion.ToString(boReportClientDocument) CrystalReportViewer1.ReportSource = boReportClientDocument.ReportSource
Any guidance or suggestions would be much appreciated. I have gone through the SDK help and setup things as they show. But it just doesn't work for me. I must be missing something. The samples look pretty simple.
Any thoughts?
Best regards,
Jon