Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print Preview Doesn't Work!
Message
 
À
09/09/1999 16:27:56
Rich Lieblich
Infosys Technologies, Inc.
Fanwood, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00257606
Message ID:
00263147
Vues:
67
Hi Rich,

I've got some more (sorry!) questions here. You'll find them interspersed with your remarks.

>Well, George... the good news is I got the print preview to work EXACTLY as I wanted!!!! The bad news is that it took the silliest workaround code I've ever had to use..... Maybe if I recapped, you might have some insights as to WHY I needed to do what I did....:

Hey, I'm not a pessimist (the glass is half empty) nor an engineer (the glass is too big< g >). So, at least we got it working (looking at the glass as half full).

>1. put SCREEN=OFF in CONFIG.FPW. Then setup code invokes my form:
>
> do form initscr.scx
> read events
>
>2. user selects report, clicks on "Preview". Preview window appears maximized using the following code...:
>
>oPreviewFrm=CreateObject("PreviewForm")

OK, here's where the first question or remark comes in. If this code directly follows the CREATEOBJECT() call, then you're actually maximizing your application's form, and not the "PreviewForm". The preview form can be maximized in the class designer or with oPreviewFrm.WindowState = 2

>THISFORM.WindowState=2 && make "Report Designer..." window maximized

Does this actually work? I've tried this in the designer, but the form always comes up with a title bar. It does disappear, however, after the interior preview window is maximized. Again, you're working with the current form, not the preview window if I read this right

>THISFORM.TitleBar=0 && turn off to avoid ugly double title bar problem

>report form "trade activity.frx" environment for record_id='1';
> noconsole preview in window (oPreviewFrm.Name)
>THISFORM.TitleBar=1 && turn back ON title bar

Why not simply ThisForm.WindowState = 0?

>THISFORM.Height=390 && restore original window size; otherwise app window
>THISFORM.Width=620 && will be FULL SCREEN
>THISFORM.AutoCenter=.T. && otherwise, app window appears in top left of display
>
>3. user closes report designer/print preview window; my app's window is restored centered on the display as desired.
>
>4. If you recall, the "PreviewForm" class was an empty form in the class library viewform.vcx that you originally pointed me to.
>
>Any thoughts on why I needed to resort to this?? Maybe my code and comments will bring to light something wrong with my original form design?? Thanks again so much for your help!!!..... Rich

Again, is the form's ShowWindow 2? From what I've seen of the preview form, it looks good. All I needed (and I've tested this) was to create the form object, then issue the report command. You might want to post the code for your form that the Class Browser can generate (just the form portion), if what I've mentioned above doesn't make sense.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform