Board index » delphi » Access Violation doing NewPage() in QuickReport

Access Violation doing NewPage() in QuickReport

G'day,

I am trying to manually add extra labels to a Quick Report (C++ Builder 5).

Sometimes I need to add so many labels that they need to go onto the next
page.
But I can't find a way of throwing a new page and writing to that.

Putting labels in positions beyond the bottom of the current page means that
the labels don't show, but that doesn't seem to force a new page.
Calls to NewColumn() doesn't seem to give me a new page or a new column.
Calls to NewPage() give me an Access Violation error message.

Any suggestions greatfully received.

doug

 

Re:Access Violation doing NewPage() in QuickReport


Hi Doug,

I haven't had this specific error, perhaps you could give us a sample of the
code you would use to do this?  Add in a few lines either side because the
problem may be elsewhere but only become apparent at the NewPage() call.

I know it isn't very elegant but QR has a component called
QRCompositeReport, maybe you could use this to join together a few one page
reports to get the same result as a multipage report?

Maybe someone else has more information on your error and can help you more
than I can.

Regards
Trevor.

Quote
"dug" <doug.b...@laseranalysis.com> wrote in message

news:3d73fb6d$1@newsgroups.borland.com...
G'day,

I am trying to manually add extra labels to a Quick Report (C++ Builder 5).

Sometimes I need to add so many labels that they need to go onto the next
page.
But I can't find a way of throwing a new page and writing to that.

Putting labels in positions beyond the bottom of the current page means that
the labels don't show, but that doesn't seem to force a new page.
Calls to NewColumn() doesn't seem to give me a new page or a new column.
Calls to NewPage() give me an Access Violation error message.

Any suggestions greatfully received.

doug

Re:Access Violation doing NewPage() in QuickReport


Dug.

It sounds to me like you are trying to build the report page by page before
it prints rather than "as" it prints.

You should only be formatting 1 label only, and let quickreports handle when
it needs a new page.

Does that make sense?  I just can't understand why you would ever want to
add a new page manually in a batch label print unless the layout of the
second page was to be different to the first - in which case - you can't.

Cheerio

Josh

Other Threads