Immi

Immi

  • NA
  • 10
  • 0

Problem in printing a Farpoint Spreadsheet in .Net

Apr 18 2011 2:49 AM

I am migrating application developed in VB6 to .Net using VS 2008. I have converted VB6 code (using common dialog control) to print a Farpoint Spreadsheet in .Net(using PrintDialog). The problem which I am facing is that, regardless of selection, the print is always sent to printer which is selected when PrintDialog is shown. I have used PrintDialog to select the print and also using PrintDocument1 to initialize the properties of Farpoint Spreadsheet, but no success. Code which I implemented is as below:


PrintDialog1.Document = PrintDocument1

fp_SpreadSheet.PrintType = FPUSpreadADO.PrintTypeConstants.PrintTypeAll

    If PrintDialog1.ShowDialog() = DialogResult.OK Then

      If PrintDocument1.DefaultPageSettings.Landscape Then

        fp_SpreadSheet.PrintOrientation = FPUSpreadADO.PrintOrientationConstants.PrintOrientationLandscape

      Else

        fp_SpreadSheet.PrintOrientation = FPUSpreadADO.PrintOrientationConstants.PrintOrientationPortrait

      End If

    End If

 fp_SpreadSheet.PrintSheet()     

Please help me in this regard.