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

Pushing data to a report in code

edited July 2002 in General
I am converting an existing application that uses another (unnamed)
reporting engine to using ReportBuilder. To start with I want RB to work in
the same way as the existing reporting engine. I know this will severely
limit the features offered by RB, but it will get me up and running quickly,
provide access to output devices and the visual designer.

The main difference seems to be the way in which data gets to the report.
RB appears to pull the data from the pipeline or an OnGetText event, whereas
the existing system gets the data pushed from another source.

Currently the details line is built dynamically in code
e.g.
Column 1, Column 2, ..., Column n

every value from the data source fires an event with a 'Here's the value for
Column 1', then Column 2 and so on etc.

At the end of a line I get another event fired at this point I would like to
tell RB create me a new detail line. And then carry on as before.

I have tried hooking the report up to a JIT pipeline, and call next on the
pipeline to create a new row. This does indeed create a new row for each
record in the data source, however every detail line then has the same
values (which happens to be the values of the last row in the data source).

Is there a 'NewDetailRow' method or something to achieve the same?

Can RB be used in this way?

Any help appreciated,

Jon

Comments

  • edited July 2002
    don't know how to do what you want, but an idea:
    How about using an in memry ClientDataSet, fill it with the data as you want
    (Insert, assign values, post). And then just open the RB report with the already
    filled ClientDataSet?
    In that way you have the best of both approachs: filling the datat manually and
    all the power of RB working over the ClientDataSet.
    bye

This discussion has been closed.