Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

SubReports with multiple columns

edited January 2006 in End User
I am using Delphi 7.01 and RB 7.04.

Is it possible to have a dynamic detail band in a sub report that spans 3
columns? The value I have per column can be large and requires wrapping in
some cases. I want the wrapping to push the entire next row down.

Example:

A B C
Value 1 Value 2 Long Value that
Wraps
Value 3 Value 4 Value 5
thats
long
Value 6 Value 7 Value 8

Any comments would be great.

Comments

  • edited January 2006
    Hi Isaac,

    Set the Report.Columns property to the number of columns you want and set
    the DetailBand.PrintHeight to phDynamic. Then you can place a DBMemo inside
    the detail band which will wrap if needed.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    I tried dynamic before using the top to bottom format, but all six rows
    appear in the first column and nothing in the second. The text does wrap
    correctly.

    So I changed the format to left to right which properly prints the values in
    both columns, but it forces the band to static which stops the wrapping.

    I am stuck.

  • edited January 2006
    Hi Issac,

    Sorry, after re-reading your post, I see that you want to use LeftToRight
    columns. This feature is very limited in ReportBuilder and does not allow
    the use of a dynamically sized detail band. You will either need to
    manually size the detail band according to the amount of space needed or use
    TopToBottom columns.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2006
    Ok.

    Can you think of any reason when using top to bottom that all information
    shows up in the first column only?

  • edited January 2006
    Isaac,

    Any chance that with the band set to dynamic, all the data fits in the first
    column before it needs to wrap into the second column? If this is the case,
    you can constrain the page range that the band uses and this will force the
    data to wrap into the next column.

    --

    Bob

  • edited January 2006
    Bob,

    My report prints as follows:

    Column 1 Column 2
    Row 1 Data Row 1
    Data Row 1 Data Row
    1 Data Row 1 Data
    Row 2 Data
    Row 3 Data
    Row 4 Data
    Row 5 Data

    It should print
    Column 1 Column 2
    Row 1 Data Row 1 Row 3 Data
    Data Row 1 Data Row Row 4 Data
    1 Data Row 1 Data Row 5 Data
    Row 2 Data


    There can be hundreds of rows that could span several pages. That's why I
    was hoping that LeftToRight would work with wrapping.

    You mention contraining the page range. Would this solve my problem? If so,
    how to I change it?

  • edited January 2006
    Isaac,

    The example you give shows that you want 4 rows of text per column.
    Assuming that each row is 0.25" in height, the total height of all detail
    bands printed is 2". If the page size allows for more detail bands then
    nothing will ever print in the second column as it all fits in the first.

    With a letter size page of height 11.5" with 0.25" top and bottom, setting
    the header and footer band to be 4.5" gives you a 2" section in the middle
    of the page for you detail bands. This forces the additional rows to print
    in the second column.

    You can change where on the page the detail bands print and take into
    account any group headers/footers that are displayed.

    --

    Bob

  • edited January 2006
    If know how the max number of detail bands you want to print for each
    column, you can use the DetailBand.PrintCount.

    For example, if you want to print 4 records per column, set
    DetailBand.PrintCount to 4 and that will force a new column to start every
    four records.



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2006
    Nard,

    Because Isaac has a memo in his detail band, confining the number of bands
    does not ensure that his columns are equal lengths. My suggestion is based
    on the assumption that he wants to control the number or rows of text
    printed per column rather than the number of records.

    --

    Bob

  • edited January 2006

    Ok, thanks for pointing that out...




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.