I'm using CR8.5, VB6, and SQL Server 7.
I'm calling my Form1 (which includes the CRViewer) from my main form. I'm passing the path of the report but I'd like to know how to set the caption of the form that the crviewer is on, so that it matches the title of the report.
It's usually done with report.windowtitle in crystal reports but since I have a crviewer on a form, I need to set the caption property on the form.
Here's my main form:
frmMain()
path = "Z:\btreports\Secretary\All Bills By Analyst.rpt"
Set Report = crxapplication.OpenReport(path)
Load Form1
Form1.Show vbModal
----------------------------------------
And here's the code in my Form1 with the CRViewer included:
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Form1.Height = Screen.Height
Form1.Width = Screen.Width
CRViewer1.ReportSource = frmBTMain.Report
CRViewer1.EnableExportButton = True
CRViewer1.ViewReport
CRViewer1.EnableRefreshButton = True
CRViewer1.EnableStopButton = True
CRViewer1.EnableCloseButton = True
CRViewer1.EnableAnimationCtrl = True
CRViewer1.EnableProgressControl = True
CRViewer1.EnableZoomControl = True
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
How can I set the property of the caption of this viewer form so that it matches the title of the report?
Thanks
John
I'm calling my Form1 (which includes the CRViewer) from my main form. I'm passing the path of the report but I'd like to know how to set the caption of the form that the crviewer is on, so that it matches the title of the report.
It's usually done with report.windowtitle in crystal reports but since I have a crviewer on a form, I need to set the caption property on the form.
Here's my main form:
frmMain()
path = "Z:\btreports\Secretary\All Bills By Analyst.rpt"
Set Report = crxapplication.OpenReport(path)
Load Form1
Form1.Show vbModal
----------------------------------------
And here's the code in my Form1 with the CRViewer included:
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Form1.Height = Screen.Height
Form1.Width = Screen.Width
CRViewer1.ReportSource = frmBTMain.Report
CRViewer1.EnableExportButton = True
CRViewer1.ViewReport
CRViewer1.EnableRefreshButton = True
CRViewer1.EnableStopButton = True
CRViewer1.EnableCloseButton = True
CRViewer1.EnableAnimationCtrl = True
CRViewer1.EnableProgressControl = True
CRViewer1.EnableZoomControl = True
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
How can I set the property of the caption of this viewer form so that it matches the title of the report?
Thanks
John