Alpha Video Training
Results 1 to 11 of 11

Thread: SubReport Filter Problem

  1. #1
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default 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. #2
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: SubReport Filter Problem

    You should post an example of the data and report.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default 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. #4
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: SubReport Filter Problem

    Quote Originally Posted by David Boomer View Post
    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.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  5. #5
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: SubReport Filter Problem

    Quote Originally Posted by David Boomer View Post
    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.
    Last edited by Al Buchholz; 04-22-2015 at 05:57 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default Re: SubReport Filter Problem

    Thanks Al...
    yes there is confidential info

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default 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.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  8. #8
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default Re: SubReport Filter Problem

    Thanks Al...
    I really appreciate your help.
    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. #9
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default 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)
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  10. #10
    Member
    Real Name
    David Boomer
    Join Date
    Apr 2000
    Location
    Brampton Ontario, Canada
    Posts
    662

    Default 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. #11
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,626

    Default Re: SubReport Filter Problem

    Quote Originally Posted by David Boomer View Post
    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....
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Subreport Filter on table list does not show all tables
    By Claire Shuttleworth in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 04-29-2011, 04:54 AM
  2. Subreport - Filter expression not logical
    By EdTeves in forum Alpha Five Version 9 - Desktop Applications
    Replies: 4
    Last Post: 11-21-2008, 09:38 AM
  3. Subreport problem. Filter problem?
    By ray camo in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 11-15-2008, 04:27 PM
  4. Subreport filter
    By Bill Parker in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-11-2002, 11:07 AM
  5. SubReport Problem
    By David Boomer in forum Alpha Five Version 4
    Replies: 8
    Last Post: 01-03-2001, 03:39 PM

Bookmarks

Posting Permissions

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