Home Datapipelines

Empty report

edited September 2002 in Datapipelines
Hello,

When I try to make a run time report, a empty report appears.
My form has:

TForm1 = class(TForm)
ppReport1: TppReport; // The component and its layout is created in
design time.
private
{ Private declarations }
epPipeline : TEasyPipeline; // Created in run time
end;

I set the DataPipeline property with epPipeline, after I created the
TppJITPipeline component.

procedure TForm1.formCreate(Sender: TObject);
begin
epPipeline := TEasyPipeline.Create(Self);

... // Here I create all the fields used in report and the InitialIndex and
RecordCount properties

ppReport1.DataPipeline := epPipeline;
end;

Whe I call ppReport.Print, an blank report appears.

Comments

  • edited September 2002
    What is a TEasyPipeline? What is the pipeline returning for data? Can you
    verify that it is returning records? Can you use a TppJITPipeline and
    retest? What is the OnGetFieldValue event handler returning? Can you
    compare you project to the main report demo project for non databased demos
    which also include JITPipeline examples?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    TEasyPipeline is an descendent from JITPipeline.
    It is returning records, when I set the DataPipeline like this:

    ppDBText3.DataPipeline := ppReport1.DataPipeline;

    I want to do something like this, but empty result occurs:

    //
    for iI := 0 to ppReport1.ComponentCount - 1 do
    begin
    if (ppReport1.Components[iI] is TppDBText) then
    TppDBText(ppReport1.Components[iI]).DataPipeline :=
    ppReport1.DataPipeline;
    end;
    //

    How can I resolve this problem ?

    Thanks
    Marina

  • edited September 2002
    You also need to assign the TppDBText.Datafield property. Does it all work
    if you create the report on a form and configure it all at design time, then
    run it? Is the record count property set on the pipeline?

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    The problem was resolved, I made this code, after create ppReport component
    and load the template from a file:

    for iI := 0 to ppReport1.Template.Root.ComponentCount - 1 do
    begin
    if (ppReport1.Template.Root.Components[iI] is TppDBText) then
    TppDBText(ppReport1.Template.Root.Components[iI]).DataPipeline :=
    ppReport1.DataPipeline;
    end;


    But I have other problem: The result is an unique record... The
    JITPipeline.RecordCount = 400 and JITPipeline.InitialIndex = 0.
    And now? How can I resolve this?

    Thanks
    Marina
  • edited September 2002
    What happens in the OnGetFieldValue event handler of the pipeline? This is
    where the records will need to be provided for the datapipeline. There are
    JIT demos in the main report demo directory which show how to use the JIT
    pipeline events.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.