Printing landscape not working with ShowPrintDialog

Posted by: tosch on 8 September 2017, 2:54 pm EST

  • Posted 8 September 2017, 2:54 pm EST

    I have a sheet that I want to print landscape.

    All the printinfo parameters are set correctly. When I set .ShowPrintDialog = True the sheet is printed portrait and not landscape. If I set .ShowPrintDialog = False then it's printed landscape.

    Is this a bug?

    I have tried this using Spread versions 3.0.2010.2005 and 5.0.3514.2008 on different machines and it behaves the same everywhere.

    Here is the code i'm using for printing:

           With fpB.ActiveSheet.PrintInfo
                If ShiftIsDown() Then
                    .Preview = True
                Else
                    .Preview = False
                End If
                .Orientation = FarPoint.Win.Spread.PrintOrientation.Landscape
                .ShowBorder = False
                .ShowColumnHeaders = False
                .ShowRowHeaders = False
                .ShowGrid = False
                .RepeatRowStart = 5
                .RepeatRowEnd = 5
                .Margin.Left = 100 / 2.54
                .Margin.Top = 100 / 2.54
                .Margin.Bottom = 100 / 2.54
                .Margin.Right = 50 / 2.54
                .Header = ControlChars.CrLf + ControlChars.CrLf
                .Footer = "Buchungsjournal " + " ohne PrintDialog " + "/rSeite /p"
                .JobName = "Fibujournal"
                .ShowPrintDialog = True
                .UseMax = True

            End With

            fpB.PrintSheet(0)

     

    I have done some more research. This suddenly happens in all apps that use ShowPrintDialog = True. At the moment it looks like this has possibly been introduced by a recent windows update. In on virtual machine where I have not made windows updates for a long time everything works fine.

     

    Thomas

  • Replied 8 September 2017, 2:54 pm EST

    Hello,



    I would like you to know that a similar issue has been reported
    earlier in Spread.Net 6, and it seems to be a bug. The
    issue has been reported to the development team and the bug number for
    the same is #99924465. It would be fixed in the next maintenance
    release.



    Thanks,

    Manpreet Kaur 

  • Replied 8 September 2017, 2:54 pm EST

    I have same problem. ( I use Spread for winform version 4.0.3526.2008. )

    I think it may be due to recent windows update kb2656373( http://support.microsoft.com/kb/2656373 ).

    : since when I delete update kb2656373, there is no problem.

     

    Any workaround? 

  • Replied 8 September 2017, 2:54 pm EST

    Hello,

    The issue has been reported recently by several customers so this might be an issue with the windows update. However, I have reported the issue to the development team and they would be looking into the same. I would let you know as soon as I get any information in this regard. The only workaround is to perform printing by setting ShowPrintDialog property to false.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:54 pm EST

    I have a XP machine where I develop and no Windows updates have been made for at least 6 months, printing was fine on this machine.


    I now installed all the windows updatesand now printing is not working anymore. So this definitely has something to do with one of the last windows updates.

    Any workarounds you can suggest?

  • Replied 8 September 2017, 2:54 pm EST

    So is this a bug in Spread only? We have a number of spread sheets that we print landscape and the bug has never occured so far.

     

  • Replied 8 September 2017, 2:55 pm EST

    Hello,

    Any solution to this problem yet ??? It's been almost a month since the problem occured ... our customers are complaining. Have you issued an update fix ?

  • Replied 8 September 2017, 2:55 pm EST

    Hello,

    I would like you to know that  bug number #99924465 caused due to a Windows update has been fixed by Microsoft in the new Windows update. You may downlaod the Windows update from the following link to resolve the issue that you are currently facing.

              http://support.microsoft.com/kb/2671605/en-us

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:55 pm EST

    Thank you for your quick reply. We are looking into it. If anything else occurs we will notify you 

    Ioakim Ioakimidis

    Senior Developer/Analyst 

    Dataware Ltd

     

  • Replied 8 September 2017, 2:55 pm EST

    Hello,

    The development team has decided to hold the bug till the Microsoft investigates the issue and come over with there observations regarding the same. Please refer to this article that describes the issue and suggests a workaround for the same:

                               http://support.microsoft.com/kb/2671605/en-us

    Hope it will help you. Please let me know if you have any queries further.

    Thanks,

    Manpreet Kaur

  • Replied 8 September 2017, 2:55 pm EST

    I recently ran into following article :

    http://connect.microsoft.com/VisualStudio/feedback/details/737710/printing-issues-resulting-from-kb-updates

     

    It seems that windows updates break System.Windows.Form.PrintDialog.

    All we can do is delete update and wait for update for update..

    -------------------------------------

    FYI:

                PrintDialog form = new PrintDialog();

                form.Document = docu;

                form.PrinterSettings = new System.Drawing.Printing.PrinterSettings();

                form.UseEXDialog = true;

                form.ShowDialog();

     

    If everything is good, form.Document is not null after form.ShowDialog.

    With broken PrintDialog, form.Document is being null after form.ShowDialog.

     

    Sorry for my poor English. 

  • Replied 8 September 2017, 2:55 pm EST

    Hello,

    Thank you for sharing your observations with us.

    Thanks,

    Manpreet Kaur

Need extra support?

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

Learn More

Forum Channels