Results 1 to 9 of 9

Thread: Another Crystal Report Question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381

    Another Crystal Report Question

    When I print my address labels using Crystal Reports I want to preview before printing. That part is easy enough but I want the preview to always default to 85%.

    Any ideas how I can do this.

    I've swithched from Crystal Reports 4.6 which came with VB6 to Crystal Reports 6.0 which was just given to me this afternoon.

    Any help here would be most appreciated.

    Thanks,
    Rev. Michael L. Burns

  2. #2
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    There is a zoom method or similar you can set before opening the report. Can't remember exactly what it is though.
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Gary.Lowe is referrring to the PageZoom method. To use it, say:

    CrystalReport1.PageZoom 75 (or whatever)

    NOTE: This command MUST FOLLOW the Action method, i.e.:

    This does not work
    CrystalReport1.PageZoom 75
    CrystalReport1.Action = 1

    This does work
    CrystalReport.Action = 1
    CrystalReport.PageZoom 75

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381
    Gary.Lowe,

    Thanks. I had already tried the Zoom but couldn't get it to work. The message from Hack explained why.

    Hack,

    Your solution works when using my earlier version of Crystal Reports but I am now using the Crystal Reports 6 Viewer which is added to the project when I add the Crystal Reports 6.0 ActiveX Designer.

    I have to do a similar procedure to the one you gave but I initially get an error. Here is what I have in my form load event:

    CRViewer1.ReportSource=Report
    CRViewer1.ViewReport
    CRViewer1.Zoom (85)

    When the form loads I get a dialog Box stating that I had a Runtime error as follows.

    RunTime Error "-2147467259(80004005)
    The Control is Busy downloading Data

    If I click the Debug button on the Dialog Bpx and then clcik start again, begining at the location of the error (which is on the Zoom statement) the program continues and comes up with the report at 85%.

    ANy Ideas.

    Rev. Michael L. Burns

  5. #5
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    Try it this way

    CRViewer1.ReportSource=Report
    CRViewer1.Zoom (85)
    CRViewer1.ViewReport

    I used to get this error if I tried to use a method after the .ViewReport
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381
    Gary,

    When I move it to just before the ViewReport it is ignored and always comes up at 100%

    Pastor Mike

  7. #7
    Fanatic Member Gary.Lowe's Avatar
    Join Date
    May 2000
    Location
    In my sphere of influence
    Posts
    621
    Hmm not too sure then Rev

    I know you tend to get that error because the .ViewReport is still populateing the report.

    I havn't got CR here so I can't try it myself. Maybe putting a DoEvents after may stop that although it's not ideal.
    Gary Lowe
    VB6 (Enterprise) SP5
    ADO 2.6
    SQL Server 7 SP3

    OK I know my spelling and grammer is crap so don't quote me on it!

    To err is human to take the P! is only natural !!

    Click on the top section of image for Marcus Miller website and bottom section of image for 'Run For Cover' sound clip


  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    I don't have 6.0, so I'm not sure what the problem is.

    Take a look a the developers help file (developr.hlp), and see what it says about PageZoom.

    This file is in my c:\program files\seagate crystal reports folder.

    If you don't find it there, then just do a drive wide search using Windows Find.

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Edgerton, WI
    Posts
    381
    Gary,

    Placing a DoEvents between the ViewReport and the Zoom does the trick.

    Pastor Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width