Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Mar 2003
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reports/subreports (XP)

    An ACCESS database that I have created, has a report on which I have used tab control to create several pages each of which has one or more subreports on it. I need to print the report record by record (all tabs for each record). But I want to skip the tabs/pages that are totally blank while printing. That is, if none of the subreport on a tab/page have any record for the current observation, then that tab/page should be excluded from the print.

    How do I do it?

    Vikas

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Reports/subreports (XP)

    This is not normally the way you use a tab control and I don't see what you hoped to gain by using one on a report. If you want to print "all pages" of a tab control on a report, don't use a tab control. Put the subreports one after another directly in the detail of the report and set the detail section's can grow/can shrink properties to True. Then just hide the subreport if there is no data for that subreport.
    Charlotte

  3. #3
    Lounger
    Join Date
    Mar 2003
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports/subreports (XP)

    One simple reason for not doing what you have suggested is that there is a limit on the number of controls you can put on a particular section. So after a while, it tells you that you can't put any more. And at that point, you can either create an entirely new form or put everything on a tab control.

    Secondly, I think it just looks much neater, resembles a book in which you can shift pages. I can make it fit my screen and it works much better because I can view relevant information at a time rather than have to use scroll bars to go up and down.

    Vikas

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Reports/subreports (XP)

    The limit on controls applies to each report or subreport. Since the number of controls is quite high, you would have to have a very extreme report to exceed the limit on the parent report if you used subreports, since each of those count as a single report. Putting controls on a tab control doesn't change he number of controls on a form or report. If you put the controls on subforms or subreports, it doesn't matter whether the subforms/subreports are on a tab control or not, they still count as a single control each.

    Are you talking about reports or forms? You can't do anything useful witha tab control on a report because reports are not interactive. If you are talking about forms, then your question is quite different from what your subject and your original post suggests and the answer is different as well.
    Charlotte

  5. #5
    Lounger
    Join Date
    Mar 2003
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Reports/subreports (XP)

    I did in fact have a form to start with that was used to feed/edit data. But now I need to print it. It is just fine for me to print the form but then I was having the same problem. So I thought it might be better to create a report based on this form and then play around with that.

    How would you do this on a form? That is, making it not print a particular tab.

    Vikas

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Reports/subreports (XP)

    Printing a form is not a very good idea in general, and in particular if it contains a tab control. So a report is the way to go if you want to print your data. But you shouldn't use a tab control on the report either - tab controls are meant for interactive use, not for printing. All you'd ever get would be a printout of the first tab - since a report is not interactive, you can't go to the second and following tabs.

    In the first place, you should reconsider the setup of your report. A report can contain up to 754 controls. Do you really need more than that to display one record? Then I pity the persons who have to read the report.

    To get the report to print correctly, place the subreports below each other in the Detail section. Make sure that there is no vertical overlap between them. Set their CanGrow and CanShrink properties to Yes, and also set the CanGrow and CanShrink properties of the Detail section to Yes. That way, a subreport will shrink to nothing if it contains no data.

Posting Permissions

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