Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    report is too wide (2003)

    I have a tubular report that is very wide, 21", I want to know if there is a way to create a report that will allow me to list my headings down the left hand side of the page, then have columns next to this with the detail? Similar to the columnar, but multiple columns on a page not 1-heading 1-detail?

    thanks,
    jackal

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

    Re: report is too wide (2003)

    I'm not sure I understand what you want, but you can rearrange the controls in a columnar report to occupy several columns next to each other.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: report is too wide (2003)

    I guess the easiest way to explain is if my report was layed out in Excel, my Headings would occupy column A. Next the data the would typically go under the headings ,in a Tubular report, would be listed out to the right in cloumns. Coulmn B would then contain 1 record, column C would contain 1 record, and so forth. Does this clarify any?

    Jackal

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

    Re: report is too wide (2003)

    You could put the data in a multi-column report, with the records arranged across-then-down.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: report is too wide (2003)

    from what i can tell by doing as you suggest, I get the headings with every record, I was hoping there was a way to get a columnar rpt with tabular layout going across the page.

    thanks,
    jackal

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

    Re: report is too wide (2003)

    I can't visualize what you want, sorry.

  7. #7
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: report is too wide (2003)

    Here is a pic that is sort of what i am looking for. Hope this helps.
    jackal

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

    Re: report is too wide (2003)

    This requires VBA code, I think.

    Start by creating a columnar report, using the Report Wizard, or an Auto-Report, or manually - whichever you prefer. The report must have a page header, but it may be empty and have zero height.
    Select all labels in the Detail section, cut them to the clipboard (Ctrl+X), paste them back (Ctrl+V) and move them to their original position. This detaches the labels from the bound controls.
    Next, select the bound controls (text boxes etc.), and move them to the left so that they overlap the labels. You can also set the Left property to the same as that for the labels.
    Write down the 'used width' of the Detail section (excluding empty space on the right)
    Select File | Page Setup..., and activate the Columns tab.
    Set the number of colums to what will fit on the page, and set the column width to the width you wrote down.
    Click OK.
    Select View | Code to open the report module. Copy the following code into the module:

    Private lngOldLeft As Long

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim ctl As Control
    If Me.Left < lngOldLeft Then
    For Each ctl In Me.Controls
    ctl.Visible = (ctl.ControlType = acLabel)
    Me.NextRecord = False
    Next ctl
    Else
    For Each ctl In Me.Controls
    ctl.Visible = (ctl.ControlType <> acLabel)
    Next ctl
    End If
    lngOldLeft = Me.Left
    End Sub

    Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
    lngOldLeft = Me.Width
    End Sub

    Switch back to Access. Close and save the report.

    Simple demo based on tables from the Northwind database attached.

  9. #9
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: report is too wide (2003)

    Hans, this is perfect!!! Thanks. <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>

    I have 2 questions. 1) Is it possible to make the Detail section show on every page?
    2) Is it possible to include a Title for the entire report?
    Thanks again,
    Jackal

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

    Re: report is too wide (2003)

    1. But it does! What exactly do you mean?
    2. Yes. Select View | Report Header and Footer. Insert a label, text box, logo, ... into the report header. If you need to make the report wider, select File | Page Setup..., activate the Columns tab, and clear the 'Same as Detail Section" check box. Click OK. You can then drag the right edge of the report to the right without changing the column width.

  11. #11
    2 Star Lounger
    Join Date
    Jan 2004
    Posts
    196
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: report is too wide (2003)

    THANK YOU AGAIN! ! ! !
    everything works great!
    Jackal

Posting Permissions

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