Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CAPTION ON REPORT PREVIEW
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00110804
Message ID:
00110877
Vues:
23
Hello Alfred,

This process that I have been using works great and will cover what you want and then some. It takes care of the known bug when users click on the window "X" to close the report where the menu becomes disabled. It also forces the preview window into maximized preview mode instead of partial display. And finally will give you the direct option of renaming the "Caption" for the report

At the beginning of the main program I create a form object and remove some of the controls and force a maximized setting so the report never show up as half a screen.
public Rep_Preview
Rep_Preview = createobject( "form" )
With Rep_Preview
   .Caption = "Report Preview"   && or whatever you want 
   .Closable = .F.
   .Controlbox = .F.
   .MaxButton = .F.
   .MinButton = .F.
   .Name = "MyPreviewWindow"   && used in the report command
   .WindowState = 2   && always in maximized mode
   .Visible = .F.
EndWith
Then when actually running the report command, just add the window name to the report form command... Make sure you also make the object window visible


Rep_Preview.Caption = "Anything you want"
Rep_Preview.Visible = .T.
report form preview window "MyPreviewWindow"
Rep_Preview.Visible = .F.

This way the user can never click on the top right "X" to close the window and the window will always be in the maximized state. The "window" name corresponds to the "name" assigned to the object in the beginning process.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform