Printing Status
Hello there,
How do we know whether the user has printed the report or they just see it
on the screen and close the preview screen.
I want to use the status to update the file if the user has actually printed
the report.
On the other hand if user just preview it on the screen and close it, the
file will not be updated.
Thanks for your helps.
How do we know whether the user has printed the report or they just see it
on the screen and close the preview screen.
I want to use the status to update the file if the user has actually printed
the report.
On the other hand if user just preview it on the screen and close it, the
file will not be updated.
Thanks for your helps.
This discussion has been closed.
Comments
Check in the 'AfterPrint' event for :
Report.PrinterDevice <> nil
regards,
Chris Ueberall;
If Report.DeviceType assign to Printer your solution working
However in my case Report.DeviceType assign to Screen,
User can preview the report on the screen,
If all data correct then we print them to the paper, otherwise we close
the preview without doing any printing to the paper.
How to capture the Printing Status ???
Printing status will be used to update the database.
If user only see it on the preview screen then the database will not be
updated.
Thanks in advance.
If Report.DeviceType assign to Printer your solution working
However in my case Report.DeviceType assign to Screen,
User can preview the report on the screen,
If all data correct then we print them to the paper, otherwise we close
the preview without doing any printing to the paper.
How to capture the Printing Status ???
Printing status will be used to update the database.
If user only see it on the preview screen then the database will not be
updated.
Thanks in advance.
Sorry, but I just implemented it in my own application the way I showed.
Shure, first you assigned 'dtScreen' as device, that's for previewing, but
when printing from preview is called, the 'PrinterDevice' is changed by
ReportBuilder code, the events are fired.
When you print from preview there should be two 'AfterPrint' events fired,
the first with 'PrinterDevice <> nil' and the second when you close the
preview 'PrinterDevice = nil'.
Have you tried to implement my suggestion?
regards,
Chris Ueberall;
see
So there is no update on my code since PrinterDevice = nil
Note: the AfterPrint event only fired one time, when user close the preview.
It does not fire when it has been printed to the paper.
my code:
if rpSheet.PrinterDevice <> nil then
UpdatePrintingStatus;
UpdatePrintingStatus routine will update my database.
Please advice ....
Thanks,
Place a 'ShowMessage' in the 'AfterPrint' event to be shure how often it is
called.
What RB version are you using.
Once again, the 'AfterPrint' event is called twice in my case.
regards,
Chris Ueberall;
preview.
but
fired,
close
be
just
It calls one time only, when we close the preview.
RB 5.0
may I encourage you to update to ReportBuilder version 5.56, it is free of
charge?
regards,
Chris Ueberall;
I can't see in DM web have download for patch !!
You will need to contact sales@digital-metaphors.com with your registration
information. They will be able to provide you with the upgrade information.
regards,
Chris Ueberall;