1
I’m having trouble printing a Non-financial coupon by Report Builder, not printing all order items, I am entering 52 products and this cutting in the sequence product 36.
Code:
dmRelatorios.cdsOrc.Active := False;
dmRelatorios.cdsOrc.Params.ParamByName('ECF_NUMERO').AsInteger := dmOperacao.cdsOrcECF_NUMERO.asInteger;
dmRelatorios.cdsOrc.Active := True;
dmRelatorios.cdsitOrc.Active := False;
dmRelatorios.cdsitOrc.Params.ParamByName('ECF_NUMERO').AsInteger := dmOperacao.cdsOrcECF_NUMERO.asInteger;
dmRelatorios.cdsitOrc.Active := True;
dmRelatorios.rptOrc.Template.FileName := strTemplateORCVENDA;
dmRelatorios.rptOrc.Template.LoadFromFile;
dmRelatorios.rptOrc.PrinterSetup.Copies := 1;
if strEscolheImpressoraORCVENDA = 'SIM' then
dmRelatorios.rptOrc.ShowPrintDialog := True
else
dmRelatorios.rptOrc.ShowPrintDialog := False;
if strTelaImpressoraORCVENDA = 'SIM' then
dmRelatorios.rptOrc.DeviceType := 'Screen'
else
dmRelatorios.rptOrc.DeviceType := 'Printer';
dmRelatorios.rptOrc.PrinterSetup.PrinterName := strImpressoraORCVENDA;
for i := 1 to StrToInt(strNUMCOPIAORCVENDA) do
begin
dmRelatorios.rptOrc.Print;
end;
To print the order items I am using a subReport
.
The problem is that it is not printing all the items from subReport
.
Could you clarify your question by putting information on how you’re putting it together... structure at last... I think it would help.
– Rafael Withoeft
Explain a little better the problem you are facing and if possible put some of your code.
– Math
What is the value of the variable
strNUMCOPIAORCVENDA
?– stderr
is strNUMCOPIAORCVENDA = 1
– user21916
So there’s not much logic in using it in a loop,
for i := 1 to StrToInt(strNUMCOPIAORCVENDA)...
. Ever tried to change theDeviceType
?– stderr
then you are only using this loop if the user wants to print more than one copy. I’m using Devicetype = 'Printer', because I’m printing the coupon on the Bematech MP-4200 TH printer.
– user21916