Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal / VB.NET Default Zoom

Posted on 2004-08-18
12
Medium Priority
?
2,094 Views
Last Modified: 2010-08-05
When I load a Crystal Report into a Crystal Report Viewer....is there a way to set the DEFAULT ZOOM Factor to "WIDTH" of document?
0
Comment
Question by:natloz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 3
12 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 11831251
No - you can only set it to a numeric value   zoom(50), zoom(100), etc.

This may work though if you're using web viewer: http://support.businessobjects.com/library/kbase/articles/c2002925.asp
0
 
LVL 10

Accepted Solution

by:
ebolek earned 1000 total points
ID: 11831267
Most probable you know this but you set the zoom like this. I willinvestigate on the paper width part though

CRViewer1.Zoom 2
0
 
LVL 10

Expert Comment

by:ebolek
ID: 11831297
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:ebolek
ID: 11831302
upps i putthe same article . sorry frodoman
0
 
LVL 7

Author Comment

by:natloz
ID: 11831389
My report in my VB.NET Project is already set as article c2002925.asp states.
I have a form that is 800x600 that has a Report Viewer on it where I view all reports.
If I load a report the viewer Zoom default is at 100%.

In the toolbar of the viewer you can select "Page Width", but this doesn't seem to work...
I will try the CrViewer1.Zoom 75 to see if that will work (I am assuming this is at 75%).
0
 
LVL 7

Author Comment

by:natloz
ID: 11831442
'create and fill the Data Adapter
                Dim oDa As New SqlDataAdapter(oComm) 'SQL Data Adapter object
                oDa.Fill(oDs, "spGetAFEHeaderReport")

                oComm.CommandText = "spGetAFEDetailReport"
                oDa.Fill(oDs, "spGetAFEDetailReport")

                rptAFE.SetDataSource(oDs)
                frmReport.rptViewer.Zoom(75) <------ I ADDED THIS
                frmReport.rptViewer.SelectionFormula = "{spGetAFEHeaderReport.varAFENumber} = '" & lblAFENumber.Text & "'"
                frmReport.rptViewer.ReportSource = rptAFE
                frmReport.ShowDialog()

It still does not work...100% Zoom factor when the form loads
0
 
LVL 42

Expert Comment

by:frodoman
ID: 11831490
First, set your zoom AFTER you set the viewer reportsource - just drop your zoom line of code down below 'reportsource' line.

Unfortunatelty you may also be caught with a known bug with the .Net version:  http://support.businessobjects.com/library/kbase/articles/c2013757.asp

I was involved in another discussion w/ someone who indicated he was going to try the approach in the link but was going to put in the form's activate or load or gotfocus events and see if it could be automatted w/out the button being needed.  Sadly I never heard if this worked but you may want to give it a try.

HTH

frodoman
0
 
LVL 7

Author Comment

by:natloz
ID: 11831507
I put the code into the ONLOAD event of the frmReport...Must be that you cannot pre-define the zoom factor until a report is acutally loaded in the viewer...Thanks for the help

ebolek gets the points for giving me the code snippet:
CRViewer1.Zoom 2
0
 
LVL 10

Expert Comment

by:ebolek
ID: 11831515
Glad to help
0
 
LVL 7

Author Comment

by:natloz
ID: 11831524
Sorry frodoman...I was writing my last post without seeing your last suggestion (which is what I tried already before seeing your last post...and I had already awarded points....if this makes sense.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 11831562
No problem natloz - thanks for the explanation.
0
 
LVL 7

Author Comment

by:natloz
ID: 11831601
I Tried you suggestion of setting it after REPORTSOURCE just for kicks and it did not work, it needs to go in the ONLOAD event of the form with the viewer after the frmReport.ShowDialog() command for it to work.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question