1
votes

PB 11.5: Default printer is set to CutePDF; There are 4 printouts in a program. So changes have been made to create a separate file name by setting the document name with dataobject name plus time stamp like this: ls_filename = ads_datastore.DataObject + '_' String(Day(Today())) + '_' + String(Minute(Now())) + String(Second(Now()))

When in debug mode, this IS creating separate files names using tstamp as long since I have a breakpoint as it's printing the report (to PDF).
But when running it thru normall without debug, it is creating only 1 file. Here is the weird thing: i can see the 4 prompt screens showing me with 4 different file names. I click ok on all of them. When i go to explorer, I only see 1 file (the 1st one). but it contains data from last report.
any thoughts on why it's not keeping the proper file names and makeing them separate??

1
What does this have to do with Android? - CommonsWare
This question needs more detail, a little lost here - Caffeinated

1 Answers

1
votes

If you are getting data from the last report it almost certainly sounds like:

1.) The process is running quickly enough that all files are named in the same second, and over-written. Consider adding finer level of detail than seconds or add four separate naming identifiers (e.g. _rpt1, rpt2, etc.) for the four different reports so each report has a guaranteed unique name.