Print Dialog doesn't print page range

Posted by: qsrdavid on 8 September 2017, 1:36 pm EST

  • Posted 8 September 2017, 1:36 pm EST

    When trying to print the active spreadsheet and a single page is selected in the page range on the print dialog box, the printer will print multiple blank pages.  If the page range is set to "All", then the pages will print correctly.  We just upgraded to the most recent version of FarPoint Spread for Windows Forms 4 (2.0Framework) believing this would fix the problem, but the problem still exists. 
  • Replied 8 September 2017, 1:36 pm EST

    Hello,


    I am not able to reproduce this issue. Could you post a small zipped project reproducing this issue for us to debug?

  • Replied 8 September 2017, 1:36 pm EST

    This is the code that is associated with the button click event. 


     {


     FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
                printset.ShowPrintDialog = true;
                printset.Preview = true;
                printset.AbortMessage = "Do you want to cancel the printing?";
                printset.ShowBorder = false;
                printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
                printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
                printset.Centering = FarPoint.Win.Spread.Centering.Both;
              
                printset.UseSmartPrint = false;
                    printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait;
                           
                // Assign the printer settings to the sheet and print it
                fpSpread1.Sheets[0].PrintInfo = printset;
                fpSpread1.PrintSheet(fpSpread1.ActiveSheet);


    }

  • Replied 8 September 2017, 1:36 pm EST

    Hello,


    I am not able to reproduce this issue yet. How are you setting the Page range? Are you setting it to 1, 1-1, or 1-2?

  • Replied 8 September 2017, 1:36 pm EST

    I am having similar problem.

    If i set the PageStart and PageEnd programatically, it still prints all the pages.

                        F1.ActiveSheet.PrintInfo.PageStart = 1
                        F1.
    ActiveSheet.PrintInfo.PageEnd = 1

                        F1.PrintSheet(F1.ActiveSheetIndex)

  • Replied 8 September 2017, 1:36 pm EST

    Hello,


    Could you post a small zipped project reproducing this behavior for us to debug?

  • Replied 8 September 2017, 1:36 pm EST

    Scott,

    Please see the attached sample project. If i set the ShowDialog property to True and then using the printer Settings dialog if i select the page range, its working fine. If i set the page range programatically without the printer settings dialog, then it prints all the pages. Let me know if you need additional information.

    Thanks.


    2008/11/FarpointSample.zip
  • Replied 8 September 2017, 1:36 pm EST

    You'd also have to set the PrintType to specify that you want to print a PageRange.
  • Replied 8 September 2017, 1:36 pm EST

    Thanks a bunch, Kevin!! That's the property i am looking for. There aren't a lot of print properties like 'Number of Copies', 'Collate', etc... and i am creating some work-around for them and in the process I missed the obvious property thats available.

    Thanks again!

Need extra support?

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

Learn More

Forum Channels