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

HeaderBand.Height on childreports access violation

edited February 2013 in Subreports
Hello

I have a problem to set the height of a band in a childreport by coding.
My Code:

vppSubReport.CreateReport(FDruckReport);

vChildReport := TppChildReport(vppSubReport.Report);
vChildReport.DataPipeline : FDruckReport.GetDataPipeline('Behandlungen');


vChildReport.CreateDefaultBands;

vChildReport.HeaderBand.Height:= 7; // this point gives access violation

The problem is, that vppSubReport.Report is read only I think.

Has anybody an idea?

Thanks a lot for the help.

Regards
Christoph

Comments

  • edited February 2013
    Am 12.02.2013 21:43, schrieb Christoph Wälchli:

    I solved the problem. The tricky thing was, that CreateDefaultBAnds did
    not crate a HeaderBand!
  • edited February 2013
    Hi Christoph,

    Great, glad you got it solved.

    Note that Child style subreports do not support Header or Footer bands.
    This is the default style created so when CreateDefaultBands is
    called, the header and footer are not created.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.