Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preview Quirk
Message
De
06/01/2000 13:00:01
Thomas Idema
Michigan Hospital Association
Lansing, Michigan, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00313933
Message ID:
00314001
Vues:
45
Thanks for the reply. I found that the preview was triggering the resize() event in the active form. In the resize method there was a call to some code that selected a different work area and did not restore it back.

Solution was to add PREVIEW IN RPTFRM (name of my active form) This prevented the resize code from firing.

I also ended up taking the call out of the resize method (it should not have been there in the first place).

Thanks again for all of your suggestions.

Thom



>Hi Thomas,
>
>I had a similar problem: in my case, the preview was always OK but when the user printed from the preview window the cursor somehow got changed and the report printed incorrectly. The weird thing was that this only happened if there was only one page in the report. If there was more than one page then it printed correctly.
>
>The report was being called from a form's PrintInvoice() method, via a popup menu activated by a right-click on the desired grid row. The grid displays a child table in the form. Somehow the cursor was reverting back to the form's parent table. I never did determine exactly what was causing this, but by debugging I found that the selected work area changed when the "Print" button on the Report Preview toolbar was clicked, or if the Zoom was used.
>
>I circumvented the problem by doing a SetFocus() to a control on the form before calling the print method. Which control I set focus to didn't seem to matter. So the code in the form's PrintInvoice() method now looks like this:
with thisform
>   .cmdPrint.SetFocus()  && to avoid problem with work area getting changed
>   oTrip.PrintInvoices( tripdetl.cTripNbr, tripdetl.cCustNbr)
>   .grdTrips.SetFocus()
>endwith
>
>This was one of my earliest VFP apps (VFP 5.0a, BTW) so I figured I had done something dumb in the design of the form. Anyway, hope this helps.
>
>>We have a report within our program that when sent directly to the printer it works great. But when sent to directly to preview, it selects a differnet work area (somehow changes the selected cursor) it was pointing to and prints the wrong information. Oddly enough, if sent to the printer, then sent to preview it runs correctly both times. IHow can the cursor change during the preview?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform