Main and sub reports

Thecherub

Man with a Mission
Local time
Today, 14:40
Joined
Jan 14, 2004
Messages
92
I have a main report with 2 sub reports.

The report is set up as a date range in the Sub reports. somtimes there is no data in the range selected but the main report line still show.

How can i get the report to not display the Main report lines if the subreports for that person are Null.
 
I think i have to use IsNull but how?

Thecherub said:
I have a main report with 2 sub reports.

The report is set up as a date range in the Sub reports. somtimes there is no data in the range selected but the main report line still show.

How can i get the report to not display the Main report lines if the subreports for that person are Null.

"(IsNull ( [Time Off Current].Report![Text12] ) ) or (IsNull( [Time Off History].Report![Text12] )"

I think this will help me in the Main report but where to i put it and what else do i need to make it ignore and entries where the subreports return Null Values. Of do i need to put this into the Underlaying queries?
 
Search here for HasData, examples have been posted
 
Arrrgh.....

Rich said:
Search here for HasData, examples have been posted

The Has Data just confuses me :confused:

I've done searches on it and i still don't understand it.

But i'll try again.
 
I can't wrap my head around HasData

Thecherub said:
The Has Data just confuses me :confused:

I've done searches on it and i still don't understand it.

But i'll try again.

I must me deficient because I just cannot wrap my head around HasData. It just confuses me to no end. :(
 
Something like Me.SomeField.Visible = True = Me.MySubReportName.HasData
 
no this is a stupid question

Rich said:
Something like Me.SomeField.Visible = True = Me.MySubReportName.HasData

Ok i get that. so if the sub report has data then it will be visable and if not it won't show. Where in the report does this go, or does it go in the Query?

And the second stupid question.....

Me = Queryname or Reportname?
 
One Last Time before defeat

Ok this is the last gasp of a HasData hasbeen.

My main report Named "Department by Range" has the fields:
Department, Lastname, Firstname, Senioritydate, vacationelegibility

Subreport1 Named "Time off History(Date Range)"
Lastname(nonvisible), Firstname(nonvisible), Time Off Booked, Count(of time off booked), TimeOffDate.

Subreport2 Named "Time off Current(Date Range)
Lastname(nonvisible), Firstname(nonvisible), Time Off Booked, Count(of time off booked), TimeOffDate

The Daterange is supplied by a form feeding the users dates into a Between on the TimeOffDate Field.

how and where do i set up HasData to not show the mainreports line when
there is no data on either of the subreports?

I'm lost I can't even find the HasData info on the samples that are posted I don't know where to look anymore.
 
I think you're better off restricting the Main reports records to only those who have records in the subReport queries. I'd restrict the records for the main report via it's underlying query
 
thats exactly what i want

Rich said:
I think you're better off restricting the Main reports records to only those who have records in the subReport queries. I'd restrict the records for the main report via it's underlying query


thats what i want now how do it?
 
I'm not sure how to do it with two conditions, for one it's just a case of changing the joins between the two tables so that records from the parent table are only displayed when records exist in the child
 
well that should not be a problem

Rich said:
I'm not sure how to do it with two conditions, for one it's just a case of changing the joins between the two tables so that records from the parent table are only displayed when records exist in the child

Well all of the data in the two subreports comes from the same table. so the join should fix both. What join do i need to change and where. I don't think you want the main relationship changed.

So do i just change it in the top portion of the design query grid?
 
Ok how is this done

Rich said:
I'm not sure how to do it with two conditions, for one it's just a case of changing the joins between the two tables so that records from the parent table are only displayed when records exist in the child

Ok i undestand the principle but am unable to figure out where to impliment it. If you let me know for one subreport i may be able to reorgize things to get most of what i need.
 
Thank you everyone

I'd like to thank everyone for all of their help i fixed this by abanding my original design and totaly redoing the report and the query it came form. With that design there are no subreports to foul things up and with a Simple IIf check box to designate history i have everything i need.

somtimes you just have to twist your perceptions and try somthing different.

:D :D ;)
 

Users who are viewing this thread

Back
Top Bottom