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

    <P>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.  </P>
    <P>    Public Sub PrintReport()</P>
    <P>        Dim strTitle As String<BR>        Try<BR>            'Allow the user to print the spreadsheet.<BR>            Dim PrintSettings As New FarPoint.Win.Spread.PrintInfo<BR>            Dim SheetToPrint As New FarPoint.Win.Spread.SheetView<BR>            Dim PrintMarg As New FarPoint.Win.Spread.PrintMargin(50, 50, 50, 50, 50, 50)</P>
    <P>            'move the data in Sheet 0 to sheet 1<BR>            fpResults.Sheets(1).Reset()<BR>            fpResults.Sheets(1) = Clone(fpResults.Sheets(0))<BR>            fpResults.SuspendLayout()<BR>            fpResults.Sheets(1).Columns(cellPARAM_ID).Visible = False</P>
    <P>            strTitle = "/c/fb1" & "Title" & "/fb0/n/c/fb1" & Me.Text & "/fb0"</P>
    <P>            PrintSettings.Header = strTitle<BR>            PrintSettings.Footer = "/l" & Me.Text & "/r/p of /pc"<BR>            PrintSettings.BestFitCols = False<BR>            PrintSettings.BestFitRows = True<BR>            PrintSettings.Margin = PrintMarg<BR>            PrintSettings.Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape<BR>            PrintSettings.PrintType = FarPoint.Win.Spread.PrintType.CellRange<BR>            PrintSettings.ShowGrid = False<BR>            PrintSettings.ShowRowHeader = False<BR>            PrintSettings.ShowColor = False<BR>            PrintSettings.ColStart = 1<BR>            PrintSettings.ColEnd = fpResults.Sheets(1).NonEmptyColumnCount - 1<BR>            PrintSettings.RowStart = 0<BR>            PrintSettings.RowEnd = fpResults.Sheets(1).NonEmptyRowCount<BR>            PrintSettings.ShowPrintDialog = True<BR>            ' Set the PrintInfo property for the first sheet<BR>            fpResults.Sheets(1).PrintInfo = PrintSettings<BR>            ' Print the sheet<BR>            fpResults.PrintSheet(1)<BR>            fpResults.ResumeLayout()</P>
    <P>        Catch ex As Exception<BR>            ProcessUnhandledException(ex)<BR>        End Try<BR></P>
  • Replied 8 September 2017, 1:57 pm EST

    <P>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></P>
    <P><FONT size=2></FONT> </P>
    <P><FONT size=2>Thanks, </P></FONT>
Need extra support?

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

Learn More

Forum Channels