Show set value if report has no records

D

Damo G

My report is a quarterly report that shows records summarised by month. If
one of the months has no records I would like the report to show "NIL RETURN"
where the records would normally show up. Is this possible?
 
D

Duane Hookom

If there are no records, there will be no "where the reocrds would normally
show up". You could add a text box in another section with a control source
like:
=IIf(HasData,"","NIL RETURN")
 
D

Damo G

Thanks for responding Duane, much appreciated.

I tried it out and I can't get my head around how to apply this to my
situation. Perhaps if I better explain what I am trying to achieve. My
table currently shows the following when it has records to view:

January
Genus Species (All of the above is in the Page Header)
aaa bbb (Detail section)
ccc ddd

If February has no records I would like it to show:

February
Genus Species (Page Header)
NIL RETURN (Detail section)

I'd like to achieve it without putting any extra spaces in the report.

Thanks in advance.
 
D

Duane Hookom

Does your query contain any records for February? If not, you won't have a
group heading or a detail section for February.
 
D

Damo G

The query will not have any results for February so I guess the easiest way
around it is for months that have no records to create a new record where the
genus is set as NIL RETURN. I was thinking this would be an alternative
after I posted my first question. Just wanted to check if it was possible by
any other means.

Thanks again for your help.
 
D

Duane Hookom

You could create a table/query of all months and join it to your report's
record source query and set the join properties to include all records from
the all months.
 
Top