General information
Category:
Forms & Form designer
tracy test below code . i get this from microsoft site. test it if you like.
PROCEDURE PreviewReport
LPARAMETERS cReportName, cReportTitle
IF (VARTYPE(cReportName) != "C") OR EMPTY(cReportName)
RETURN .F.
ENDIF
cReportName = ALLTRIM(cReportName)
IF ATC(".",cReportName) = 0
cReportName = cReportName + ".FRX"
ENDIF
cReportName = oMainObject.cReportsDir + cReportName
IF !FILE(cReportName)
RETURN .F.
ENDIF
IF (VARTYPE(cReportTitle) != "C") OR EMPTY(cReportTitle)
cReportTitle = "My Report"
ENDIF
LOCAL lnScaleMode
lnScaleMode = _Screen.ScaleMode && Save current scale mode.
_Screen.ScaleMode = 0 && Set scale mode to Foxel.
*-- Define the hosting window.
DEFINE WINDOW RepHost FROM 0,0 TO _Screen.Height - 2, _Screen.Width ;
TITLE cReportTitle CLOSE FLOAT GROW ZOOM SYSTEM
_screen.ScaleMode = lnScaleMode && Restore saved scale mode.
*-- Preview the report in the hosting window.
REPORT FORM (cReportName) PREVIEW WINDOW RepHost NOWAIT
ENDPROC
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only