C1FlexReport .708: "C1PrintOptions.PrinterSettings" was removed

Posted by: wknauf on 25 May 2025, 3:15 pm EST

  • Posted 25 May 2025, 3:15 pm EST

    We have code that displays a custom form where the user can select a printer and. configure papersize and orientation. On OK click, a C1FlexReport is rendered and sent to the selected printer.

    The user can also open the detailed printer config dialog for the selected printer (which is done by calling “DocumentProperties” from “winspool.drv”). The result of this dialog is a DEVMODE structure that is set to the “System.Drawing.Printing.PrinterSettings” by calling “SetHdevmode”.

    We forwarded those setting to C1FlexReport with this code:

    System.Drawing.Printing.PrinterSetting myPrinterSettings = ...;
    System.Drawing.Printing.PageSetting myPageSettings = ...;
    
    C1FlexReport = ...;
    report.DefaultPrintOptions.PageSettings = myPageSettings;
    report.DefaultPrintOptions.PrinterSettings = myPrinterSettings;
    
    report.Render();
    report.Print();

    With .708, “C1PrintOptions.PageSettings” was changed to type “C1PageSettings”, and the “PrinterSettings” property was removed.

    Now, our code just prints to the default printer - I cannot even specify the target printer, not even talking about custom printer settings from DEVMODE.

    Is there code to fulfill my requirement to print using preconfigured PrinterSettings? Or was this feature accidentally removed? If yes: please bring it back - this is a blocker for migration to .708 or newer.

    Hope you don’t request to build a sample - I would have to extract a lot of code for all this ;-).

    Best regards

    Wolfgang

  • Posted 26 May 2025, 9:26 am EST

    Hello Wolfgang,

    Apologies for the inconvenience.

    We’re working on your query and will get back to you as soon as possible.

    Regards,

    Uttkarsh.

  • Posted 27 May 2025, 11:40 am EST

    Hi Wolfgang,

    Thank you for sharing all the details. We could see the change in the latest .708 release. We have asked the development team for their insights and will update you as soon as possible.

    We apologize for the inconvenience this has caused.

    [Internal Tracking ID: C1WIN-34086]

    Best Regards,

    Kartik

  • Posted 11 June 2025, 1:20 am EST

    Hi Wolfgang,

    According to the development team, this is a bug introduced due to the migration to the .NET Standard-based version of C1Document (C1.Document package). The bug tracking ID is: C1WIN-34138

    In the meantime, the development team has suggested using the C1.Win.Document.C1PrintOptions class as a workaround. Please refer to the code-snippet below:

    var options = new C1.Win.Document.C1PrintOptions();
    options.PrinterSettings = myPrinterSettings;
    report.Print(options);

    Best Regards,

    Kartik

Need extra support?

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

Learn More

Forum Channels