Empty records in Query

vnfoster

Registered User.
Local time
Today, 13:14
Joined
Sep 16, 2009
Messages
30
Hi all I am not sure if this is even possible, but I thought I would give it a try. I have a basic report for seized cars and a sub report for seized property, The reports are linked by a time frame, i.e. user enters start and end dates.

It is very possible for the car query to be empty but the property query to return many records. I want to know if there is some SQL to put in "No property seized" in the report when the query is empty. So that the report won't read an Error in the date fields. Thank you in advance for the help :)
 
There is a way and going to give it a go from the top of my head of how I have done it before.

If the subreports are infinite size - meaning your report could span many pages, I would resized the subreports so that they are a thin line and set them 'to grow'. Then on top of the line, I would apply a label "No property seized."

Then, I would run some code using the NoData event of the subreport and causing the subreport or label to be visible.

I think that is how I did it - sorry I don't recall which db I did it in or the version number - it took some playing with but it did work. I found various samples out there in the nethersphere so it does exist.

HTH,
-dK
 
Thanks for the "to grow" advice, I will google and research to find the nodata event code.
 

Users who are viewing this thread

Back
Top Bottom