Issue with display printing landscape with summary and grouping

4 posts, 0 answers
  1. REILER Cyril
    REILER Cyril avatar
    2 posts
    Member since:
    Jan 2014

    Posted 09 Oct 2015 Link to this post

    Hello,

    There is a bug in gridview printiing with mode landscape only

    with this gridview :

    http://creiler.free.fr/window_gridview.jpg

    My PrintStyle :

     With oStyle

                    .FitWidthMode = PrintFitWidthMode.NoFitCentered
                    .PrintGrouping = False
                    .PrintSummaries = True
                    .PrintHeaderOnEachPage = True
                    .PrintHiddenColumns = False
                    .PrintHierarchy = True
                    .PrintAllPages = True
                    .HierarchyIndent = 0
                    .CellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                    .HeaderCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                    .SummaryCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                    .GroupRowFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                End With​

     

    normal :

    http://creiler.free.fr/gridview1.jpg

    landscape :

    http://creiler.free.fr/gridview2.jpg

    Summary cells are shifting 
  2. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    710 posts

    Posted 12 Oct 2015 Link to this post

    Hi Cyril,

    Thank you for writing.

    I cannot open the attached landscape image, however, I think that I managed to reproduce the issue and I have logged it in our feedback portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - feedback item. I have also updated Telerik points.

    Since the grid is going to be printed in landscape you can use the following workaround: 
    Private Sub PrintGrid()
        Dim style As New GridPrintStyle()
        style.FitWidthMode = PrintFitWidthMode.NoFitCentered
        style.PrintGrouping = False
        style.PrintSummaries = True
        style.PrintHeaderOnEachPage = True
        style.PrintHiddenColumns = False
        style.PrintHierarchy = False
        style.PrintAllPages = True
        style.HierarchyIndent = 0
     
        style.CellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
        style.SummaryCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
        style.GroupRowFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
        Me.radGridView1.PrintStyle = style
     
        Dim doc As New RadPrintDocument()
        doc.Landscape = True
        doc.AssociatedObject = Me.radGridView1
     
        Dim dialog As New RadPrintPreviewDialog()
        dialog.Document = doc
        dialog.ShowDialog()
    End Sub

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. REILER Cyril
    REILER Cyril avatar
    2 posts
    Member since:
    Jan 2014

    Posted 14 Oct 2015 in reply to Hristo Merdjanov Link to this post

    This is my code print dialog : 

         Private Sub Print()

            Try
                Dim oStyle As New GridPrintStyle()
                With oStyle
                    .FitWidthMode = PrintFitWidthMode.FitPageWidth
                    .PrintGrouping = False
                    .PrintSummaries = True
                    .PrintHeaderOnEachPage = True
                    .PrintHiddenColumns = False
                    '.AlternatingRowColor = Color.Silver
                    '.PrintAlternatingRowColor = True
                    .PrintHierarchy = True
                    .PrintAllPages = True
                    .HierarchyIndent = 0
                    .CellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                    .HeaderCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                    .SummaryCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                    .GroupRowFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                End With
                With Me.RadGridView1
                    .PrintStyle = oStyle
                    '.AutoSizeRows = True
                    '.BestFitColumns()
                End With
                With Me.RadPrintDocument1
                    .Margins = New Margins(10, 40, 10, 10)
                    .AssociatedObject = Me.RadGridView1
                    .HeaderFont = New System.Drawing.Font("Arial", 11)
                    .ReverseHeaderOnEvenPages = False
                    .DefaultPageSettings.Landscape = True
    End With
    Dim dialog As New RadPrintPreviewDialog()
    dialog.Document = Me.RadPrintDocument1
    dialog.ShowDialog()
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub

    My gridview to print with landscape mode :

    http://creiler.free.fr/window_gridview.jpg

    When we print, there is a printing bug with summaries and subtotals

     http://creiler.free.fr/gridview2.jpg

    No bug with mode "portrait"

    Do you know this issue ? 

    How resolve this issue ?

    Thank you 

     

  5. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    710 posts

    Posted 16 Oct 2015 Link to this post

    Hi Cyril,

    Thank you for writing back.

    We are aware of the issue and we logged it in our feedback portal, here. In order to workaround the issue, you would need to set the Landscape  property to true. From the code snippet you provided it looks like you are not setting the property, please refer to my previous post for a code snippet.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top