Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub-report columns disappear on export to Excel from CR8.5

Status
Not open for further replies.

hjohnson919

Programmer
May 25, 2005
9
US
I have several reports where I use a sub-report to generate a column of information. For example, I use a sub-report to print only the most recent entry in a table containing a record for everytime a certain data item (like diagnosis) is changed. I've noticed that when I export the report to Excel all of the columns generated by sub-reports disappear. I've tried every other format in the export menu and there is something wrong with all of them. The ones that export the sub-report, truncate other fields, for example the option that creates .txt files. I'm using Crystal Reports 8.5. Is there a work around? Will upgrading to 10 help?
 
First, make sure that you've applied the service pack, it's very important to exporting:


In general, try to avoid subreports, they're slow and problematic.

If you share technical information someone may be able to help you to redesign this and avoid subreports in the future:

Database/connectivity used
Example data (show tables.columns and what they hold)
Expected output

-k
 
I have succeded in working around the problem of printing subreport fields in Crystal 8.5 exports by setting up a group = ascending (below any other groups) for the field that has the:

"most recent entry in a table containing a record for
everytime a certain data item (like diagnosis) is changed."

Then the most recent value for the desired field will be available in its group footer.

So you then need to put all of your export detail lines in the group footer, instead of the report detail line, and print/export your fields from there.
 
Bruce Bussell, You describ the technique I'm using -"setting up a group = ascending (below any other groups) for the field". The problem is that even though I can see the column created in the sub-report on the screen and can print it out, when I export to Excel the column disappears. I believe what you are suggesting is that I use the technique in the main report instead of putting it in the sub-report. Is that correct?
 
Yes, You would add and link the table with the desired field (which was in the subreport) to the main report, and then insert the desired field for the missing subreport column as your lowest level group = ascending

Then you would print your main report export line from the new field's group footer, where that field's most recent value would be available.

And when this works Ok, you can delete the subreport.

 
Thanks. That worked in one report. I'll have to go through the others and see if I can do the same. I'm afraid that in at least one, it won't be possible because the sub-report is necessary to do some additional calculations so I'm still wondering if this problem goes away in CR 10. Thanks again, Bruce.
 
I worked with Crystal 10 on one site near Dallas, Texas, and the Crystal 10 Excel Export option was worse in general than the 8.5 version. All you got in 10 was an Excel Export option that looked like a Word Document, and was not really useable in Excel if you wanted to do Sorting and Grouping in Excel, and a Data Lines Only option which did not allow subtotal lines.

By using the type of "creative grouping", and conditionsl section suppression, and printing of lines, and doing specific calculations for different group footers, you may be able to get the old subreport calcs to work for speific groups in the main report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top