Crystal Report Print (Landscape/Potrait) Problem
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Crystal Report Print (Landscape/Potrait) Problem

Hybrid View

  1. #1
    Join Date
    Jul 2008
    Posts
    2

    Question Crystal Report Print (Landscape/Potrait) Problem

    hi...

    i am using VB.Net 2005 and built in crystal report which comes with .net2005.

    when i print a report of landscape it will print in potrait. here is the code...


    Code:
    --object for frmReport
    
    Public RptRs As New ReportDocument()
    
    --print command
    
    Private Sub TSBPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBPrint.Click
            fReport.crViewer.ReportSource = fReport.RptRs
            fReport.crViewer.PrintReport()
    End Sub
    
    --Preview Command 
        Private Sub TSBPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TSBPreview.Click
            SetReportDisplay(fReport)
        End Sub
    
    
    --SetReportDisplay function
    Public Sub SetReportDisplay(ByRef fReport As frmReport)
            fReport.DisplayReport()
    
            ' Setting Report Buttons (Rights)
            fReport.crViewer.ShowPrintButton = pcURPrint
            fReport.crViewer.ShowExportButton = pcURSave
            If fReport.Visible = False Then
                fReport.Show(fMainForm)
            Else
                fReport.Focus()
            End If
        End Sub

    --------------------------------------------------------------------------------------------
    when i first preview the report it will show in landscape, and if from that preview i give print command that will print in landscape, but when i direct command to print by function "Private Sub TSBPrint_Click" then it will print in potrait. i downloaded the utility named "crnet10win_en" to resolve this issue, but it will not work, what to do???
    Mr. Sam
    =========
    MS VS.Net 2005
    SQLServer 2005

  2. #2
    Join Date
    Nov 2011
    Posts
    1

    Re: Crystal Report Print (Landscape/Potrait) Problem

    Hi,

    Iam getting the same print problem .
    My application is developed in VS2008 and when the print mode is kept as ActiveX for crystal report viewer 10 it does not take the crystal report print settings it takes the local printer settings.

    I mean if the report is in landscape but the local computer print setting is set as portrait then it prints the report as portrait....


    Please help its very urgent....

  3. #3
    Join Date
    Jul 2014
    Posts
    1

    Re: Crystal Report Print (Landscape/Potrait) Problem

    I am using VS2008. I am trying to view my report "CrystalRptSalesReport.rpt" with crystal report viewer. The problem is my default printer is set to another page size, and this report that I need to see is A4 size. I need to programmatically set the papper size so that there is no need to change the default printer inorder to see the report. Thanks

    My code looks like this which is not working.


    Dim cryRpt As New ReportDocument
    cryRpt.Load("C:\SalesControl\CrystalRptSalesReport.rpt")
    crystalReportViewer1.ReportSource = cryRpt
    cryRpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4
    CrystalReportViewer1.Refresh()

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center