All Print Settings are not working

Posted by: lisaconsult on 8 September 2017, 1:57 pm EST

  • Posted 8 September 2017, 1:57 pm EST

    I have the following routine where I clone the existing page, set the print settings on the page and then print the page.  However, some of the settings, such as ShowColor and showRowHeader are not applying to the printed page.  Other settings such as ShowGrid are working.  Any Assistance would be helpful. 


        Public Sub PrintReport()


            Dim strTitle As String
            Try
                'Allow the user to print the spreadsheet.
                Dim PrintSettings As New FarPoint.Win.Spread.PrintInfo
                Dim SheetToPrint As New FarPoint.Win.Spread.SheetView
                Dim PrintMarg As New FarPoint.Win.Spread.PrintMargin(50, 50, 50, 50, 50, 50)


                'move the data in Sheet 0 to sheet 1
                fpResults.Sheets(1).Reset()
                fpResults.Sheets(1) = Clone(fpResults.Sheets(0))
                fpResults.SuspendLayout()
                fpResults.Sheets(1).Columns(cellPARAM_ID).Visible = False


                strTitle = "/c/fb1" & "Title" & "/fb0/n/c/fb1" & Me.Text & "/fb0"


                PrintSettings.Header = strTitle
                PrintSettings.Footer = "/l" & Me.Text & "/r/p of /pc"
                PrintSettings.BestFitCols = False
                PrintSettings.BestFitRows = True
                PrintSettings.Margin = PrintMarg
                PrintSettings.Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape
                PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.CellRange
                PrintSettings.ShowGrid = False
                PrintSettings.ShowRowHeader = False
                PrintSettings.ShowColor = False
                PrintSettings.ColStart = 1
                PrintSettings.ColEnd = fpResults.Sheets(1).NonEmptyColumnCount - 1
                PrintSettings.RowStart = 0
                PrintSettings.RowEnd = fpResults.Sheets(1).NonEmptyRowCount
                PrintSettings.ShowPrintDialog = True
                ' Set the PrintInfo property for the first sheet
                fpResults.Sheets(1).PrintInfo = PrintSettings
                ' Print the sheet
                fpResults.PrintSheet(1)
                fpResults.ResumeLayout()


            Catch ex As Exception
                ProcessUnhandledException(ex)
            End Try

  • Replied 8 September 2017, 1:57 pm EST

    Hello,


    You need to change PrintSettings.ShowRowHeader = False to PrintSettings.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide to not to show the RowHeader in printed page.Other settings seems to be working fine.I tested with the latest build of Spread for Windows Forms would request you to upgrade if you are using any older version.


     


    Thanks, 

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels