Quick Report Delphi 2007
Thanks but I think I did not explain myself sufficiently good. What I need is the following. Group Header qrlColumn1 qrlColumn2 qrlColumn3 Detail Band qrlValueCol1 qrlValueCol2 qrlValueCol3 qrlValueCol1 qrlValueCol2 qrlValueCol3 qrlValueCol1 qrlValueCol2 qrlValueCol3 qrlValueCol1 qrlValueCol2 qrlValueCol3. Group Footer (Totals) qrlTotalCol1 qrlTotalCol2 qrlTotalCol3 Column3 contains numeric values which may be 0. If all the values in column3 are 0 then all the column (or the column header qrlColumn3) should not be visible. I tried to enable/disable before printing of the group footer. Groupfooterbeforeprint if qrlCol4Total.Value = 0 then qrlColumn3.Enabled:= False else qrlColumn3.Enabled:= True; end; This will work only on the next page if available because the value of qrlColumn3 is already printed.
A Database there. I am believing that my only way around this is to calculate the total of colum3 prior printing the groupheader columns. Get Windows Installer Service here. Thanks, Joseph 'Christian-Klopfer' writes.
Quote This will work only on the next page if available because the value of qrlColumn3 is already printed. I am believing that my only way around this is to calculate the total of colum3 prior printing the groupheader columns. One more option is first to prepare report, save somewhere (tstringlist?) values for groups where sum(group)=0 and the print it, using saved info for enabling/disabling labels. Or if you're using sql for data acccess, you could create second sql with group by using the same gouping as report. This way you will need to advance this query whenever you get new group in qreport. Good thing with qreports, is that it is flexible enough to do lot of 'dirty' tricks, bad thing is that you have to do this for all non-trivial reports.
New forum intended for Quickreport developers to share their insights, problems and news. Delphi 2007 and C++ Builder 2007.
Using Delphi 5.0. Issue with printing quick reports. Here is the basic piece of code if SizeSearchReport. Labyrinth Of Lies here. printDial og1.Execut e then begin SizeSearchReport.QuickRep1.PrinterSe ttings.Pri nterIndex:= printer.printerindex; Printer.Refresh; SizeSearchReport.QuickRep1.Print; Printer.Refresh; end; I can never get it to print to the default printer, tray 2 of the printer on USB Port 003.
It will however print to any other printer I select. If i select the default printer it always prints to tray 1 of the same printer on USB Port 003. Tray 2 is the default, not tray 1.
There are 5 printers that I can print to including fax driver and a pdf generator. The reports print to the correct printer except for the dual tray printer, where it always prints to tray 1 regardless of whether I select tray 1 or tray 2 in the print dialogue. I have also tried bypassing the printer dialogue by setting the printerindex to -1. The reports still print to tray 1 (not the default). All other applications print correctly to the default printer (tray 2) or whatever alternative printer I select, so it isn't an issue with the printer setup. I have a suspicion that it may be something to do with the dual tray printer being set up on one virtual printer port USB003, but this doesn't seem to affect any other program that I print from.
As I have explained, it is not a printer issue. The Delphi program is the only program that won't print to the default printer, so it must be an issue either with the code presented above or the way Delphi handles printing. It is a bit obscure, as not too many people would have dual tray printers with the second tray being the default. Need help from someone who is able to duplicate the issue, or who can see a problem with my code, or who understands how Delphi printer handling may differ from that of regular programs.
I tend to think that I am missing something from my coding. I can also add to this. Regarding the dual tray printer in question Tray 2 is the default printer on the system and is PrinterIndex 2 Tray 1 is PrinterIndex 1. I have tested the results from the PrintDialog1 and it is setting the correct printer index. Hardcoding PrinterIndex as 2 still prints to printer 1. Hardcoding as PrinterIndex = 1 also prints correctly to printer 1.