Results 1 to 5 of 5
  1. #1
    RedGoneWILD is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    105

    Report with Sub Report


    Hi everybody,

    I have a report that contains a subreport linked by an ID number.

    This report is opened by clicking a button on a form, and can be filtered by year prior to opening. The VBA code alters the query of the sub report to display only the records relating to that year.

    The records returned are correct, but I have formatting issues. It's like there is a space for each sub-record that doesn't appear, that would normally appear if there was no filter applied.

    For instance, one group of sub-records might have 10 records if the year isn't filtered, but if I select 2009 and only 3 sub-records meet this criteria, it will display only those 3 sub-records, but leave 7 blank spaces for the records not returned.

    Any ideas?

  2. #2
    evander is offline Competent Performer
    Windows 7 Access 2003
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    206
    Hi.

    Possible reasons:

    1. Your subreport is set to a fixed height. Resize your subreport so it appears as if it can accommodate only one row, but set the "Can Grow" property of the subreport to true.

    2. Your subreport's query is returning a result set with some empty fields, but maybe the field you're comparing your criteria against is present?

    You can post your DB so I can diagnose it better.
    Good luck.

    Jan

  3. #3
    RedGoneWILD is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    105
    thanks for the reply

    #1. both the can grow & can shrink are set to yes...im pretty sure everything is okay for this one

    #2. i'm not exactly sure what you mean, but I think this is probably what's going on...It essentially has a blank placeholder for each record that would be returned without a filter...if the sub-record applies to that filter, then it is displayed


    i have another question...is there a way to make a report have a page break at a certain location? Like if it can't fit all sub-records on one page, then it should break to the next page to make it look nicer

  4. #4
    evander is offline Competent Performer
    Windows 7 Access 2003
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    206
    Hm... Sorry I'm not a native English speaker. I just realized how clumsy my statements were. Haha.

    I meant, maybe your criteria matches the content of some field, but you don't see that field in your report anyway. Instead, blank fields belonging to the same row get displayed.

    As for page breaks, the subreport data will run on to the next page as long as there isn't enough room in the current page. I just did an experiment on that just to verify my statement.

  5. #5
    RedGoneWILD is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2010
    Posts
    105
    interesting...

    the subreport tracks financial information for students...the VBA code properly filters this subreport to include only the records for the school year that is selected.

    the main report is a list of all student advisors, and the subreport displays the students each advisor represents based on their student ID. right now, it appears the main report has a blank placeholder for each student under that advisor, regardless of if they have any financial data for the selected school year

    plus, the report is displaying all advisors, even if they dont have any students with financial data for the selected school year.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  2. Replies: 3
    Last Post: 05-21-2010, 03:57 PM
  3. Replies: 1
    Last Post: 02-02-2009, 05:52 AM
  4. Replies: 0
    Last Post: 10-24-2008, 11:20 AM
  5. report prints blank page at end of report
    By darrellx in forum Forms
    Replies: 0
    Last Post: 03-14-2006, 08:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums