Is there a way to change the report preview default zoom factor from 0 to 1 using code?
The default full page view is too small to read, so I would like to zoom in one level without having to double-click each time.
I already searched the forum.
Any ideas?
Possible to change default report preview zoom factor?
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Possible to change default report preview zoom factor?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Possible to change default report preview zoom factor?
Code: Select all
// Somewhere in your program before creating the report
TPreview():bSetup := { |oRep,oWnd| RepZoom( oRep, oWnd ) }
// <other code, create report, whatevr
function RepZoom( oRep, oWnd )
oWnd:bInit := { || oRep:Zoom() }
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Possible to change default report preview zoom factor?
Nages,
Thanks but It errors out:
TPreview():setup message not found.
Maybe due to my older version of FW (18.05).
Thanks but It errors out:
TPreview():setup message not found.
Maybe due to my older version of FW (18.05).
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Possible to change default report preview zoom factor?
TPreview():bSetup
not Setup.
But yes, this data is not available in FWH1812.
You may need to modify Activate() method of RPreview.prg and insert this ::oWnd:bInit
before the command
ACTIVATE ::oWnd ....
not Setup.
But yes, this data is not available in FWH1812.
You may need to modify Activate() method of RPreview.prg and insert this ::oWnd:bInit
before the command
ACTIVATE ::oWnd ....
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Possible to change default report preview zoom factor?
TPreview():bSetup
not Setup.
Ah, TPreview:setup was mistyped by me in my message but it was correct in my code.
Can't test it now, but I will try your suggestion later today--probably tommorow morning your time.
Thanks for the quick response.
James
not Setup.
Ah, TPreview:setup was mistyped by me in my message but it was correct in my code.
Can't test it now, but I will try your suggestion later today--probably tommorow morning your time.
Thanks for the quick response.
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Possible to change default report preview zoom factor?
Mr. James
Please do these changes to rpreview.prg.
1) Add CLASSDATA bSetup
2) In the METHOD Activate()
After this code:
and before
Add these lines:
Then you can adopt the solution I posted above.
Please do these changes to rpreview.prg.
1) Add CLASSDATA bSetup
2) In the METHOD Activate()
After this code:
Code: Select all
if ::oWnd == nil
return nil
endif
Code: Select all
ACTIVATE WINDOW ::oWnd MAXIMIZED ;
Code: Select all
if ::bSetUp != nil
Eval( ::bSetUp, Self, ::oWnd )
endif
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India