1. ## SubReport Filter Problem

I have a report based on a set: Patent = Consultants Child1 = Orders Child2 = Transactions The child tables are both 1:many with Consultants

The report has a Group = Consultantnum ie it breaks on each Consultant record
The report has a group header with some of the info from the fields in the Consultant record
The report has two subreports in the detail section, one for each child...
subreport1 has the following filter: scanning("Orders").AND.Orders->Posted2Monthly=.F.
subreport2 has the following filter: scanning("Transactions").AND.Transactions->Postedtomonthly=.F..AND.Transactions->Postapproved=.T.
So far so good...

When both the Orders and the Transaction tables have records that meet the filter criteria for the Consultant in the parent table all goes well.
BUT
If there are no records that meet the filter criteria in the Orders table, even when there are records in the Transaction table the report does not print...
However... if there are no records that meet the criteria in the Transaction table but there are records in the Orders table the report prints ok.
This may have something to do with the fact that the 1st subreport is based on the Orders table... but nevertheless I want the report to print even when there are no records that meet the criteria in eiother table.

How can I accomplish this?

2. ## Re: SubReport Filter Problem

You should post an example of the data and report.

3. ## Re: SubReport Filter Problem

Thanks Al...
what is the best way to post the tables and set and report? it is a VERY large database...

4. ## Re: SubReport Filter Problem

Originally Posted by David Boomer
Thanks Al...
what is the best way to post the tables and set and report? it is a VERY large database...
I'd copy selected records from each table (that will illustrate the point) into new tables.

Then make a set with the new tables and copy to the report from the old set to the new set.

Then zip the set from the control panel. It'll zip the set and tables within the set.

Post that to the messageboard.

5. ## Re: SubReport Filter Problem

Originally Posted by David Boomer
Thanks Al... Attached is my best effort... hope it works
attachment deleted.
Is there anything confidential in the data?

If so, I'll remove the zip file from the post.

This looks like a good example, now to figure out what isn't showing that should.

6. ## Re: SubReport Filter Problem

Thanks Al...
yes there is confidential info

7. ## Re: SubReport Filter Problem

I'd suggest making a new simple report to focus on the problem of data that isn't appearing.

Then once you figure out that issue you can blend it into the existing report.

I'm not sure what data should appear where......

Also,

Your UDFs are not included so I can't modify the calculated fields.

LookupCust = Firstname-" "+Lastname-" "+alltrim(str(Consultordcpo->Custnum))

should be all you need instead of the lookups that are in your definition.

8. ## Re: SubReport Filter Problem

Thanks Al...
The UDF's arnt important at this stage... I don't care what the report looks like... as long as it prints.

I'm not sure what a 'simple report' is...
If I remove the subreports everything works...
and as long as there is data in the consultordcpo table (that meets the filter criteria) everything works.
It looks like the data isn't appearing because there are no records in the 1st subreport...
pretty simple... I just don't know what to do about it...

9. ## Re: SubReport Filter Problem

David

the problem is the sub-reports not showing the right data.

So build a report with only subreports showing all of the data.
Then start applying the filters to get only the data you need.
One step at a time.

You'll probably find what the problem is by using this method.

I will also suggest that you have the fields that are used in the filter on the report showing their values.
If that makes the filters work, then use the object hide option rather than removing the field from the report.
Seems unnecessary, but I've found that some child filters don't work properly unless the field is on the report - although the field can be hidden (so in a sense it's not on the report - at least to the user's eye)

10. ## Re: SubReport Filter Problem

I'm not sure why... or what I did... (sort of like a monkey randomly pressing keys! :-) ) but it now seems to be working!!
I'll post if I figure out what was going wring.

11. ## Re: SubReport Filter Problem

Originally Posted by David Boomer
I'm not sure why... or what I did... (sort of like a monkey randomly pressing keys! :-) ) but it now seems to be working!!
I'll post if I figure out what was going wring.
Oh those are my favorite....

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•