Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Columns in Reports (any)

    Hello all,

    I have a problem similar to a previous post, but just the reverse:
    My report's detail section needs to be in columns, but one of the group footers needs to NOT be in columns. The group footer actually contains a subreport, which has only a page header and detail section, both formatted for the full width of a page.

    When I run the report, if the group footer/subreport is less than a page long, everything works fine. If it has more than a page full of subreport items, they get put in columns, which superimpose on each other, because the detail section of the subreport is formatted wider than the columns.

    I noticed in Charlotte's answer to an earlier post, that "as the main report is formatted, so shall the subreport be" with regard to columns.

    I was thinking of "fooling" Access into doing a page break by counting how many detail records were printed, then forcing a page break and resetting the counter after so many were printed.

    The question then, is: How do you force a page break in code?

    Thanks for any help.

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

    Re: Columns in Reports (any)

    Why not reverse your logic and put your present detail, complete with columns, into a subreport and your summary information on the main report? That way, your section headers can be full width without causing problems and your subreport detail can be in columns.

    As for turning on a pagebreak on a report, what you do it set its visible property to false by default, and then reset the visible property to true when you want to activate the pagebreak.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Reports (any)

    Ok, now I'm really confused! I did some searching on this list, and found a question from somebody who had the same exact problem as me, except he wanted his MAIN report to be WITHOUTcolumns, and his SUB report to be WITH columns.

    When he asked why that wouldn't work, you answered his post and said the MAIN report page setup prevailed, and the columns would not print in the subreport. Now you're telling me that will work??

    Anyway, that's why I thought of the idea of forcing a page break. Depending on font size, when 8 or 10 items (set up so they're *sort of* double spaced) have printed, and the output would normally go to the next column, force the new page.

    I inserted the page break in the detail section right below the items to be printed. Just for test purposes, in the Detail format event, I told it to be visible. I assumed that would give me one detail line per page on my subreport, then I could add code to make it selectively invisible. This didn't work at all, I still got multiple columns on the subreport.

    I forgot to mention that this app is several years old, and still in Access 2.0. Could this be why it's not working? (Please say yes, I've been dying to justify a reason to upgrade it....but only if you think that's really true!)

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

    Re: Columns in Reports (any)

    Don't even try this in Access 2.0. There, does that make you feel better? <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Actually, I believe it will work in Access 2, but it's been a very long time, so don't count on that. Of course, if you're still using Windows 3.x, you don't have much choice because you won't be able to upgrade without upgrading your Windows as well.

    It wasn't clear what you were trying to do with pagebreaks, so I answered your question. I'm still not clear on what you're trying to do in the report. Headers and Footers can span the entire width of a multiple-column report, because the columns apply to the detail section. It sounds like you're trying to put your subreport in the detail section, so have you tried putting it into a footer instead?

    Oh, and by the way, I wasn't talking about putting a multi-column subreport into the detail section, I was talking about putting a multicolumn subreport (containing the information you now have in the detail section) into a footer. I have no idea whether it would work or not because I can't remember whether I've tried it, but I think it should. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Reports (any)

    Thanks for the prompt replies.

    I'm having the same problem whether I use Access 2.0 or 2000. The subreport is in a group footer. The report shows items pertaining to a retail store. There are several detail items which may print for that store. These need to be in columns for various reasons. In the store footer, a group footer, I want to print a comment report for the user to fill out. This report simply lists several items, one per line, and next to each one a line object extending the full width of the report so the report user can fill out information:

    Item1 __________________________________________________ ___

    Item2 __________________________________________________ ___

    etc.

    That's all there is in the subreport, other than a small page header section.

    I created a mock-up of this in Access 2000, using a simple query which returns 25 records. Same query in both the report and the subreport, just different fields being used in each report.

    If I run the subreport by itself, all works fine. I have a bit of code in the detail format section which increments a counter, and every 5 records, makes the page break visible. If I disable this code, I get all 25 records on a page. If I enable this code, I get 5 records each page.

    If I run the regular report, with the embedded subreport, none of that works. The subreport is in columns all on one page. The page-break logic (in the detail format section of the subreport) doesn't work at all. I even tried commenting out every line EXCEPT the line making the page report visible, hoping to get only 1 item on each page. No Dice. Very curious!

    BTW, the help for Access 2k supports my belief that columns apply to detail AND group header sections, but not to report and page header and footer sections. I thought of putting the subreport in a page footer, but there's no can grow or can shrink for that section, so even if I make the subreport invisible, it will still take up too much room.

    Any ideas?

Posting Permissions

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