sourcelink
asked on
Crystal Reports XI Viewer, size to percent or screen ?
Hello, I have a vb .net 2003 application using CR XI viewer to display reports. when the user increases the magnification, I increase the viewer width with the code below.
I can only get it to work with the units in pixels: Me.crViewer1.Width = System.Web.UI.WebControls.
This will not work: Me.crViewer1.Width = System.Web.UI.WebControls.
If I use the percentage it sizes to 100 pixels instead of 100%. Ive tried .Percentage(100) and .Percentage(100%)
Here's the code: Every thing works but the case else.
Private Sub crViewer1_ViewZoom(ByVal source As Object, ByVal e As CrystalDecisions.Web.ZoomE
Me.crViewer1.BestFitPage = False
Select Case e.NewZoomFactor
Case 100
Me.crViewer1.BestFitPage = True
Case 125
Me.crViewer1.Width = System.Web.UI.WebControls.
Me.crViewer1.Height = System.Web.UI.WebControls.
Case 150
Me.crViewer1.Width = System.Web.UI.WebControls.
Me.crViewer1.Height = System.Web.UI.WebControls.
Case Else
Me.crViewer1.Width = System.Web.UI.WebControls.
Me.crViewer1.Height = System.Web.UI.WebControls.
End Select
End Sub
this is the link that I used:
http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016117&sliceId=&dialogID=10458781&stateId=1%200%2010460751
Thanks for any help.
You could write a user function that takes the percentage as an input parameter, and converts it to pixels, then use the WebControls.Unit.Pixel technique.
Link to VB.Net question
https://www.experts-exchange.com/questions/22079285/Crystal-Reports-XI-Viewer-size-to-percent-or-screen.html
mlmcc
https://www.experts-exchange.com/questions/22079285/Crystal-Reports-XI-Viewer-size-to-percent-or-screen.html
mlmcc
ASKER
Thanks mhunts for your response,
This is probably a dumb question, but how do I know on the server side, what the client resolution is?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
mlmcc