Results 1 to 4 of 4
  1. #1
    Larryg is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    50

    Sub-Report issue

    Greeting All...



    I have a report, that consists of (only) multiple sub-reports. Everything works fine when there is data for the sub-reports. Some of the sub-reports use data from other sub-reports on the same report. However issues arise when one of the sub-reports doesn't show due to no data. And, the weird part is, when the report is viewed in report view, there are no issues (i.e. ALL sub-reports display, and any without data show zero for volume). It's only when the report is printed that the no data in a sub-report is an issue. If I make an entry of zero (for volume) in a record, the report prints fine (i.e. the sub-report prints, with a zero volume), but there is one sub report that the volume is counted by simply counting the records in the queried record set, so adding a zero-volume count is not an option for that one metric. Is there a way to resolve this issue? Another way of asking this is... is there a way to get the same output that shows in report form, to actually print out the same way?

    Thanks...

    Larry

    Access 2010

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    I think I was following ok until here
    there is one sub report that the volume is counted by simply counting the records in the queried record set,
    If you're saying the sub report that is the 'foundation' for the rest can have no records? Then what about cancelling the main report opening?

    Assuming all the sub report properties are correct (grow/shrink/report view, whatever) maybe you have an issue with the report reformatting itself when you switch views - or are you not switching, but rather closing and opening with a different view? I read about the situation before - seems the issue was the sub report queries could not process fast enough, so the solution was to migrate the data to a temp table and open the reports from there. Also, I believe sub reports load before the main opens, so maybe the order of the loading is not conducive to the relationships you've made between them. If you have not tried, perhaps opening the subs in print preview on their own (I guess you'd have to fudge some data that they'd be looking for) and see if a) they open OK, and b) if they have records. That's all I can think of.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Larryg is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2015
    Posts
    50
    Micron... thanks so much for the reply. The foundation, or main (parent) report, contains no data, I use it simply as a container for the sub-reports. Again, everything appears fine on the screen, it's only when switching to print-view, or actually printing the report does the issue present itself.

    I think I understand that if a sub-report contains no data, it will not print. I think that is my problem here because at times there will be no data for 1 or more of the sub-reports. This situation will vary from month to month depending on the subjects activities and performance.

    "...or are you not switching, but rather closing and opening with a different view?" - no, not closing the report manually, but when the report is called (via vba code) it's called in report view. Once the report is view-able on the screen and I want to print it, the system appears to re-run and then pop the printer select dialog box. Once the report is actually printed out in hard copy, that's when the issue appears.

    I'm not sure of the sub-report properties, so I will check that. That's a good point and thanks for reminding me to check that. However my mind keeps racing back to knowing a sub-report won't display if there is no data to display. The puzzling part is why is that principle set aside for report view, but not for print view.

    Thanks...

    Larry

  4. #4
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,424
    Not sure you got the insinuation I was making that when you're switching views, the reload may be too fast for the data source. I'm afraid that's all I've got to offer since I've never seen this before, but I have seen other things that tell me some report formatting events don't run for certain views, so things do tend to move around at times.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Report Grouping issue
    By RayMilhon in forum Reports
    Replies: 2
    Last Post: 05-21-2014, 01:43 PM
  2. Report Distribution Issue
    By RayMilhon in forum Access
    Replies: 3
    Last Post: 03-19-2014, 12:32 PM
  3. Report VBA Issue
    By Marianna_Air in forum Reports
    Replies: 6
    Last Post: 08-10-2012, 09:54 AM
  4. report Criteria issue
    By manic in forum Reports
    Replies: 2
    Last Post: 02-15-2012, 10:02 PM
  5. Report Sorting Issue
    By cbgroves in forum Reports
    Replies: 14
    Last Post: 12-01-2011, 08:44 AM

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