|
-
Aug 2nd, 2005, 02:13 PM
#1
Thread Starter
Addicted Member
[RESOLVED] maximize CRV
The form i am hosting the crystal report in is a maximzed window. how i get the report to be all it can be. err be maximzed also.
-
Aug 2nd, 2005, 02:53 PM
#2
Re: maximize CRV
In the Resize event of the Form resize the Crystal Viewer control.
The following causes the control to fill the entire client area of the form. If you have any other controls on the form you will need to adjust accordingly.
VB Code:
Private Sub Form_Resize()
rptViewer.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
-
Aug 3rd, 2005, 07:37 AM
#3
Thread Starter
Addicted Member
Re: maximize CRV
it says scalewidth isnt declared. is there somethiung i need to import?
-
Aug 3rd, 2005, 10:34 AM
#4
Re: maximize CRV
Where did you put this code?
ScaleWidth and ScaleHeight are properties of a Form.
-
Aug 3rd, 2005, 02:13 PM
#5
Thread Starter
Addicted Member
Re: maximize CRV
the report loads with form
-
Aug 3rd, 2005, 02:14 PM
#6
Thread Starter
Addicted Member
Re: maximize CRV
the report loads with form. it would be the only code i put in for that form. kinda just sitting byitself.
-
Aug 3rd, 2005, 02:25 PM
#7
Re: maximize CRV
Please post your form file.
-
Aug 3rd, 2005, 03:29 PM
#8
Thread Starter
Addicted Member
Re: maximize CRV
there isnt a point to it. it is bare. all that is on there is the crystal viewer.
-
Aug 3rd, 2005, 11:35 PM
#9
Re: maximize CRV
The code I posted for the Resize event should work in every single form for any kind of control.
Are you using VB 6.0 or .NET or ?????
-
Aug 4th, 2005, 07:42 AM
#10
Thread Starter
Addicted Member
-
Aug 4th, 2005, 08:09 AM
#11
Thread Starter
Addicted Member
Re: maximize CRV
in the form resize event i changed
VB Code:
rptViewer.Move 0, 0, ScaleWidth, ScaleHeight
to
now it is also maximized, but if i minimize or maximize the window from there the report doesnt show up. is this the wrong way to go or is ther eextyra code i need to add?
-
Aug 4th, 2005, 09:39 AM
#12
Thread Starter
Addicted Member
Re: maximize CRV
ok it turns out that scale variables are integer ratios. i changed 100 to 1 for 100%. now it can maximize and minimize without probems, but i still want the viewer to size itself to how big the window is.
-
Aug 4th, 2005, 10:17 AM
#13
Re: maximize CRV
I don't use .NET that much yet but I do know each control has a Dock property. Set the Dock property equal to Fill from within the properties window or use the following in the Form's Load event.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
rptViewer.Dock = DockStyle.Fill
End Sub
Last edited by brucevde; Aug 4th, 2005 at 10:21 AM.
-
Aug 4th, 2005, 10:51 AM
#14
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|