• Columns in Subreport (XP, SR2)

    • This topic has 7 replies, 3 voices, and was last updated 19 years ago.
    Author
    Topic
    #1771452

    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?

    Viewing 1 reply thread
    Author
    Replies
    • #1808346

      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?

      • #1808351

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

      • #1816234

        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

        • #1816235

          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.

    • #1816236

      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.

      • #1816237

        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.

    Viewing 1 reply thread
    Reply To: Columns in Subreport (XP, SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: