For Programmers: Free Programming Magazines  


Home > Archive > Clarion > December 2004 > Re: Counting the number of times a report is previewed and the number









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Counting the number of times a report is previewed and the number
John E Singer

2004-12-14, 3:55 pm


>Their application has to count the number of times :-
>- Each report is previewed to the screen,
>

Make preview mandatory. Then you know every time it is run it has been
previewed.

>- The number of times the report is actually sent to a printer.
>

I don't think this can be done with the standard Clarion report
previewer since I never use it. If you just want to know if the report
printed, CPCS or IceTips Print Previewer can tell you that. If you want
to know if they printed and how many pages they printed, IceTips does a
great job of that. Of course both of these are 3rd party solutions that
cost extra. I don't think you would be disapointed with either.

>
>The count is to be recorded in a log with date,time, user, report name
>etc.
>
>I am thinking of making two copies of each report. One that can only
>preview and the other that can only print to the printer. Then
>counting once when either one is run. This means a parameter for every
>report procedure to say which mode it is in.
>
>Is there an easier way to get the count I require?
>
>Is there any way to tell when a report has been printed from a
>preview?
>
>
>Any help would be appreciated.
>
>


--

John E Singer
CIS, Inc

Kasper G. Christensen

2004-12-15, 3:55 am

>> - The number of times the report is actually sent to a printer.
> I don't think this can be done with the standard Clarion report
> previewer since I never use it. <snip>

Well, from using the standard ABC Clarion report previewer
(PrintPreviewClass) with a handcoded report, I remember doing something
like:

If Previewer.someMethodThatShowsThePreview()
!Print the report
End

I guess the template is doing something like that, so it should be
possible to find out if the report is printed. I doesn't remeber the
correct method-name of the previwer, and can't check it out right now.
But check the preview-class documentation, and then search the generated
source to find the right embed.

That said, you must remeber that sending something to the printer
doesn't guarantee that it is actually printed: There could be a
paper-jam, the printer could be out of toner, some user or administrator
could remove the job from the printer-queue, and so on.

Best regards

Kasper

--
Besøg mig på nettet: http://www.kaspershjemmeside.dk
Kasper G. Christensen

2004-12-17, 8:55 am

>> - The number of times the report is actually sent to a printer.
> I don't think this can be done with the standard Clarion report
> previewer since I never use it. <snip>

Well, from using the standard ABC Clarion report previewer
(PrintPreviewClass) with a handcoded report, I remember doing something
like:

If Previewer.someMethodThatShowsThePreview()
!Print the report
End

I guess the template is doing something like that, so it should be
possible to find out if the report is printed. I doesn't remeber the
correct method-name of the previwer, and can't check it out right now.
But check the preview-class documentation, and then search the generated
source to find the right embed.

That said, you must remeber that sending something to the printer
doesn't guarantee that it is actually printed: There could be a
paper-jam, the printer could be out of toner, some user or administrator
could remove the job from the printer-queue, and so on.

Best regards

Kasper

--
Besøg mig på nettet: http://www.kaspershjemmeside.dk
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com