on 06-14-2011 6:05 PM
Environment:
Windows 2008 R2 Standard - 64bit
SAP Crystal Reports - 13.0.1.220 (SP1)
Problem Description:
The process that performs report generation (export to pdf\xls) crashes.
Analysis of the crash dump points to crdb_adoplus as the cause of the issue. Although the problem recurs fairly frequently it can not be simply reproduced. If the issue is being caused by a particular report, it succeeds on retry (after the crash for example).
Crash dump analysis log here : http://pastie.textmate.org/pastes/2067625/text
Just looking for any tips on how to resolve the issue.
I have tried each of your suggestions separately and together. The crashes are still occurring fairly regularly.
Any more ideas ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jk,
Is your service running in 32 or 64 mode? I do have a new bug Adapt for when the app goes above the 32 bit memory space it does cause a crash in crdb_adoplus.dll - ADAPT01556326
If you have not can you add that legacy mode to your app.config file and verify if that resolves the issue or not also?
I assume you are using a Dataset Correct?
Is it always the same report or any report?
How much data is being pushed to the report?
If it's one report can you update the report to hit the database directly rather than using a DS?
Thanks
Don
The service is now running in x64 with useLegacyV2RuntimeActivationPolicy="true". There are many, many reports. I think they all use the SetDataSource method. As I mentioned previously we've not been able to nail it down to a particular report because it does not appear to crash while generating the report but at some later point. Also, whatever happens it always succeeds on retry.
Can you try using the RAS PrintOutputController to see if that still has the same problem:
// Declare a PrintOutputController to allow documents to be exported to PDF
PrintOutputController rasPrintOutputController;
CrReportExportFormatEnum rasReportExportFormat;
CrystalDecisions.Shared.DiskFileDestinationOptions diskOpts = CrystalDecisions.Shared.ExportOptions.CreateDiskFileDestinationOptions();
diskOpts.DiskFileName = "c:\\reports\\reports1.pdf";
// Set the CrReportExportFormatEnum to export the report as a PDF file.
rasReportExportFormat = CrReportExportFormatEnum.crReportExportFormatPDF;
rasPrintOutputController = rcd.PrintOutputController;
// Use the Export() method of the PrintOutputController to export the report to a ByteArray.
ByteArray tempByteArray = rasPrintOutputController.Export(rasReportExportFormat, 0);
Byte[] byteStreamOutput = tempByteArray.ByteArray;
System.IO.Stream oStream;
byte[] byteArray = null;
oStream = rpt.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
byteArray = new byte[oStream.Length];
oStream.Read(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
// this is used to verify the file so I saved it to disk
System.IO.File.Create(diskOpts.DiskFileName, Convert.ToInt32(oStream.Length - 1)).Close();
System.IO.File.OpenWrite(diskOpts.DiskFileName).Write(byteArray, 0, Convert.ToInt32(oStream.Length - 1));
System.IO.File.SetAttributes(diskOpts.DiskFileName, System.IO.FileAttributes.Directory);
oStream.Close();
and of course add code for Excel...
Thanks Again
Don
The sample you provided is thoroughly confusing.
In this line rasPrintOutputController = rcd.PrintOutputController; the variable rcd appears out of nowhere.
Furthermore it is completely unclear why he following lines are needed. They don't appear to be referencing the report instance "rpt", and the output "byteStreamOutput" they produce isn't referenced in code that follows.
// Set the CrReportExportFormatEnum to export the report as a PDF file.
rasReportExportFormat = CrReportExportFormatEnum.crReportExportFormatPDF;
rasPrintOutputController = rcd.PrintOutputController;
// Use the Export() method of the PrintOutputController to export the report to a ByteArray.
ByteArray tempByteArray = rasPrintOutputController.Export(rasReportExportFormat, 0);
Byte[] byteStreamOutput = tempByteArray.ByteArray;
Edited by: jk_orb on Jul 21, 2011 1:33 AM
Sorry about that. I use a File Open Common Dialog box and set the report object to both the Engine and RAS:
rptClientDoc = new CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument();
...
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
btnOpenReport.Enabled = false;
btnSaveRptAs.Enabled = false;
btnCloserpt.Enabled = false;
object rptName = openFileDialog.FileName;
try
{
rpt.Load(rptName.ToString(), OpenReportMethod.OpenReportByTempCopy);
rptClientDoc = rpt.ReportClientDocument;
btnOpenReport.Enabled = false;
btnSaveRptAs.Enabled = false;
ViewReport.Enabled = true;
btnReportName.Text = rptName.ToString();
}
catch (Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
btnOpenReport.Enabled = true;
btnSaveRptAs.Enabled = true;
ViewReport.Enabled = false;
return;
}
rptClientDoc = rpt.ReportClientDocument;
...
Don
Define "crash". What actually happens? Error? Symptom?
See KB [1525432|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533323335333433333332%7D.do]
Is this happening on your development computer or after you deploy?
Web or Win app?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since its a service I guess you could call it a Win app.
The service that calls the code to export the report to disk (xls\pdf) crashes (i.e. the process terminates) resulting in a crashdump. We use the ReportDocument.ExportToDisk(ExportFormatType formatType, string fileName) method. The crash does not seem happen while generating a report but at some later point. We do not use an embedded report viewer or anything like that
It occurs on our production server.
I don't think the KB applies to us. We don't get the error from the KB and we are using .NET 3.5 for our run-time.
I've provided a link (above) to a log of the analysis of the crashdump I've performed using Windbg. Do you want me to paste some relevant parts here ?
Edited by: jk_orb on Jun 14, 2011 9:13 PM
It is crashing in adoplus. did you add:
<startup useLegacyV2RuntimeActivationPolicy="true">
</startup>
to your app.config file?
And are you closing and disposing of the report objects once they are finished?
And did you compile your app to run in x86 or x64 bit mode only? You cannot use AnyCPU.
Don
Edited by: Don Williams on Jun 14, 2011 1:01 PM
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.