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!

output to Excel fails on Info Desktop when no records found 1

Status
Not open for further replies.

synapsevampire

Programmer
Mar 23, 2002
20,180
US
I think that you're experiencing the nature of the beast in SI, though it's been a while for me...

You can create a Main report which always pulls one row, and just not display anything but a report header (yep, you'll have some performance degradation), then place your report in as a subreport.

-k kai@informeddatadecisions.com
 
there are not that many records it could possibly pull on one day anyways - maybe 1500? Isn't there another way around this?
 
You can set up a suppressed formula in your report header as
Code:
Count({X})
X being a mandatory field in the report, which by it's nature has to have a value. Something like an ID.

Right click the details section, and select Insert Section Below. Format the new details section so that it's conditionally suppressed based on
Code:
IsNull({YourCountFormula})

In the new section, which you've just applied the suppressing condition to, insert a formula which consists only of " ", or a hardcoded string or number which is formatted to print in white.

When no values are returned by the report, this section with it's fake values should force an export to Excel.

Naith
 
actually I think the problem is related to my subreport - when I delete the subreports it runs - when I put them in - it fails... any ideas?
 
Ah - you already have a subreport. That's always handy to know when exports are concerned.

Just use the example I gave you to conditionally suppress the section that the subreport is in, and Excel should acknowledge the empty export.

Naith
 
That worked beautifully - and this will be helpful I'm sure in the future. Thank you SO SO MUCH!!!! I wasted a whole day trying to get this to work - you have saved me from so much grief!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top