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

to print reports not connected a DataSet?

edited October 2002 in General
hello

In QuickReport he/she does have an event OnNeedData, where can you print
reports without it is connected to a DataSet, is there as also doing that in
ReportBuild?

Thank you

Ivan

Comments

  • edited October 2002
    Hi Ivan,


    Printing Reports without a Database
    -----------------------------------

    There are two components in ReportBuilder you can use to access data
    from
    sources other than a database: TppTextPipeline, TppJITPipeline. There is
    a section in the DemosReports\demo.dpr project that contains example
    reports using these two components.

    1. TextPipeline

    You can use the TextPipeline to print from ASCII files (comma-delimeted,
    tab delimeted, fixed-length etc.) There is also a demo of dynamically
    creating a text file and then printing from it. When you create a
    TppTextPipeline at design-time you can double-click on the component and
    use the Fields editor to define the fields in the ASCII file. Once you
    configure everthing you can connect a TppReport to the TextPipeline and
    the Fields that you defined can be used just like database fields. You
    can place a TppDBText on the report and select from the field from the
    list box. You can also create fields at run-time in code by the
    DefineField
    method.

    2. JITPipeline

    The JITPipeline (Just In Time = JIT) can be used to print data from
    arrays, grids or other objects. Similar to the TextPipeline, you
    double-click to access the Fields editor and define the fields that will
    be used in the report designer. But whereas the TextPipeline handles the
    data-access for you, with the JITPipeline you code event-handlers to
    control all data-access yourself. So the JITPipeline is a custom
    pipeilne you control via events. In the Demo.dpr app there is an example
    of this.

    3. Custom Pipeline

    You can also code TppDataPipeline descendants. TppBDEPipeline,
    TppJITPipeline, TppTextPipeline all descend from TppDataPipeline.
    We have customers with proprietary databases that have coded custom
    pipelines,
    for example one customer coded a CTreePipeline to access that product.
    Once he completed this task, he could use that component in all his
    reports without changing the source code to ReportBuilder at all.



    HTH,
    Chris Ueberall;
This discussion has been closed.