Results 1 to 8 of 8
  1. #1
    Star Lounger
    Join Date
    Jul 2002
    Location
    Petersburg, Virginia
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Columns in Subreport (XP, SR2)

    I have a report (without a data source) containing 3 subreports; each subreport has its own data source. I want the 2nd subreport to arrange records in 3 columns; the other subreports require the default (single) column. Result: All subreports arrange data in single-column format. I have played with properties of 2nd subreport such as # columns (obviously), Can Grow, Height without success. How can I achieve the desired formatting?

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

    Re: Columns in Subreport (XP, SR2)

    In a multi-column report that is to be used as a subreport, you must set Column Layout (in the Columns tab of File | Page Setup...) to 'Across, then Down'. If it is set to 'Down, then Across', you'll get only one column, because the subreport isn't able to determine where the page ends.
    Does that solve your problem?

  3. #3
    Star Lounger
    Join Date
    Jul 2002
    Location
    Petersburg, Virginia
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Subreport (XP, SR2)

    That did it. (Pretty obvious now that you've shown me.) Thanks!

  4. #4
    Star Lounger
    Join Date
    Feb 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Subreport (XP, SR2)

    That's just what I needed, too. Now.. I have a subreport which I've set to three columns accross the page. I have a report header with column headings and the report detail has the data. Can I make the report header repeat across the page just like the detail does?

    I can't see any properties of the report header or in page setup > columns that can help me, and if I make the report header a page header, I lose the column names completely.

    Thanks,
    Martin

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

    Re: Columns in Subreport (XP, SR2)

    Repeat the column headings in the report header so that there are three identical column headings. You'll have to space them according to the column width and column spacing.

    Note: the width of the report doesn't need to be the same as the column width - there is a check box for this in the Columns tab of File | Page Setup. In this situation, you obviously want the report to be much wider than the individual columns.

  6. #6
    Star Lounger
    Join Date
    Feb 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Subreport (XP, SR2)

    Thanks for that. I was hoping to have the header repeat only as needed rather than "hardcode" it right across the page. I suppose that the header doesn't know how many columns are in the detail, but I was hoping Access worked slightly diffferently.

    Nonetheless, it's no point persuing an imaginary solution just because that's how I think it should work, so thanks again for putting me on the right track.

    Regards,
    Martin

    Follow on comment:
    In the subreport, I unchecked File > Page Setup > Columns > Width same as detail, but couldn't find a way to specify that the report header width be different to the report detail width (using A2003). When I made the subreport wide enough for the three headers, the detail width followed and most of the report was off the page.
    I simply put the "subreport header" into the main form as a bunch of labels in the right sort of place and deleted the subreport header. The result is no different to having three columns worth of headings in the subreport header anyway. Simple, Ugly And Very Effective.

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

    Re: Columns in Subreport (XP, SR2)

    The width of the detail section in design view is by definition the same as the width of the entire report. But what happens in preview / print is determined by the settings in the Columns tab of File | Page Setup. There, you can specify the column width and column spacing. If "Same as Detail" is cleared, the column width can be different from the width of the detail section. See screenshot below.

  8. #8
    Star Lounger
    Join Date
    Feb 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Columns in Subreport (XP, SR2)

    Beautiful. Thanks Hans.

Posting Permissions

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