ReportViewer control - protected memory error when printing

Hello,

When me or my users try to print from the Windows Forms ReportViewer control to a specific printer (using PCL), the following error appears in the ReportViewerControl client area:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
It is only happening with the one printer of that type.
The error appears after choosing the printer to print to and selecting "Print" from the dialog. The "Printng page x of <reportname>" window never appears.
Does anyone know of this or a similar problem occuring elsewhere or if there are any downloads that could resolve it
Thank you


Answer this question

ReportViewer control - protected memory error when printing

  • Charlie Maitland

    Did you get an answer on this I'm having the same error message when trying to create a new stored procedure in Visual Studio 2005. From what I've seen in the postings, this is a global issue that randomly comes up in many different applications...

  • Scarlett

    I have the exact same issue here. Thankfully I've only dealt with customers who want electronic copies of document thus far, but I really wish printing issues would get resolved once and for all. Client side reporting is a great new feature, IMO, and printing would only make it better.

  • Zorpiedoman

    Still no answer on this. And now I have an additional error for a different printer: The handle is invalid.

    This one is for an HP 2600. Both errors consistently occur for all clients trying to print to each printer. Now, my users have no printer they can use and I'm forced to tell them to export to PDF, go to the PDF, print it out...I'm not going to write the code to automatically email or automatically send it to PDF when MSFT could come up with a fix anyday. Is anyone out there We are getting to a point where we might have to start considering another option, but I certainly don't want to :-)


  • Primo109

    I can atest that the solution to use the Print event works. It is not really a workaround as that is what the Print event is kind of designed for. Works really well!

  • Chippen

    workaround:

    use the print event of the report viewer to disable the printer dialog ( e.Cancel = true )
    , open an own printer dialog and than you can render and print the report by yourself
    (http://msdn2.microsoft.com/en-us/library/ms252091(VS.80).aspx)

    i use this and it works fine ;-)


    greeting




  • Vidit Mittal

    Nope, no response yet. I'm eager to get this figured out, too, because it is impacting my users' ability to print their reports to the primary printer they have.

    Do you consistently get the error when trying to create a new stored proc


  • budcan76

    I get the same error when simply running a report in the ReportViewer control.


  • BobMaupin

    I am having the same problems and see MS are just not willing to resolve this.

    Has anyone come across a solution as yet I am starting to get desperate as my client is highly irritated with this constant error problem. I have another week or so to find resolve, else I have to re-do the reports in Crystal. Would be a pity.


  • Chaz Clover

    The only way i figured out around this issue is to make sure the users have the printer they are printing to set as their default printer. For some reason, this seems to fix the issue in most cases for me.

    You would think in 2006 that they could a) get printing to work in general (automatically forcing the report control into Print Layout mode after it is done rendering the first time doulbes+ the render time) and b) that you could successfully print to something other than the default printer (hello, VB 5). Ugh.

    Honestly, I love reporting services and especially the WinForms control, but we may be forced into using Crystal or some other alternative as well. I have several reports where it throws a rendering error for no reason, and when the user clicks Refresh, it renders fine...probably the whole switching to Print Layout mode is messing things up too...darn.

    Please, MS, fix these issues so that I don't have to render the reports again in Print Layout mode and make users only print to their default printer..fix these, and we'll be darned happy for now (we'll forgive the slow initial render time for many-paged reports--we get why that is and can live with it for now).


  • Metall

    Has anyone gotten a response from Microsoft on this issue I have the same problem with my users. Only happens when not default printer. And, of course, the whole switching to print layout thing. Anyhow, wondered if Microsoft had decided to actually pay attention to the issue yet...
  • ReportViewer control - protected memory error when printing