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

group band printing horizontally

edited July 2001 in General
I have a report with 3 group bands. The first one is by customer
Name, second by inventory category, and the third is by items withing
each inventory category. I would like to have the third group band
print horizontally instead of vertically to save space. Is this
possible?

Comments

  • edited July 2001
    A group band can't print in a different orientation natively.

    Are you using columns in the report?

    If you are using a one column report then I think you can achieve this
    programatically by using our draw command architecture. ReportBuilder's
    native output is page objects. On these page objects are draw command
    objects. There is one draw command for each component (text, line, shape...)
    to be printed on the page. It is possible to add/remove/modify the draw
    commands after a page has been generated and right before it is sent to the
    output device.

    I think by using the rotated label component, you can add a draw command to
    the page which can draw rotated text. What you could do is use the
    OnDrawCommandCreate event to grab a handle to the draw commands that are
    going to be created on the page. Then in the Report.OnEndPage event you can
    loop through these objects(use a TList) and create rotated text draw
    commands to represent the text on the third group band. The only
    consideration is when and where to perform this operation. Then you'll need
    to shift all the detail bands upwards on the page to account for the group
    that draws horizontally. By modifying the draw commands, it shouldn't be
    that bad, except that there may be room left over to print another record on
    this page because the bands have moved up to occupy the space the group 3
    header band used to print in. With this approach, the report engine has been
    told that there is not enough space left to print on the page so you can't
    generate another detail band on the page. I don't think there are any more
    considerations, I'll have to construct a demo for something similar to this,
    using lookup data to create draw commands that are rotated.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.