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

Getting ppSubReport

edited April 2003 in General
Hi,

At run time I want to get access to the ppSubReport component. At the moment
I am doing it as follows:

if FppReport.ObjectByName(iBand,iComponentIndex, 'ppSubReportDetail') then

TppSubReport(FppReport.Bands[iBand].Objects[iComponentIndex]).DataPipeLine
:= FppDBPipeLineForDetailData;

Is it possbile to get access to ppSubReportDetail without using this string?


Thanks in advance
Sham.

Comments

  • edited April 2003
    Both of the following will find sub reports

    for I := 0 to ppReport1.BandCount - 1 do // Iterate
    for j := 0 to ppReport1.Bands[I].ObjectCount - 1 do
    if ppReport1.Bands[I].Objects[J] is TppSubReport then
    begin
    //found sub report
    end; // forCount - 1 do // Iterate

    for I := 0 to ComponentCount - 1 do // Iterate
    if Components[I] is TppSubReport then
    begin
    //found sub report

    end; // for


    --
    Ed Dressel
    Team DM
This discussion has been closed.