cancel
Showing results for 
Search instead for 
Did you mean: 

Export to separated MS Excel files per group

former_member533461
Participant
0 Kudos

Hi there,

We have a crystal report which contains only main report and it has Group1 and Group 2. The report currently has a page break each Group 1 but our end users requested to generate separated Excel file per Group1 instead of printing all the records in one single Excel file.

We are using Crystal Report 2011 and checked Export Report Option and Group Expert. However, we do not see the option for this change.. Could anyone provide us some advice? Thank you in advance!

Chrissa

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Chrissa

There is no way to do this. There may be a 3rd party application that will do this (hint: google ken hamady), or you can possibly write an app using one of the CR SDKs to do it. But CR does not have anything like is "out of the box".

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

  Follow me on Twitter

former_member533461
Participant
0 Kudos

Hi Ludek,

Thank you for your prompt response. We were hoping Crystal Reports would be able to handle this but we will check if there is another way outside of Crystal Report.

former_member533461
Participant
0 Kudos

Hi Ludek,

Is there any way to write a script inside Crystal Report? If so, could you please advise where we can write?

DellSC
Active Contributor
0 Kudos

What type of a "script" are you looking to write?  There is no way to interact with  software outside of Crystal through any sort of scripting language.

-Dell

former_member533461
Participant
0 Kudos

Hi Dell,

We found this thread and wonder if we could do similar using VB.Net. However, even if we can write similar scripts we are not sure where we could write..

How to Export Each page of report to seperate pdf files in Crystal Reports XI-VBForums

Dim rdoc As New ReportDocument
'------------------------------------
'Add your code to set rdoc object
'--------------------------------------
Dim exportOpts As ExportOptions = New ExportOptions()
Dim pdfRtfWordOpts As PdfRtfWordFormatOptions = ExportOptions.CreatePdfRtfWordFormatOptions()
Dim destinationOpts As DiskFileDestinationOptions = ExportOptions.CreateDiskFileDestinationOptions()
For li_count As Integer = 1 To pagecount
pdfRtfWordOpts.FirstPageNumber = li_count
pdfRtfWordOpts.LastPageNumber = li_count
pdfRtfWordOpts.UsePageRange = True
exportOpts.ExportFormatOptions = pdfRtfWordOpts
exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat

destinationOpts.DiskFileName = "D:\report File" & li_count & ".pdf"
exportOpts.ExportDestinationOptions = destinationOpts
exportOpts.ExportDestinationType = ExportDestinationType.DiskFile
rdoc.Export(exportOpts)

DellSC
Active Contributor
0 Kudos

You would have to do this in an external program that you would use to run the report.  So, basically, you have a choice whether to write the program yourself in .NET or Java or to purchase a third-party application that already does this.

-Dell

former_member533461
Participant
0 Kudos

Hi Dell,

Thank you. We are unlikely allowed to use the third party's application, so our option would be write codes in .Net or Java.

If you are able to provide us some references, we would appreciate it.

DellSC
Active Contributor
0 Kudos

You can get the .NET SDK here:  .  You'll install the most recent version (currently SP15)  of the "Install Executable" on the developer workstation to get integration into Visual Studio.  The other installs on the same line are the various forms of runtime installs required for deploying your application.

You can find sample code and further assistance with the SDK here:    The sample code links are on the left of the page if you scroll down.

-Dell

former_member533461
Participant
0 Kudos

Thank you so much for your help, Dell. I will learn from the link!

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

Ken Hamady's site is at www.kenhamady.com/bookmarks.html.

-Dell