System.Runtime.Serialization.SerializationException was unhandled for crystal report
-
שבת 05 יוני 2010 16:30
Hi ,
Currently I am using built in component of crystal report(VS 2008) in my xbap application. While running the application I am getting following error
"Type 'CrystalDecisions.Shared.CrystalReportsException' in Assembly 'CrystalDecisions.Shared, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is not marked as serializable."
------------------- Code snippet ----------------------------
XAML code:
<WindowsFormsHost>
<crystal:CrystalReportViewer x:Name="MyCrystalReportViewer" Width="300" Height="300"/>
</WindowsFormsHost>
=======================
C# Code:
string strReportsPath = strReportsPath = "/WebReports/Test.rpt";
ReportDocument report = new ReportDocument();
report.Load(strReportsPath);
this.MyCrystalReportViewer.ReportSource = report;
---------------------------------------------------------
the code report.Load(strReportsPath) throws above said exception, please help me to solve this issue.
Thanks,
John
כל התגובות
-
יום רביעי 07 מרץ 2012 11:03
I received the error "Type 'CrystalDecisions.Shared.CrystalReportsException' in assembly 'CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' is not marked as serializable." + "Load Report Failed".
I check many forums but none of them help me.
Now i resolve the issue. I deleted all the reports and then ran the web application. Application ran. Then i Restored the reports one by one and found that only two reports are corrupted. When i open that reports after restore found an error C:\................rpt. This document could not be opened. So by deleting only that reports my application will run properly.
Now try this.
Any further question mail me on zubairhasan353@gmail.com
Zubair