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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export to Excel has different values for some fields

Status
Not open for further replies.

crystalkiwibruce

Programmer
Feb 16, 2011
104
NZ
Has anyone else had this problem? I'm using Crystal Reports 2011 with a SQL database for the main report. There is a small subreport extracting some numbers from an Excel Spreadsheet in the group header. A formula uses a shared variable to adjust a formula back in the main report (in a Group Header b section).

Report looks fine in display, but after my client exports the report to Excel a couple of the numbers are wrong. It often appears to be the record at the top of the page that's awry.

Export the report to Excel Data and it's okay there, as is any other export format. Just the Excel (looks pretty) format that has the incorrect (occassional) field values and wrong grand total in that export document.

Repeat Group Header On New Page is NOT used. Details are suppressed, and the Group Header 1a (with subreport) section underlays GH1b.

Really strange but causes my customer to doubt the numbers in the export file, so a lot of wasted time checking the figures.

Bruce Ferguson
 



hi,

Please tell us exactly 1) what number you expect to see and 2) what Excel displays.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
With CR 8.0, there was an issue with running totals that changed values when exported to Excel. Is the shared variable by any chance based on a running total?

-LB
 
The main report gets some records from a SQL table and summarises them in a Group Header b section. The group header a section has a subreport that looks for records in an xls spreadsheet and saves the total (if any found) in a shared variable.

a Formula in the main report takes the summary and subtracts the shared variable. It also accumulates into a Grand Total.

On export to Excel, it is almost as itignores the subreport, but only if the record is at the top of the page. Other record calculateions come through fine. The grand total is different for the export.

The problem does not occur for Excel Data export or any other formats.

Any suggestions? I'm tempted to see if the problem occurs in the Group Footer, as I can move all the header fields into that section. The detail section is suppressed

Bruce Ferguson
 
If you have suppressed the report try unsuppressing it to see if it wrapped. If the first value isn't be shared, then it might be because of the position of the sub in relation to the formula that references the shared variable.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top