One Crystal report, two Excel sheets

Hi All,

I am trying to create a Crystal report in SAP Crystal reports 2016 that contains two different views, view_cars and view_owners. I would like to have the result from these reports into Excel into two different sheets, one sheet containing the cars and one sheet containing owners. Do you guys know if that is possible?

KR, Carina :wave:


Carina (BOB member since 2007-04-15)

Unfortunately Crystal Reports will not allow you to do this. I have heard of third party products that will allow it. But I have never used them.


kevlray :us: (BOB member since 2010-06-23)

Thanks a lot! :wave:


Carina (BOB member since 2007-04-15)

kevlray said it right. CR will not allow this. I did a POC on this long time back just for fun. And yes there are many limitations though. Here is what I tried.

  1. Create the table with first view in Report 1 (R1–consider this as main report)
  2. Create a shared variable with count of any field from R1
  3. Create an excel sheet (.xls not .xlsx) in your local machine and fill the numbers from 1 to 65536 (In excel home tab, click on Fill->columns–>series–>1 to 65536)
  4. Create a subreport with the excel sheet you created above and place after your first table (consider this as R2). Bring the field into details. call the shared variable you created in step 1 from R1. write a suppression logic on details section like this “if {Sheet1_.A1} <=count(XXX) then true else false”

Our target is to print dummy values upto the excel sheet limit by subtracting the count we got in the first report R1.

The subtraction may not exactly go well directly, you may need to increase/decrease the numbers you are subtracting little bit, we may need to export the report lot of times to get there.

after that change the font color of the numbers from excel to white.

  1. Once you are able to print the dummy values to the limit, then place your second report after the subreport (R2).

Limitations:

  1. we cant use Excel data only option, as this output will display dummy values irrespective of formatting
  2. Report size will increase due to thousands of dummy values.

There may be other limitations too which i didn’t observed.


anil.ganga1 :us: (BOB member since 2007-07-04)

Thanks Anil for the valuable tips! :wave:


Carina (BOB member since 2007-04-15)