Problem with C1.WPF.Report displaying Barcode PDF417

Posted by: info on 13 September 2018, 3:40 am EST

    • Post Options:
    • Link

    Posted 13 September 2018, 3:40 am EST

    Hello,

    I’ve designed a report, that includes an barcode PDF417.

    I use the C1.WPF.C1Report.dll in my application, to create and print the report.

    But when printing the report, an error message appears:

    “The value was outside the expected range”

    No matter how I changed the Barcode, this error message appears.

    BUT if I change the C1.WPF.Report.dll to C1.C1Report,

    the report appears without errors.

    The problem is, that according to C1, the C1.C1Report.dll is not licensed.

    (LicxGenerator.exe was used)

    I think there is an issue with the C1.WPF.Report.dll and printing PDF417…

    The working C1.C1Report.dll can not be used, because its not licensed…

    How can i solve the problem?

  • Posted 16 September 2018, 8:45 pm EST

    Hello,

    We could observe the issue at our end as well, and hence are discussing the same with the concerned team. Will get back to you once it is done.

    >>BUT if I change the C1.WPF.Report.dll to C1.C1Report, the report appears without errors.

    However, this scenario did not work for us and we observed errors while using C1.C1Report.4.dll. Kindly inform how you used the same dll in your wpf sample.

    [Internal Tracking ID: 343184]

    Best Regards,

    Esha

    Note: C1Report is now obsolete and C1Flexreport is our flagship reporting tool. Learn more about the same from here:

    https://www.grapecity.com/en/forums/winforms-edition/c1report-is-now-obsolete-t

    https://www.grapecity.com/en/blogs/migrating-from-c1report-to-flexreport

  • Posted 8 October 2018, 1:27 am EST

    Hello,

    I removed the C1.WPF.Report.dll from my project and added C1.C1Report.4.dll

    But i have no license to use C1.C1Report.4.dll.

    I need a solution ASAP please.

    I need to print a specific C1Report that includes the Barcode PDF417.

    Otherwise i get into trouble with a customer.

    Best Regards,

    Brendan Zinger

  • Posted 8 October 2018, 5:53 pm EST

    Hello Brendan,

    I am getting in touch with the development team, on priority. Will share an update as soon as I receive one from them.

    Best Regards,

    Esha

  • Posted 10 October 2018, 3:35 pm EST

    Brendan,

    As per the development team:

    This barcode type (Pdf417) is not supported by C1WPFReport.

    Unfortunately, there is no fix or workaround for that. It is supported in FlexReport and in the WinForms version of C1Report. But there is no way to add this support to C1WPFReport.

    Best Regards,

    Esha

  • Posted 14 October 2018, 6:47 pm EST

    Hello Esha,

    Thank you.

    now i have created a FlexReport.

    How can I print the FlexReport with C#?

    When using “C1FlexReport.Print();” an error message appears:

    “the operation is invalid due to the current state of the object”

    Even with an empty report, this error message appears.

    Used dll’s:

    C1.WPF.Document v4.0.30319

    C1.WPF.FlexReport v4.0.30319

    Best Regards,

    Brendan

  • Posted 15 October 2018, 4:50 pm EST

    Hello Brendan,

    You can print a C1FlexReport after rendering it, as shown here:

    http://help.grapecity.com/componentone/NetHelp/FlexReportWPF/webframe.html#PrintingFlexReport.html

    The said error is generally observed when Render method is not called or when DocumentSource property of the viewer is set before loading and rendering the report. Follow the similar syntax as below and the issue should no longer occur:

    C1FlexReport1.Load("rpt.flxr", "ReportName")
            C1FlexReport1.Render()
            C1FlexViewer1.DocumentSource = C1FlexReport1
            C1FlexReport1.Print()
    

    Best Regards,

    Esha

  • Posted 15 October 2018, 6:52 pm EST

    Hello Esha,

    many thanks.

    The FlexReport with PDF417 works fine.

    Can you answer one more question please?

    How can I set the PrinterSettings (CopyCount, PageOrientation, PageSize) ?

    My syntax didnt work:

    	"C1PrintOptions flxopt = new C1PrintOptions();
                flxopt.PrintTicket = new PrintTicket();
                flxopt.PrintTicket.CopyCount = AnzahlAusdrucke;
                flxopt.PrintTicket.PageOrientation = PageOrientation.Landscape;
                flxopt.PrintTicket.PageMediaSize = new PageMediaSize(PageMediaSizeName.ISOA5);
    
                flxrpt.Render();
                flxrpt.Print(flxopt);"
    

    I could not find a solution in the documentation für WPF.

    Best Regards,

    Brendan

  • Posted 17 October 2018, 5:22 pm EST

    Hello Brendan,

    Glad that the previous solution helped you.

    Now, to set the said properties (CopyCount, PageOrientation, PageSize) for printing a report, please use this modified code snippet:

    //Report's landscape orientation
              flxrpt.Layout.Orientation = OrientationEnum.Landscape;
              flxrpt.PageSettings.Landscape = true; 
    
              C1PrintOptions flxopt = new C1PrintOptions();
              flxopt.PrintQueue =LocalPrintServer.GetDefaultPrintQueue();
              flxopt.PrintTicket = flxopt.PrintQueue.DefaultPrintTicket;
              flxopt.PrintTicket.CopyCount = 2;
              flxopt.PrintTicket.PageOrientation = PageOrientation.Landscape;
              flxopt.PrintTicket.PageMediaSize = new PageMediaSize(1122.24, 1586);
    
              flxrpt.Render();
              flxrpt.Print(flxopt);
    

    Please ensure that you have set the appropriate paper tray for the printer so as to obtain the printed report on a paper with the same specified paper size.

    Best Regards,

    Esha

Need extra support?

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

Learn More

Forum Channels