lizzzard
asked on
Yet Another QReportQuestion - CompositeReport..
Hi,
I was trying to make a Composite report of two reports, but it doesn't print anything.. not even in preview.. I gues I'm doing smth wrong..
Besides, how do I know in front how many pages a report is going to be?
Can anybody give me a code example?
Thanks,
Lizzzard
I was trying to make a Composite report of two reports, but it doesn't print anything.. not even in preview.. I gues I'm doing smth wrong..
Besides, how do I know in front how many pages a report is going to be?
Can anybody give me a code example?
Thanks,
Lizzzard
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi, Zif,
Which version and edition are you working with??
Which version and edition are you working with??
D4/D5 and latest QR.
Doesn't it work?
Doesn't it work?
ASKER
Nope...
TotalPages := QuickRep1.QRPrnter.PageCou nt;
gives me wrong number of pages. Lookes like the
pagelength differs from this method in relation to the print method of the report. Besides I dont have a qrsPageCount..
I'm using D5, with QReport that comes with Delphi.
Do you have professional?
TotalPages := QuickRep1.QRPrnter.PageCou
gives me wrong number of pages. Lookes like the
pagelength differs from this method in relation to the print method of the report. Besides I dont have a qrsPageCount..
I'm using D5, with QReport that comes with Delphi.
Do you have professional?
ASKER
This is my first time I have to make smething with qreport (you already guessed huh?) and the project has to be finished soon, so I don't have too much time to sort it all out. A position I certainly don't like to be in...
But have you first prepared the report, before you checked the pagecount?
I've Enterprise version of D5.
argh, it was qrsPageNumber. Oops sorry.
I've Enterprise version of D5.
argh, it was qrsPageNumber. Oops sorry.
ASKER
Hm...
I used Prepare.. yes.. But sometimes the number of pages just isn't right. Most of the time one less than it really is...
Strange....
I thought it had to be PageNumber, but it didn;t work, so I thought maybe you had another version...
Still. I'm up sh*t creek...
I used Prepare.. yes.. But sometimes the number of pages just isn't right. Most of the time one less than it really is...
Strange....
I thought it had to be PageNumber, but it didn;t work, so I thought maybe you had another version...
Still. I'm up sh*t creek...
yes strange indeed.
mmmm, well you've a PageNumber... this is at QuickRep1.PageNumber. (this is at record generation).
It's funny, but it looks like this property contains the latest PageNumber (after Prepare)... I tested it and it seems to give the correct amount of pages (=is last PageNumber).
What does it in your application?
Zif.
It's funny, but it looks like this property contains the latest PageNumber (after Prepare)... I tested it and it seems to give the correct amount of pages (=is last PageNumber).
What does it in your application?
Zif.
ASKER
Hi, Zif..
Thanks for your time..
After prepare,PageNumber just gives me one page too less. When I print it or preview it, there's one page extra. I did a QuickRep1.QRPrnter.Preview and noticed that there was more data on a page... However, I don´t like to mess around with the paper length, because it ought to be right.. just A4..
What do you suggest?
Lizzz...
Thanks for your time..
After prepare,PageNumber just gives me one page too less. When I print it or preview it, there's one page extra. I did a QuickRep1.QRPrnter.Preview
What do you suggest?
Lizzz...
uck!
ASKER
Thanks! I'll try that...
lizzard,
what happens if you explecitely set the paperlength (in source code) before calling prepare?
Zif.
what happens if you explecitely set the paperlength (in source code) before calling prepare?
Zif.
ASKER
Hi,
Thanks for your help on this Zif and sorry you haven't heard from me in awhile.. but you know busy...busy..
Anyway, after all I solved this problem by setting the papersize to A4 every time it's printed, What the f**k is going on why I have do do this...
Anyway.. it's solved now..
Thanks again,
Regards,
Lizzz.....SSSSSSSSSSSsssss ssssssssss ss........ .
Thanks for your help on this Zif and sorry you haven't heard from me in awhile.. but you know busy...busy..
Anyway, after all I solved this problem by setting the papersize to A4 every time it's printed, What the f**k is going on why I have do do this...
Anyway.. it's solved now..
Thanks again,
Regards,
Lizzz.....SSSSSSSSSSSsssss
Hi lizzard,
from my experience QR isn't that very good, however it's also the only reporting tool I've used, so I don't know how other reporting tools are.
Zif.
from my experience QR isn't that very good, however it's also the only reporting tool I've used, so I don't know how other reporting tools are.
Zif.
Thus in the AddReports event of the Composite Report component you add your Quickreports, eg.
procedure TfrmQR3Demo.QRCompositeRep
begin
// The OnAddReports event is called by the CompositeReport
// to add the reports to list of reports
with QRCompositeReport1.Reports
begin
Add(frmMasterDetail.QuickR
Add(frmBasicMD.QuickRep1);
Add(frmImageRpt.QuickRep1)
end;
end;
Preview/Print it like
QRCompositeReport1.Preview
QRCompositeReport1.print;
This is the example of QR itself. I've one at my work also. Also note that the composite report only works on preview and printing (not exporting to html,...)
Zif.