This is a migrated thread and some comments may be shown as answers.

Issue with display printing landscape with summary and grouping

5 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
REILER Cyril
Top achievements
Rank 1
REILER Cyril asked on 09 Oct 2015, 03:22 PM

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 

5 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 12 Oct 2015, 02:54 PM
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
0
REILER Cyril
Top achievements
Rank 1
answered on 14 Oct 2015, 09:18 AM

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 

 

0
Hristo
Telerik team
answered on 16 Oct 2015, 06:34 AM
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
0
jamsheer
Top achievements
Rank 1
Veteran
answered on 16 Feb 2017, 05:25 AM

hello,

     I want to give Report Header , Page Header and Report Footer , Page Footer separately ,Where i am using RadPrintDocumnet There i didn't get Report header and Report Footer

I want to print the title only at first page and Total balance at Last page. 

 Any option to give Report header and Report Footer ?

 

 

     

       

0
Hristo
Telerik team
answered on 16 Feb 2017, 03:51 PM
Hello Jamsheer,

Thank you for writing.

Please check the following article showing how you can work with the headers and the footers available in RadPrintDocumenthttp://docs.telerik.com/devtools/winforms/telerik-presentation-framework/printing-support/radprintdocument/header-and-footer.

Additionally, you may check this article demonstrating how a custom RadPrintDocument can be created.

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

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
REILER Cyril
Top achievements
Rank 1
Answers by
Hristo
Telerik team
REILER Cyril
Top achievements
Rank 1
jamsheer
Top achievements
Rank 1
Veteran
Share this question
or