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
                '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) = Clone(fpResults.Sheets(0))
                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

            Catch ex As Exception
            End Try

  • Replied 8 September 2017, 1:57 pm EST


    You need to change PrintSettings.ShowRowHeader = False to P<FONT size=2>rintSettings.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.</FONT>

    <FONT size=2></FONT> 

    <FONT size=2>Thanks, 

Need extra support?

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

Learn More

Forum Channels