Subreport null values

juicybeasty

Registered User.
Local time
Today, 15:54
Joined
Feb 17, 2003
Messages
52
I have a report comprised of several subreports.

One of the subreports has calculated fields based on a query using using aggregate functions (SUM).

If all the amounts come to zero/null, however, the subreport doesnt show when the main report is produced. This results in a large blank space instead of the report showing all the text with zeros in the calculated fields.

This looks messy and not very professional.

Could someone help please??
 
You can make your subreports really thin and then set the property "Can Grow" to Yes. Check out the attachment.

This way if there is no information you will have a thin blank space instead of a huge one....
 

Attachments

  • subreports.jpg
    subreports.jpg
    97.7 KB · Views: 192
Thanks, that's a good idea since my problem is really only a cosmetic one. I'll have a go at implementing this solution tomorrow.

Indicentally, he way I've got round it so far is to put dummy data into the form to trick it into generating the subreport. It's to do with null values.

Briefly, I have query which calculates (using SUM) gross income, net income, etc, if the dept the business is introduced to during the month is Life and Pensions. But if no business is introduced to that dept during the month, regardless of whether any income is generated, the values are null (rather than 0).

I don't think the Nz function will work in this case since there is no object to the form to attach it to using VB code.

Purely out of interest now, to ease my mind about not being able to work it out, could someone tell me how to deal with null values in this case.

Thanks!
 
Totally agree

I have been working the same issue.. I am trying to calculate the SUM of a couple different queries and when there is no data within it, it just turns everything blank on the report...


IE: =[sub_total]+[TAX]


If there was no TAX then it shows a blank as the total...

HELP HELP HELP
 
Search here for the HasData method, it's been answered many times
 

Users who are viewing this thread

Back
Top Bottom