Print to CSV File
When printing a report, if you select the print to file checkbox, you
can print an export to a csv file. In order for this to work, you need
to edit a report, go into the file menu and setup the Print to file
setup and pick the fields you want to show up in the csv file.
Is there a way when the user selects print to file, and selects csv file
(instead of pdf for example), if there is nothing setup in the print to
file setup to display a message to the user that nothing has been setup
instead of just printing a blank csv file?
can print an export to a csv file. In order for this to work, you need
to edit a report, go into the file menu and setup the Print to file
setup and pick the fields you want to show up in the csv file.
Is there a way when the user selects print to file, and selects csv file
(instead of pdf for example), if there is nothing setup in the print to
file setup to display a message to the user that nothing has been setup
instead of just printing a blank csv file?
This discussion has been closed.
Comments
The TextFileDevice uses the TppBand.Save and TppComponent.Save properties to
determine what is exported to the file. Before the report prints, you could
loop through each band, and/or component and be sure at least one Save
property is set to True. If not, you can display a message and cancel th
report. See the article below on looping through a report.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com