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

Unable to set TppSubreport.printbehavior at run time

edited January 2004 in Subreports
When I try to set the PrintBehavior of a TppSubReport in code I get the
error message:

"Undeclared identifier"

The Object Inspector has it as a property...

Is there some other way I should be setting this in code?

Here's my code sample:

With TppSubReport.Create(self) Do begin
{Add the report to the main report's detail band}
Band := vFlyer.DetailBand;

PrintBehavior := pbSection;

end; //With Sub Report

Any help would be appreciated.

Comments

  • edited January 2004
    The following line has the same error message:

    vFlyer.DetailBand.PrintHeight := phDynamic;

    vFlyer is a TppReport. I have a feeling these two problems are related,
    somehow.

  • edited January 2004


    Add ppTypes to the uses clause.


    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2004
    I'm finding that any property I try to set in code that is of a non
    standard type (like string or integer) gives me the undefined error. It
    seems like it's looking for a unit that I don't have in my "Uses"
    clause. I can't seem to find in the help files what that unit is.
  • edited January 2004
    Heh, talk about timing. That worked. Much thanks.

  • edited January 2004

    The enumerated types in ReportBuilder are defined in the ppTypes unit.

    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

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