printing a second copy of certain pages of a report without data fields
we have a case where certain pages of a report (which unfortunately
won't be determined until the actual running of a report) that needs to
print the same page again - printing only certain text information not
the dollar amounts. i didn't think this would be possible so i have
convinced the powers that are that i can make a second pass after the
report printing is complete with a different query to reprint the pages
that need this "corrected" page (again a page with just the name but no
dollar amounts).
we have 25 report templates that run as subreports - with several
different dollar fields on each. is there an easy/simple way to
disconnect the dollar fields so i can use the same report template?
the second query just contains the common name / address information and
no dollar amounts - but this obviously generates errors.
i cannot seem to think of an easy straight forward method to disconnect
those fields at run time - without having to know the name of the
datafield, etc.
any suggestions?
thanks!
-martha
example
page 1 name 1 $100 $200 $300
page 2 name 2 $100
page 3 name 2 $0 $0 correction
page 4 name 3 $100 $200
or with pass after first report completes
page 1 name 1 $100 $200 $300
page 2 name 2 $100
page 3 name 3 $100 $200
page 1 name 2 $0 $0 correction
won't be determined until the actual running of a report) that needs to
print the same page again - printing only certain text information not
the dollar amounts. i didn't think this would be possible so i have
convinced the powers that are that i can make a second pass after the
report printing is complete with a different query to reprint the pages
that need this "corrected" page (again a page with just the name but no
dollar amounts).
we have 25 report templates that run as subreports - with several
different dollar fields on each. is there an easy/simple way to
disconnect the dollar fields so i can use the same report template?
the second query just contains the common name / address information and
no dollar amounts - but this obviously generates errors.
i cannot seem to think of an easy straight forward method to disconnect
those fields at run time - without having to know the name of the
datafield, etc.
any suggestions?
thanks!
-martha
example
page 1 name 1 $100 $200 $300
page 2 name 2 $100
page 3 name 2 $0 $0 correction
page 4 name 3 $100 $200
or with pass after first report completes
page 1 name 1 $100 $200 $300
page 2 name 2 $100
page 3 name 3 $100 $200
page 1 name 2 $0 $0 correction
This discussion has been closed.
Comments
What errors are you receiving? As far as I know, when a data-aware
component is pointing toward a field that does not exist, it simply prints
blank.
My first suggestion would be to make a list of the field names for the
changed query you are using and perhaps store these names in an in-memory
object such as a TStringList. Then once the template is loaded, loop
through each component in your report and if the report object is data aware
and does not match any of the names in the list, set its DataPipeline
property to nil (disconnecting the component).
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com