Results 1 to 5 of 5

Thread: auto fit to screen

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2003
    Posts
    237

    auto fit to screen

    hi,

    when i display my cystal report in the screen, it automatically show 100%.

    how to set it to "Fit to Page" everytime i view it?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: auto fit to screen

    Are you using the report viewer control? What version of CR? How are you
    currently displaying the report (code)?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2003
    Posts
    237

    Re: auto fit to screen

    yes... im using report viewer control....

    cyrtal report 9.2

    something like

    ReportViewer.ReportSource = bla bla

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: auto fit to screen

    Ok, try this...
    VB Code:
    1. Option Explicit
    2. 'Add reference to CR Viewer Control
    3. 'Add reference to CR x.x ActiveX Designer RunTime Library
    4. Private Sub Command1_Click()
    5.     '1 = Page Width
    6.     '2 = Whole Page
    7.     '3 = 400%
    8.     '4 = 300%
    9.     '5 = 200%
    10.     '6 = 150%
    11.     '7 = 100%
    12.     '8 = 75%
    13.     '9 = 50%
    14.     '10 = 25%
    15.     CRViewer1.Zoom 2
    16. End Sub
    17.  
    18. Private Sub Form_Load()
    19.    
    20.     Dim oReport As CRAXDRT.Report
    21.     Dim crxApplication As CRAXDRT.Application
    22.  
    23.     Set crxApplication = New CRAXDRT.Application
    24.     Set oReport = crxApplication.OpenReport("D:\Report1.rpt", 1)
    25.     CRViewer1.ReportSource = oReport
    26.     CRViewer1.ViewReport
    27.    
    28. End Sub
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2003
    Posts
    237

    Re: auto fit to screen

    i have another question, do u have any idea to change report paper size?

    my customer use custom paper to print out the receipt using pin printer,

    the width of the paper same with Letter size, but the Height is half of fanfold size..

    do you have any idea ?

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