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!

Rogue Zero Displaying on Excel Export

Status
Not open for further replies.

nlaliberte

Programmer
Apr 26, 2007
79
US
I'm using Crystal XI and an ODBC connection to a SQL server.

This issue is that an excel export is displaying zeros in cells that are supposed to be NULL. These are summary fields in a total line that are conditionally set to suppress.

These fields are dynamically set in the stored proc that returns the dataset. The zero only appears in the totals when the user has chosen to display the 'State' column in the export, and the zeros only display under the 'State' column.

Also, the totals fields are simply SUMs of the column. So for example, the user choses to display the 'State' column and it happens to fall into 'field_5'. The total row is a SUM(field_5). Also, this is set to suppress because it is the State field and not a value which would be summed. The suppression logic is working correctly.

It appears that the zeros are only populating after the export to excel and that this might have nothing to do with the crystal report...

Does anyone have any ideas?

 
If no one can tell you how to stop it happening, you could change the field to show either spaces or the number as alpha, set by ToText.

I've had trouble with exports that restored suppressed data, though not with Excel, where I'd have expected it to work.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top