Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public oForm
oForm = CREATEOBJECT("form1","c:\Report1.Rpt")
oForm.show()
Define Class form1 As Form
Caption = "Report Preview"
oCrystal = .F.
oReport = .F.
Procedure Init
Lparameters tcReport
Local cr As crViewer.crViewer
With This
.WindowState = 2
.oCrystal = Createobject("CrystalRuntime.Application")
.oReport = .oCrystal.OpenReport(tcReport)
With .oleCRViewer
.EnableExportButton = .T.
.EnableProgressControl = .T.
.ReportSource = Thisform.oReport
.EnableAnimationCtrl = .F.
.ViewReport()
Endwith
.Visible = .T.
Endwith
Endproc
Procedure Resize
With This.oleCRViewer
.Top = 1
.Left = 1
.Height = This.Height - 2
.Width = This.Width - 2
Endwith
Endproc
Procedure Error
Lparameters nError, cMethod, nLine
If nError != 1440
DoDefault()
Endif
Endproc
Procedure Destroy
With This
.oReport = Null
.oCrystal = Null
Endwith
Endproc
Procedure Activate
With This.oleCRViewer
.Top = 1
.Left = 1
.Height = Thisform.Height - 2
.Width = Thisform.Width - 2
Endwith
Endproc
Enddefine