cancel
Showing results for 
Search instead for 
Did you mean: 

Crash while exporting report

Former Member
0 Kudos

Hi

I am using below code snippet to export the report using new crytsal 13 RAS API. It works fine except for one case. If I apply background and foreground color code to column headers, export function crashes and kills the process too without raising any error or exception.


Dim destOptions As DiskFileDestinationOptions = CrystalDecisions.Shared.ExportOptions.CreateDiskFileDestinationOptions()

destOptions.DiskFileName = filePath

Dim exportOptions As New ExportOptions()

exportOptions.ExportDestinationType = ExportDestinationType.DiskFile

exportOptions.ExportDestinationOptions = destOptions

exportOptions.ExportFormatOptions = formatOptions

exportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.CrystalReport

' Export the report

report.Export(exportOptions)

      portOptions.ExportFormatType = format.Type

I am not sure what is wrong with above code after applying color code.

One more point, after applying color I can preview report using crystal report viewer but can't export it. Even if i try to export it from crystal report viewer after previewing the report, there also same crash is observed.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

A bit of missing info:

What version of CR? Please be precise.

What version of VS .NET?

Exporting to CR only, or other export types result in the same issue?

Does the export work from the CR designer?

Can you attach the report - with saved data?

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

CR version: CRforVS_redist_install_32bit_13_0_9

VS.Net: Visual Studio 2010

DotNet Framework: 4.0

It crashes for all export formats. I have attached the report with saved data also.

Here it doesn't allow to attach the rpt format files. So, I have changed the extension from rpt to txt and attached the file. Kindly change the extension back to rpt before using the attached file.

Thanks for looking into it.

Saurabh

former_member188030
Active Contributor
0 Kudos

Hi Saurabh,

Are you sure that the attached report reproduces the issue?

I tried exporting it and works fine. See attached PDF (rename it to .pdf).

If this is the right report, then you need to get to CR for VS 2010 SP10, which works for me.

http://scn.sap.com/docs/DOC-7824

- Bhushan

Senior Engineer

SAP Active Global Support

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Getting started and moving ahead with Crystal Reports .NET applications.

Former Member
0 Kudos

This is correct report that I have attached. If you will open this file in crystal designer, apply color code and export it, it will work fine but if you will apply color code using RAS API and try to export it using RAS API, it will crash.

former_member188030
Active Contributor
0 Kudos

Upgrade to SP10 and see if the issue gets reproduced.

Could you post the code you are using to apply the color code using RAS SDK?

Thanks,

Bhushan


0 Kudos

How are you applying color in code?

Which object are you applying it to?

Are you cloning the object, changing the color and then .Modify() to set it.

Preview the report and then use the viewers Export button to see if it works.

Don

Answers (0)