Hi Everybody
I'm running a report from a form, when the report is executed this always appeared normal size but I want it to appear as maximizated.
What Can I do?
The standard reply to this question is to put this code just before your REPORT command:
Code:
keyboard "{CTRL+F10}"
This usually works, although for some strange reason, in the project I'm working on (code inherited from a previous programmer) it does not work. I can't even hit CTRL-F10 manually to maximize it. *shrugs*
But it works for me in any project I create from scratch, so I'll have to figure out what is getting set that stops it. In any case, the above line should work for you.
If the command ON KEY LABEL ctrl-f10 * is set at some point in the app, this will disable the ctrl-f10 key combo from maximizing the screen. Issuing on key label ctrl-f10 without the asterisk following will allow it to work again.
The above suggestions, i doubt will work, since the keyboard buffer gets executed even before the report is loaded. But I had my reservation to pass these comments, since I have not tried it myself.
Method 1...
The way I think will be.. to have the code
KEYBOARD "{CTRL+F10}"
needs to be called from within the report after the report form is started. So if you insert a function in all the reports at the Title level.. say... a field box with REPORT EXPRESSION.... IIF(myZoom(),"","" ......
Insert a FUNCTION called myZoom with code.. KEYBOARD "{CTRL+F10}"
RETURN .t.
This will get fired.. every time the report is run.. and the report gets maximized as the keyboard gets the key values thru the function.
This will solve your problem.
Method 2... Another way is to have the REPORT in a user defined window with properties.. WindowState set as maximized...
Hope this helps
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK
Follow this routine to create a very nice, maximized report viewer:
First, create a form called 'repviewer'. Set the following properties:
Name: ReportViewer, ShowWindow: 2 - As Top Level, TitleBar: 0 - Off, WindowState: 2 - Maximized
Next, add the following procedure to your main program or procedure file:
***********************************************************************************
** ADD THIS PROCEDURE TO MAIN PROGRAM or PROCEDURE FILE, WHICHEVER IS APPLICABLE **
***********************************************************************************
** Calling Example:
** lcReportName=myreport.frx
** do ReportViewer with (lcReportName)
PROCEDURE ReportViewer
LPARAMETER lcReport
DO FORM repviewer NAME ReportViewer
REPORT FORM (lcReport) PREVIEW WINDOW ReportViewer
RELEASE WINDOW ReportViewer
ENDPROC
The report toolbar appears as a floater in 'repviewer'. If the user clicks on the 'X' rather than the 'Close' button the report will still be visible. All they have to do is press the Escape key to close the report.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.