Home General

Regarding the use of multiple detail bands in a single report.

edited July 2001 in General
Hi all.

The following is a VERY simplified version of what I want to achieve.

The customer has an application which produces a plain text CSV file like
...

Value 1, Show Detail 1, Value 2, Show Detail 2, Value 3, Show Detail 3

Each "Show Detail" relates to a different physical layout within the report.

So.

A file like this

1,Yes,2,Yes,3,Yes

would produce a report like ...

Header
1
2
3
Footer

A file like ...

1,No,2,Yes,3,Yes

would produce a report like ...

Header
2
3
Footer

The data is possible to organise as transactions but there is no correlation
between 1 detail band and another. Each detail band contains different
calculations and layout, though there are totals produced.

If I can organise the data into transactions, I can include the band
information (so it only shows one band), but I cannot see how to add
multiple detail bands to a single report. I do not know if sub-reports is
suitable or applicable in this instance.

I did notice that by going into the D5 form and "View form as text", I could
add another detail band. When I reverted back to the designer, I had 2
detail bands.

So.

I am using Delphi 5 with RBE 5.5. I am happy using the Text Pipeline as the
data source. The end result is currently holding just under 1000 different
values, split into 8 blocks with a total of around 60 different detail band
layouts.

Any suggestions, observations or questions would be greatly appreciated.

Regards,

Richard Quadling.
Carval Computing.

Comments

  • edited July 2001
    Hi,

  • edited July 2001
    Can I do the sub-reporting loading in RAP?

    The program that will be printing the report does NOT have any real logic in
    it. It simply loads rtm files and sets the pipelines.

    It currently handles about 10 different RTM files. I want to be able to give
    them another RTM file (or multiple RTM files I suppose for Sub-Reports) and
    the program can assign the text pipelines and print or preview the report.

    It is the report that does all the work.

    If I can load the sub-reports via RAP, how do I?

    I have a single plain text CSV file. I am going to have multiple lines. Each
    line contains the name of the detail type (I suppose this is the sub-report
    name too) and the values for that detail. There is also settings to control
    the background colours of some of the values as they indicate things like
    Plain (white), Good (Green), Warning (Yellow), Bad (Red), Total (Blue). I
    think I can handle the colours using RAP.

    Anything else?

  • edited July 2001
    Adding multiple detail bands in the dfm should not be attempted.

    There is a dynamic subreport loading demo in the RBuilder installation in
    the EndUser directory, which shows how to use one report template which can
    be used to represent a band in multple reports. This way, only one report
    needs to be modified, and the result will affect all of the reports in which
    it is loaded into a subreport.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited July 2001
    The method I am using is to have a main report with a single detail band
    (thanks for the warning!) containing several different sub-reports.

    The sub-reports are only ever 1 detail line. Not really complete reports.

    By using RAP in the BeforePrint event of the detail band, I can set which
    ever sub-report I want to visible and the rest to invisible. This seems to
    work so far.

    Regards,

    Richard.

This discussion has been closed.