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

change height of detailband at runtime

edited June 2003 in General
Hi everybody,

I am a beginner with report builder (using Version 6.03 together with
Delphi 5 Enterprise).

I have a report with one detailband and 2 groups. There is one row of
data at the top. The problem is, I have 5 additional fields (numeric
values) which must be printed below this first row. e.g.

Field1 field2 field3...
NumericField1
NumericField2
NumericField3
NumericField4
NumericField5

I tried to set the height in the BeforePrint event of the detailband
and set it back to the full height in the AfterPrint event. I can't get
it to work properly :-( The strange thing is, when I preview the report
the first detailband at first displays correctly with 2 NumericFields
but at the end of the report generation the first detailband gets
resized to just displaying the first row and the other fields are
printed over the first row.

I hope I explained my problem well enough to understand and maybe
somebody can give me an advice on how to print my report correctly.

regards
Hans

Comments

  • edited June 2003
    Hans,

    Try placing a subreport under the first row and put the numeric fields
    inside. Are these numeric fields records in you dataset? Please send an
    example to support@digital-metaphors.com if you still cannot find a
    solution, and we will work on one for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2003
    Nico Cizik (Digital Metaphors) wrote:


    Just to clarify: All the fields I am talking about are in the same one
    record. If the db was designed better, I should have a master-detail
    relation with the numeric fields in a detail-table. Unfortunately, the
    designer of the db added this fields to the same table and I cannot
    change the db structure. Should I go ahead and try it with the
    subreport? - I'll report my results on Tuesday morning.

    Have a nice weekend, thanks for your answer
    Hans
  • edited June 2003
    Hans,

    Since you are only using one dataset, you should not have to use a
    Master-Detail style report. You should be able to use a simple grouped
    report with all your information in the detail band. If this proves not
    possible, you may have to use a subreport and link the master and detail by
    contriving a Master and a Detail dataset based on the same table. Then you
    would place the subreport with the numeric fields into the detail band below
    the initial detail fields so they will traverse and print in the correct
    place.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.