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

Problems Since upgrading to RB6 (GetSupreports)

edited July 2001 in General
I have just upgraded from RB5 to RB6 And have some problems with my
code:

SubReports := TStringlist.Create.
ppReportFromTreStruct.GetSubReports(SubReports);
MainChild:=TppChildReport(SubReports.Objects[SubReports.IndexOf('MainPage')]);

It worked under RB5 but now I get ListIndexOut of bounds.

Why? What do I have to change?

BR

Magnus

Comments

  • edited July 2001

    The GetSubreports method, load a TStrings with the subreport.Caption and
    the objects.

    Starting with RB 5.5x, the subreport caption contains the datapipeline
    username. Here is the code used by subreport.GetCaption.

    if (GetDataPipeline = nil) then
    Result := UserName + ': ' + 'No Data Pipeline Assigned
    else
    Result := UserName + ': ' + GetDataPipeline.UserName;







    Best regards,

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