RobHVB6Sql
Programmer
This one has been driving me batty for some time ..
BACKGROUND: Using VB 6 /SQL and Crystal 8.5.
A previous developer linked CrystalReport1 to a VB form and set the following:
This is all working fine especially with vbModal.
THE QUESTION:
How do I allow users to resize the form AND report.
When they maximise the form the CrystalReport1 does not resize.
Do I drop using the vb form altogether?
How would I then retun control back to vb once the report is closed.
PS I have played with ScaleHeight and ScaleWidth, ie
'frmReportCriteriaGenetics' contains the 'CrystalReport1' object and it calls the print preview form.
Any help appreciated ;-)
Rob Hasard
(VB6 /SQL 7.0 /CR8.5)
BACKGROUND: Using VB 6 /SQL and Crystal 8.5.
A previous developer linked CrystalReport1 to a VB form and set the following:
Code:
CrystalReport1.WindowParentHandle = frmPrintPreview
CrystalReport1.Destination = crptToWindow
CrystalReport1.WindowWidth = frmPrintPreview.ScaleWidth
CrystalReport1.WindowHeight = frmPrintPreview.ScaleHeight
'Execute the report
CrystalReport1.Action = 1
'Show print preview window
frmPrintPreview.show vbModal
THE QUESTION:
How do I allow users to resize the form AND report.
When they maximise the form the CrystalReport1 does not resize.
Do I drop using the vb form altogether?
How would I then retun control back to vb once the report is closed.
PS I have played with ScaleHeight and ScaleWidth, ie
Code:
frmPrintPreview...
Private Sub Form_Resize()
frmReportCriteriaGenetics.CrystalReport1.WindowWidth =frmPrintPreview.ScaleWidth
frmReportCriteriaGenetics.CrystalReport1.WindowHeight =frmPrintPreview.ScaleHeight
End Sub
'frmReportCriteriaGenetics' contains the 'CrystalReport1' object and it calls the print preview form.
Any help appreciated ;-)
Rob Hasard
(VB6 /SQL 7.0 /CR8.5)