Continuous Paper not working

34 posts, 0 answers
  1. Milen
    Admin
    Milen avatar
    181 posts

    Posted 19 Dec 2018 Link to this post

    Hello Yves,

    This is a valuable input. So basically the observed behavior shows that in the context of the console application the Windows Print Dialog opens with the "short" page settings, meaning that it (the dialog) gets the non - "user specific" settings.

    Here is the code the opens the dialog when you do not provide valid PrinterSettings:

    using (var printDialog = new System.Windows.Forms.PrintDialog())
                {
                    printDialog.AllowSomePages = true;
                    printDialog.UseEXDialog = true;
                    printDialog.AllowCurrentPage = allowCurrentPage;
     
                    if (null != printerSettings)
                    {
                        printDialog.PrinterSettings = printerSettings;
                    }
     
                    if (DialogResult.OK != printDialog.ShowDialog())
                    {
                        return false;
                    }
     
                    printerSettings = printDialog.PrinterSettings;
                    return true;
                }

    How about if you copy the whole code snippet into a button click handler in a Windows Forms or WPF app? Does the Print Dialog get initialized correctly? I am running out of other ideas. It seems to me that the driver returns the incorrect set of settings in some cases. Thank you for finding out that fixing the non-"user specific" page settings mitigates the issue for this printer.

    Regards,
    Milen
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  2. Yves
    Yves avatar
    17 posts
    Member since:
    Apr 2015

    Posted 24 Jan in reply to Milen Link to this post

    Hi Milen, 

    sorry that it took me so long to respond. 

    When using the following snippet in WinForms, the dialog opens but it is also using the non-user default settings.

    01.private void button1_Click(object sender, EventArgs e)
    02.        {
    03.            var reportWithContinuousPaper = @"ReportContinuousPaper.trdp";
    04. 
    05.            Telerik.Reporting.Processing.ReportProcessor reportProcessor
    06.                = new Telerik.Reporting.Processing.ReportProcessor();
    07. 
    08.            Telerik.Reporting.UriReportSource uriReportSource =
    09.                new Telerik.Reporting.UriReportSource();
    10. 
    11.            uriReportSource.Uri = reportWithContinuousPaper;
    12. 
    13.            reportProcessor.PrintReport(uriReportSource, null);
    14.        }

    I also have no more clues to get closer to this issue. Maybe it is a driver related issue but it's still very strange that the Telerik Designer seems to get the right informations and a console/Winforms app doesn't. 

     

    So it seems we have to use the found workaround to correctly print on continous paper with some devices.

     

     

  3. Yves
    Yves avatar
    17 posts
    Member since:
    Apr 2015

    Posted 24 Jan in reply to Milen Link to this post

    Hi Milen, 

    sorry that it took me so long to respond. 

    When using the following code snipet in WinForms App the print dialog gets opened correctly. But it also gets the "wrong" non-user default settings, even i configured the printer on my user correctly. 

    01.private void button1_Click(object sender, EventArgs e)
    02.        {
    03.            var reportWithContinuousPaper = @"ReportContinuousPaper.trdp";
    04. 
    05.            Telerik.Reporting.Processing.ReportProcessor reportProcessor
    06.                = new Telerik.Reporting.Processing.ReportProcessor();
    07. 
    08.            Telerik.Reporting.UriReportSource uriReportSource =
    09.                new Telerik.Reporting.UriReportSource();
    10. 
    11.            uriReportSource.Uri = reportWithContinuousPaper;
    12. 
    13.            reportProcessor.PrintReport(uriReportSource, null);
    14.        }

     

    I also don't have any further ideas to get closer to this issue. Maybe it's some driver related issue but it's weired that the Telerik Report Designer is acting different than a WinForms App. So it seems there is a way to control this behaviour whats not used in the Console/Winforms App.

    I think to support continous printing via your reports we will have to use the found workaround via "non-user" default settings on some devices. That's okay for me so far. 

     

    Best Regards, 

    Yves

  4. Milen
    Admin
    Milen avatar
    181 posts

    Posted 29 Jan Link to this post

    Hi Yves,

    Thanks for looking into the issue. This was not exactly what I suggested. My idea was to use the exact snippet of my last reply to see if the System.Windows.Forms.PrintDialog loads correctly and returns the user-specific settings when the dialog gets closed (asserted using debug or trace). No reporting involved. However i suspect the result will be the same, confirming that this is printer driver specific behavior. Please give it a try when you get the chance.

    Regards,
    Milen
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top