Another problem with Delphi3/QuickReport

Hi there,

I have an application written in Delphi3 that uses QuickReport for reporting. On the report I have a subdetailband with a headerband and a footerband. Sometimes the number of records in the dataset set as dataset for the band is so big that the subdetailband will print over 3 or more pages. Everytime this happens I get an exception of class EFCreateError "Cannot create file (and then 3 boxes for characters not showable)" and when I run again an exception class EInvalid Operation ""Canvas does not allow drawing". Itøs always happening during the call to Prepare like this:

MyForm.QuickRep1.prepare;  // this call creates the exceptions
MyForm.QuickRep1.QRPrinter.free;
MyForm.QuickRep1.QRPrinter := nil;

even if I leave out the call to prepare (which I donøt want to because I need it to show the total number of pages in the actual preview) and just call

MyForm.QuickRep1.Preview;

I get the same execptions. If the number of records so that the report only takes up two page, everything works fine.

UPDATE: Through Showmessages I've found out that the exception occurs after EndPage of page 2 and after Afterprint on the footerpand on page 2, but before the Startpage event for page 3 is fired.

Any ideas ?

take care
NetGeek
NetGeekAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NetGeekAuthor Commented:
Never mind, I found out that if I set the QuickRep1.Options[Compression] to true, the execptions don't occur :)

You can still earn the points if you can tell me how to get a headerband for a subdetailband to print again on every new page. On nthe headerbnad for the subdetailband i have the headlines for each column, and it looks like s.... to have the subdetailband continuing on the next page without the headlines.

take care
NetGeek
0
vadim_tiCommented:
create childband for pageheader band
copy / paste all labels from headerband to new band
delete your headerband

when you use prepare QR creates metafile in temporary directory
may be you have a problem with your windows temporary directory (too long name)
it is  a known issue with qr.
0
NetGeekAuthor Commented:
HI vadim, I think you answer was for my initial problem. If you read my second comment, you'll see that I found the solution myself. But please feel free to anser the second question ;)

take care
NetGeel
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

vadim_tiCommented:
it is for your second problem
   create childband for pageheader band
   copy / paste all labels from headerband to new band
   delete your headerband

your first problem will return to you if your report will be bigger

0
NetGeekAuthor Commented:
>> vadim

then I'm not sure I understand you correctly.

Say my Subdetailband is called DataBand, with HeaderBand property set to SubDetailBand1. Do you mean I should placve a ChildBand on the form, copy the content of SubDetailBand1 onto this new band, delete SubDetailBand1 and then set the HeaderBand property of DataBand to the name of the new band ?
0
vadim_tiCommented:
no

you place PageHeader band on the form, after it set its HasChild to true.
childband will be created,
after it paste/copy the content of SubDetailBand1 onto this new band, delete SubDetailBand1

no need in HeaderBand property
0
NetGeekAuthor Commented:
uhoh, I'm afraid I've left something out that I should have told from the start.

I already have a Pageheaderband on the report, with company details, pagenumber etc. Below that I have nine subdetailbands, grouped in three, where number 2 5 and 8 has 1 and 4 and 7 has headerbands (groupheader) and 3 and 6 and 9 as footerbands(groupfooters). Finally I have a pagefooterband. What I need to do is to get the groupheaderband of the group that causes the next page to display right after the pageheaderband, before the groupdetailband continues to print.

I hope this clarifies things, and I'm sorry for messing up things at first.
0
vadim_tiCommented:
Are you tried
ReprintOnNewPage GroupHeader property?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NetGeekAuthor Commented:
hmm, that would be nice, but working in Delphi3 i only got ForceNewPage, PrintBefore and PrintIfEmpty
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.