Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return Whether Report Printed
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00521016
Message ID:
00609865
Vues:
18
>Hi Nadya,
>
>I don't know of any other way other than to add an On Exit expression to the Summary band of each report.

Hi Cathy,

I've checked the logic of our Reporter application. It has a UDF called ReptRun.

In this function the private variable is declared:
abortprt = .f. && output not yet aborted

So, my report should somehow set this flag to true, if report was canceled. The only way I see is to set it to .t. in Report's Title and reset back to .f. in Summary, which seems complicated...

I'll think more about this option lately...

To retrofit 100 reports, I'd suggest you write a small program that opens the FRX file of each report and either adds a Summary band record with the correct On Exit express or finds the existing Summary Band record and modifies it. Of course, if a Summary band already has an On Exit expression, you'll have to decide how to merge the new expression with the old expression.
>
>Probably the easiest way to figure out what to add is to create a dummy report, add a Summary Band and then put the On Exit expression in it. Use that record as your guide for doing the rest of the reports. If I remember right, Summary bands have an objtype of 9, an objcode of 8 and the On Exit expression is stored in the TAG2 field.
>
>Cathy
>
>>Hi Cathy,
>>
>>Do you know any other ways to make determinition, if user cancel Printing dialog, without modification of report?
>>
>>Or is there a way to automatically insert this function into each report (say, more than 100 reports)?
>>
>>Currently we're using special Reporter application, which runs our reports. It doesn't return failure status in case, when user cancel printing or if report contains some errors (I'm not sure, they are trappable, and this is unfortunate). Anyway, I believe, at least in case of termination of report's printing, the status of the job should be set to "I" (incomplete).
>>
>>Thanks a lot in advance.
>>
>>>>Is there a way to determine whether the user actually printed a report in Preview mode? Like, if clicked on the Close button, return False, if clicked on Printer button, return True. Thanks!
>>>>
>>>>Regards, Renoir
>>>
>>>
>>>In the On Exit of the Summary Band of your report, call a UDF that has the following code:
>>>
>>>IF WEXIST('Printing...')
>>> RETURN .t.
>>>ENDIF
>>>
>>>The "Printing..." window will only exist when you are printing the report. And by calling this UDF in the Summary Band, you are assured that they printed the report and didn't cancel before it got to the end. Of course, just because they let FoxPro finish processing the report doesn't mean that the printer is turned on or isn't out of paper < s >. But hey, we're only programmers ... not God!
>>>
>>>Cathy
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform