Gary Ellch
2008-04-26 02:33:05 UTC
I have a report and part of it is an address. There are USA addresses with 2 address lines and USA addresses with 1 address line. There are also International addresses with 2 address lines and International addresses with 1 addressw line. In delphi I can figure out which kind of address to use and I send a parameter indicating that. I have a mirror section for the different addresss types. (The report is a 1 page letter)
I am trying to figure out a way to have hundreds of these print but i don't know how without executing the report 1 at a time and setting the parameters before i execute it.
I am using Delphi 2006 and rave 7.02 Here is the code I am using.
while not qrydmselectRecsToprint.Eof do
begin
if (((qrydmselectRecsToprint.FieldByName('Address2').isnull) or
(qrydmselectRecsToprint.FieldByName('Address2').value= '')) and
((qrydmselectRecsToprint.FieldByName('Address3').isnull) or
(qrydmselectRecsToprint.FieldByName('Address3').value= ''))) then
datamodule1.RvCertifications.setparam('Addrtype','A1')
else if ((qrydmselectRecsToprint.FieldByName('Address3').isnull) or
(qrydmselectRecsToprint.FieldByName('Address3').value= '')) then
datamodule1.RvCertifications.setparam('Addrtype','A2')
else
datamodule1.RvCertifications.setparam('Addrtype','I1');
if ((qrydmselectRecsToprint.fieldByname('expiration_date').isNull) or
(qrydmselectRecsToprint.fieldByname('expiration_date').asString = '')) then
datamodule1.RvCertifications.setparam('Issued', 'Issued ' + qrydmselectRecsToprint.fieldByname('ending_date').asString)
else
datamodule1.RvCertifications.setparam('Issued', 'Expires ' + qrydmselectRecsToprint.fieldByname('expiration_date').asString);
datamodule1.RvCertifications.ExecuteReport('BPcertCards');
I am trying to figure out a way to have hundreds of these print but i don't know how without executing the report 1 at a time and setting the parameters before i execute it.
I am using Delphi 2006 and rave 7.02 Here is the code I am using.
while not qrydmselectRecsToprint.Eof do
begin
if (((qrydmselectRecsToprint.FieldByName('Address2').isnull) or
(qrydmselectRecsToprint.FieldByName('Address2').value= '')) and
((qrydmselectRecsToprint.FieldByName('Address3').isnull) or
(qrydmselectRecsToprint.FieldByName('Address3').value= ''))) then
datamodule1.RvCertifications.setparam('Addrtype','A1')
else if ((qrydmselectRecsToprint.FieldByName('Address3').isnull) or
(qrydmselectRecsToprint.FieldByName('Address3').value= '')) then
datamodule1.RvCertifications.setparam('Addrtype','A2')
else
datamodule1.RvCertifications.setparam('Addrtype','I1');
if ((qrydmselectRecsToprint.fieldByname('expiration_date').isNull) or
(qrydmselectRecsToprint.fieldByname('expiration_date').asString = '')) then
datamodule1.RvCertifications.setparam('Issued', 'Issued ' + qrydmselectRecsToprint.fieldByname('ending_date').asString)
else
datamodule1.RvCertifications.setparam('Issued', 'Expires ' + qrydmselectRecsToprint.fieldByname('expiration_date').asString);
datamodule1.RvCertifications.ExecuteReport('BPcertCards');