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

JIT Pipeline not moving Records

edited December 2005 in General
I am trying to use a JIT pipeline to provide the data from a grid that has
been preloaded with information. However, the data never gets displayed for
all the records. The appropriate number of detail bands are printed (as
evidenced by some lines that are also printed) but the RecordIndex property
never changes. And yes, I have set the RecordCount.

I have seen several posts about this and read them all.. I looked it up on
Tamaracka and still no avail. I have copied directly from the samples but I
am still stuck with this.

Thanks in Advance,
Trevor

Comments

  • edited December 2005

    1. Check that the Report.DataPipeline property is assigned to the
    JITPipeline. When the Report generates it will traverse the datapipeline to
    which it is assigned using method calls such as First, Next, etc. Internally
    the JITPipeline will increment its RecordIndex property.

    2. There is a JITPipeline tutorial in the Developers Guide

    3. There are some JITPipeline examples installed with the demos. Run
    RBuilder\Demos\Reports\Demo.dpr and check out the 'no database' section.
    There are examples there - including an example of printing from a grid.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2005
    I found that if I supply and Event Handler for the OnCheckEOF event, then
    the JITPipeline doesnt move positions.

    Perhaps there is a way around this. The report prints the data from a grid
    can only fit in about 8 or 9 "columns" of information in landscape.
    However, the grid can often contain 10+ columns. What I am trying to get it
    to do is to print the information from the first 9 columns and then (in the
    OnCheckEOF is where i thought) go back to the beginning of the report and
    have it run through all the records for the remaining columns. My
    OnGetFieldValue takes care of returning the proper information for the
    "column" that it is on. Basically I need it to run through the data 2 or 3
    times (but not a fixed number of times because the number of columns in the
    grid is not fixed either)

    Thanks in Advance,
    Trevor

  • edited December 2005

    1. What you are describing is a spreadsheet style report. The following
    example shows how to generate a spreadsheet style subreport using
    ReportBuilder. (It is not JITPipeline based, but the type of pipeline is
    irrelevant. The Report.DataPipeline proeprty is of type TppDataPipeline -
    the report engine never knows the specific descendant class type being
    used)

    www.digital-metaphors.com/tips/SpreadSheetStyleReport.zip

    2. A report will traverse the datapipeline from first to last. Once it
    encounters EOF, then it will consider that to the end of the data. No
    further traversals will take place. Thus implementing OnCheckEOF will not
    help.





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2005
    Link no worky.

    Trevor


  • edited December 2005

    Oops. Ok try it again...




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2006
    Thanks for posting that example. However it still seems that that method
    works best with a known number of columns. The problem that I had was that
    the number of columns could vary from 2 to 50 and even more. I suppose
    there is a way I could just add subreports and copy the contents from a
    master subreport to duplicate the first part as many times as I need.

    Instead I just multiplied the number of records by the calculated number of
    times that I was going to have to loop through the data and then
    extrapolated which column and record number i was really on. It seems to
    work fine like that.

    Only thing left is to mention that when you set an OnCheckEOF event handler
    on the JITPipeline the record number on the pipeline never moves.

    Thanks again.
    Trevor


  • edited January 2006

    In my testing here the CheckEOF event works correctly. As a simple example,
    open the RBuilder\Demos\Reports.dpr project and modify demo 137 (dm137.pas)
    as follows:

    function Tfrm0137.ppJITPipeline1CheckEOF: Boolean;
    begin
    Result := ppJitPipeline1.RecordIndex >= ppJitPipeline1.RecordCount-1;
    end;

    You can also check out the source code to the JITPipeline (ppDBJIT.pas).




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.