none
Report Viewer error on export PDF or Excel from Azure Web Sites

    Question

  • Hi,
    When I try to export any RDLC report on PDF or Excel I obtain the error:

    [ArgumentException: Parameter is not valid.]
       System.Drawing.Graphics.GetHdc() +1153145
       Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +75
      ...
      
    I Try with Microsoft.ReportViewer.WebForms.dll version 10.0.40219.329 (Report Viewer 2010) and with version 11.0.40219.329. (Report Viewer 2012).

    The same code works on premises server or on "Azure Cloud Service" Web Instance.

    Any help would be highly appreciated.
    Thanks.


    LQ

    Monday, July 02, 2012 3:04 PM

Answers

  • We are able to reproduce this issue locally, and knows what happened as well. We have an item tracking this issue, we will keep you posted on the status. but at this moment, we don't have to much to share what will go on.

    Thanks,

    Wei

    Monday, October 15, 2012 2:38 AM
    Moderator

All replies

  • Hi,

    This calls into an native GDI API, and that API returns an error code which translated to invalid parameter. I could see couple of customer cases on Premise environment as well. This better goes to ReportingService or GDI forums.

    thanks,

    Wei

    Tuesday, July 03, 2012 2:48 AM
    Moderator
  • Hi,

    This calls into an native GDI API, and that API returns an error code which translated to invalid parameter. I could see couple of customer cases on Premise environment as well. This better goes to ReportingService or GDI forums.

    thanks,

    Wei

    This is an issue with the ReportViewer on Azure Website platform.  I have run into exactly the same scenario.

    As the O.P. stated, it works in Azure Cloud Service, the issue in on Azure Website platform, so this is a platform dependent bug and therefore this should be the appropriate forum.

    Wednesday, August 22, 2012 11:17 PM
  • This was reported here: Previously reported issue and passed off and closed by the admins.  As reported in that thread, the bug exists on the Azure Web Site platform, as the original poster explained.  It does not occur in Azure services.  This is a platform dependent bug, and should be addressed in this forum and not passed off as a ReportViewer bug or GDI bug, kicking the issue down the road where it will most likely not be addressed.


    Wednesday, September 05, 2012 6:54 PM
  • Hi. We'll have to look into this further and let you know. It will take a little time to set this up and check into it.

    Thanks.


    Jim Cheshire | Microsoft

    Thursday, September 06, 2012 1:23 PM
    Moderator
  • Hi Mzerda,

    Can you please past the full exception include call stacks here? And give us a simple project to reproduce this issue?

    Thanks,

    Wei

    Friday, September 07, 2012 1:26 AM
    Moderator
  • Hello

    I am also getting this error when trying to render a PDF report.

    Call stack pasted below.

    Thanks
    David

    Parameter is not valid.

    Description:
    An unhandled exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the error and
    where it originated in the code.

    Exception Details:
    System.ArgumentException: Parameter is not valid.

    Source
    Error:
    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.

    Stack Trace:
    [ArgumentException: Parameter is not valid.]
       System.Drawing.Graphics.GetHdc() +1153145
       Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +63
       Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Single& contentHeight) +489
       Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +386
       Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
       Microsoft.ReportingServices.Rendering.HPBProcessing.RowInfo.CalculateVerticalLastDetailCell(PageContext context, Boolean firstTouch, Boolean delayCalc) +419
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailCell(Tablix tablix, TablixMember colMemberParent, Int32 colGridIndex, RowInfo rowInfo, PageContext pageContext) +826
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List`1 detailCellsState, PageContext pageContext) +108
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List`1 detailCellsState, PageContext pageContext) +862
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailRow(Tablix tablix, TablixMember rowMemberParent, Int32 parentRowIndex, Int32 parentColIndex, PageContext pageContext) +292
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +139
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +3529
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixRows(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, List`1& pageStructMemberCell, Boolean ignoreTotals, Boolean& finishLevel, Boolean parentHasFooters, CreateItemsContext createItems, Double startInTablix, Double endInTablix, PageContext pageContext) +3034
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems(Tablix tablix, PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix) +113
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateVertically(PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix, Double topInParentSystem) +290
       Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +636
       Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
       Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Boolean resolveState, Boolean resolveItem) +281
       Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +145
       Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +704
       Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages) +833
       Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.NextPage() +54
       Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.Init(Report report, PaginationSettings pagination, CreateAndRegisterStream createAndRegisterStream, Hashtable& renderProperties) +356
       Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing..ctor(Report report, PaginationSettings pagination, CreateAndRegisterStream createAndRegisterStream, Hashtable& renderProperties) +35
       Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +110
       Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) +67
    
    [LocalProcessingException: An error occurred during local report processing.]
       Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +346
       Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +147
       Microsoft.Reporting.WebForms.LocalReport.Render(String format, String deviceInfo, PageCountMode pageCountMode, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) +31
       
    Monday, September 10, 2012 8:13 PM
  • Hi Retne,

    I have read the source code, and it called into a native API. To move further, can I have a repro?

    Thanks,

    Wei

    Tuesday, September 11, 2012 7:25 AM
    Moderator
  • Code to repro below:

    Dim renderedBytes() As Byte
    Dim reportType As String
    Dim mimeType As String
    Dim encoding As String
    Dim streams() As String = Nothing
    Dim deviceInfo As String
    Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing
    renderedBytes = Nothing
    reportType = "PDF"
    mimeType = "application/pdf"
    encoding = Nothing
    deviceInfo = "<DeviceInfo><OutputFormat>PDF</OutputFormat><PageWidth>297mm</PageWidth><PageHeight>210mm</PageHeight><MarginLeft>5mm</MarginLeft><MarginRight>5mm</MarginRight><MarginTop>5mm</MarginTop><MarginBottom>5mm</MarginBottom></DeviceInfo>"
    
    renderedBytes = ReportViewer1.LocalReport.Render(reportType, deviceInfo, mimeType, encoding, "PDF", streams, warnings)
    
    System.Web.HttpContext.Current.Response.Clear()
    System.Web.HttpContext.Current.Response.ContentType = mimeType
    
    System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=FEE_SUMMARY.PDF")
    
    System.Web.HttpContext.Current.Response.BinaryWrite(renderedBytes)
    
    System.Web.HttpContext.Current.Response.End()
    

    Tuesday, September 11, 2012 8:24 AM
  • Hi,

    I'm having the exact same problem with my starting project on Azure,

    i must also add thei information : even the export button from the reportviewer control on the page gives exactly the same error message as when you use the render from code.

    thanks

    Tuesday, September 11, 2012 9:08 AM
  • Hi Retne,

    unfortunately, this code is not working. It even not pass the compilation. there is no rdlc specified, no data source specified, etc.

    Thanks,

    Wei

    Wednesday, September 12, 2012 3:16 AM
    Moderator
  • No worries, I have reproduced the problem myself. Will update you once I found the cause and solution.

    Thanks,

    Wei

    Wednesday, September 12, 2012 6:45 AM
    Moderator
  • I was gone for the weekend and happy to return and find others stepping in to assist in this issue -- thanks to all!  Thanks also to the admins for the quick service in reproducing the problem! 

    • Proposed as answer by Digital Consult Wednesday, September 12, 2012 8:40 PM
    • Unproposed as answer by Digital Consult Wednesday, September 12, 2012 8:41 PM
    Wednesday, September 12, 2012 7:09 PM
  • I have been  searching for a solution all day long (all my project depends on this) and by reading many different topics (including on oher reporting solutions) here was my conclusion:

    the render pdf uses the gdi+ api, but that api need more permission than what we get in azure website rôle,

    so i decided to convert my project into a web role for azure. And there, after many hours (thanks to the very very slow publishing process for web role), i managed to have the reportviewer render to pdf, bye bye the depressing "parameter is not valid"

    from what i read the difference lies with the fact that web role can be configured with .net full trust

    hope it helps

    • Proposed as answer by Digital Consult Wednesday, September 12, 2012 8:44 PM
    • Unproposed as answer by Digital Consult Wednesday, September 12, 2012 8:45 PM
    Wednesday, September 12, 2012 8:42 PM
  • This makes sense. Usually, it this was due to assembly security, we use to get a securityexception. I will try to dig out the cause.

    thanks,

    Wei

    Thursday, September 13, 2012 2:02 AM
    Moderator
  • Hello Digital Consult

    I am glad you have found a workaround for your project however this does not work for me as I need to find a way of getting it working on the Azure Websites platform, I already have projects working OK on web roles.

    Any help by others much appreciated.

    Thanks

    Thursday, September 13, 2012 8:44 AM
  • I understand, and converting my project was not my first choice either.

    but from all i have read about different reporting solutions, i came to the point that making it work on Azure website may be impossible at this time, until Microsoft modify the website platform.

    yesterday i also tried the reporting solution from telerik, which is stated to work in azure, and in Azure website it was not workign either.

    Thursday, September 13, 2012 10:18 AM
  • Any news on a resolution to this problem?

    Thanks

    Friday, September 14, 2012 8:41 AM
  • I am still in the process to get permission to debug this on the live servers.

    thanks,

    Wei

    Monday, September 17, 2012 3:26 AM
    Moderator
  • Hi WZhao

    Are you any closer to getting permission to debug this problem.

    Thanks

    Monday, September 24, 2012 7:00 PM
  • FYI:  I am trying to move a site to Azure and am getting the exact same exception (the stack is identical).

    This line of the stack got my attention:

    Microsoft.ReportingServices.Rendering.ImageRenderer

    The report has a logo on it which may be related.


    Steve Wellens

    Tuesday, September 25, 2012 1:02 AM
  • I live debugged this issue with my repro. Here is my findings.

    Reporting Service called into GDI, and finally failed with this call(CreateCompatibleDC(null)).

    http://msdn.microsoft.com/en-us/library/windows/desktop/dd183489(v=vs.85).aspx


    The CreateCompatibleDC function creates a memory device context (DC) compatible with the specified device. If this handle is NULL, the function creates a memory DC compatible with the application's current screen.

    Based on this MSDN description, instead of security issue, I believe this issue related to user profiles. Azure Web Role, the default application pool identity is Network Service. For Windows Azure Web Site, the default identity is a random generated account. This should makes the difference.

    I am trying to create a case to test this, will keep you posted.

    Thanks,

    Wei

    Tuesday, September 25, 2012 7:55 AM
    Moderator
  • Wei,

    It sounds like your are on the right track!   Thanks for keeping us informed.

    [EDIT]  Would it make sense to open a support ticket?


    Steve Wellens


    Wednesday, September 26, 2012 12:39 AM
  • Thanks Steve.

    We have identified what happened. For security issue, Windows Azure Web Sites restricts the web application to access some system resources(Including GDI API). We are now tirage on this issue, and will update as soon as I have an update.

    Thanks,

    Wei

    Monday, October 01, 2012 7:47 AM
    Moderator
  • We are now tirage on this issue...

    Tirage?   I'm not sure what you meant.


    Steve Wellens

    Wednesday, October 03, 2012 4:21 PM
  • I have the same issue, It was solved?

    yorengoy

    Friday, October 12, 2012 2:10 AM
  • Why was this marked as an answer?

    It's not resolved and Microsoft is studying the issue.


    Steve Wellens


    Friday, October 12, 2012 4:12 PM
  • No, it is not solved.

    Steve Wellens

    Friday, October 12, 2012 4:14 PM
  • Steve,

    This was marked as answered months ago after Wei posted that this happen on-premise as well and was related to a GDI API call. It was after that time that more information surfaced, so I've unmarked it.

    I believe that it was determined that this is caused by the fact that WAWS doesn't allow certain APIs, but I'll let Wei comment on that.


    Jim Cheshire | Microsoft

    Friday, October 12, 2012 4:16 PM
    Moderator
  • It's definitely NOT resolved!  From my understanding it's going to need Web Sites to loosen security settings so the control can make GDI calls or the control will need a hot-fix to find an alternative to making GDI calls for PDF rendering.  Also my understanding that Microsoft was working on a fix -- I hope I'm not mistaken.  I think it is obvious by the number of people who have run into this issue (just in this thread alone), that this is a serious issue that needs a resolution.

    Wei's last response mentioned something about "tirage"... I think he meant "triage" which would imply a forthcoming resolution (again, I hope I am not mistaken).

    • Edited by mzerda Friday, October 12, 2012 7:05 PM
    Friday, October 12, 2012 7:02 PM
  • We are able to reproduce this issue locally, and knows what happened as well. We have an item tracking this issue, we will keep you posted on the status. but at this moment, we don't have to much to share what will go on.

    Thanks,

    Wei

    Monday, October 15, 2012 2:38 AM
    Moderator
  • For tracking purposes, I'm marking this as answered. We are tracking this issue internally.


    Jim Cheshire | Microsoft


    Monday, October 15, 2012 2:29 PM
    Moderator
  • Is there any progress on this issue?  Do you have a timesacale on a resolution?

    Thanks

    Monday, October 29, 2012 11:55 AM
  • Is there anyway for us to track this issue, besides this thread?

    Thank you,

    Tuesday, October 30, 2012 12:12 AM
  • Jim

    Is there any progress on this issue or a workaround?  It is holding up progress on a couple of our projects.

    Thanks
    David

    Monday, November 12, 2012 11:42 AM
  • I run into the same problem. Just as i was discovering the fast Azure Website deployment for dev/test.

    Hope a solution will be there some time ssoon.

    peter


    -- Peter

    Tuesday, November 27, 2012 10:36 PM
  • sorry guys, this is still on our plate.
    Wednesday, November 28, 2012 2:53 AM
    Moderator
  • hey guys, just to let you know we are watching this thread!

    I have the same problem. It's been several months since this issue has been reported. Please do something, the PDF export feature is crucial for my website http://www.CanvasBM.com so if nothing happens this week I'm moving my website to the old hosting, which is much cheaper by the way for my 1000+ visitors per month. Azure is too expensive for me at this moment $30+/mo!


    http://victorantos.com


    Wednesday, December 05, 2012 12:43 PM
  • After much wasted time and hair pulling I have arrived here to find out MS is at fault not my reportviewer. Hopefully they will play nice together soon. In the mean time I have a (not pretty) workaround for the saving to a PDF. I installed the free download CutePDF™ Writer by Acro Software, Inc on the computers that access the site and need to save the report to a PDF. Since your ReportViewer does print successfully from Azure this program will intercept the print and save it to a PDF file instead.


    • Edited by SSDiver2112 Thursday, December 13, 2012 9:42 PM
    Thursday, December 13, 2012 9:41 PM
  • Hi Guys,

    Same problem here. Any news?

    Thanks

    Monday, December 17, 2012 2:48 PM
  • Can we please get an update as to if and when this will be fixed?  This not working is a deal breaker right now.
    • Edited by tnavjav Wednesday, December 26, 2012 2:33 AM
    Wednesday, December 26, 2012 2:32 AM
  • I'm having the same issue here using Telerik Reporting directly to PDF. Seems like the only work around is to convert my web application into a Cloud Service.

    WZhao - You said that this is still on Microsoft's plate. Is this something that will be fixed within Azure Websites or are Cloud Services our only solution?

    Thank you,

    Shawn

    Thursday, January 03, 2013 1:12 PM
  • Same problem here. Any news?
    Thursday, January 10, 2013 6:40 PM
  • I'm having the same problem. Not being able to render the ReportViewer "kills" the possibility of having a LOB app in Azure WebSites.

    Is there an expected date for this to be solved?

    Thursday, January 10, 2013 7:13 PM
  • I am seeing the same error.  Is there an update for this issue or is there another thread that we can follow?

    Thanks,
    Garry

    Friday, January 11, 2013 3:30 AM
  • There are some intricacies involved in opening up this capability that will have to be dealt with before this will work, and there is no promise that those can be resolved. As of right now, we don't have any announcements to make.


    Jim Cheshire | Microsoft


    Friday, January 11, 2013 2:28 PM
    Moderator
  • Jim

    Thanks for the update.  Very disappointed with your original answer that the the fix would not happen in the short term.  Even more disappointed that you have changed your answer to say that a fix may never happen.  It has taken 4 months to get to this position. 

    I am a big fan of Azure Web Sites but this news really causes a major problem for several of our projects.  If I can use the ReportViewer PDF Export on Windows shared hosting platforms provided by most Hosting companies why I can I not use it on Azure Web Sites?

    If a fix is not going to happen short term, or ever, what is your official advice for reporting on sites that are going to be deployed on Azure Web Sites, what is the work around or alternative.  Are you saying Azure Web Sites is not suitable for any project that involve reports?  Is there any other functionality that will not work on Azure Web Sites?  Can you add this to the documetation so we don't waste our time deploying projects that are never going to work?

    Regards
    David


    • Edited by retne Monday, January 14, 2013 9:53 AM spelling
    Monday, January 14, 2013 9:52 AM
  • I did not intent to imply that this will never be addressed. Resolving this is in the long-term plans, but a fix won't happen in the short-term.

    Thanks.


    Jim Cheshire | Microsoft

    Monday, January 14, 2013 4:20 PM
    Moderator
  • I did not intent to imply that this will never be addressed. Resolving this is in the long-term plans, but a fix won't happen in the short-term.

    Thanks.


    Jim Cheshire | Microsoft

    This issue was first brought to your attention in early July, last year, and just now you're saying this won't be resolved any time soon.

    Let's just be frank here -- HUMONGOUS FAIL!!!


    • Edited by mzerda Monday, January 14, 2013 7:42 PM
    Monday, January 14, 2013 7:41 PM
  • Jim

    Thanks for the reply.  Can you give me an idea what short term and long term mean?  As I have previously stated this has been going on for 4 months already.

    Regards
    David

    Monday, January 14, 2013 7:48 PM
  • We don't have any announcements to make regarding timelines. All I can tell you is that it is on the long-term plan.


    Jim Cheshire | Microsoft

    Monday, January 14, 2013 10:35 PM
    Moderator
  • Jim

    I am not asking for an announcement, I simply want to understand what timeframe you mean when you say 'short term' and what time frame you mean when you say 'long term'.  This will help me make some informed decisions.  Is long term more than six months for example?

    Also, can you explain why this is still a problem with the Reserved-Instance model when this uses a dedicated virtual machine.  

    Regards
    David  


    • Edited by retne Monday, January 14, 2013 11:21 PM
    Monday, January 14, 2013 11:20 PM
  • Hi, David. I really can't give you a timeline, not because I'm trying to avoid it, but simply because we don't know. However, I can tell you that it's not likely to happen within six months.

    This capability is not enabled in any scale mode for Windows Azure Web Sites. We don't have different feature sets in different staging modes.


    Jim Cheshire | Microsoft

    Tuesday, January 15, 2013 1:35 AM
    Moderator
  • Hi,

    I am trying to port a hosted application across to Azure Websites and have hit this problem with Reporting Services under Azure Websites.

    We need to be able to produce invoices in pdf output format so that they're viewable on tablets and cannot be [easily] amended by the receiving customer.

    Is there likely to be a solution in the near future or should I be looking at other reporting tools ?

    Chris C.

    Cloud Software

    Saturday, March 16, 2013 11:33 PM
  • Hi, Chris. If you're looking for the ability to generate PDF files server-side via WAWS, it's not something that you can expect to be able to do within the next few months at least.


    Jim Cheshire | Microsoft

    Monday, March 18, 2013 1:07 PM
    Moderator
  • Hi Chris

    For producing invoices as PDF i would recommend using dox42 (www.dox42.com).

    Right this week we released dox42 3.1 which can run on Azure Websites.

    HTH + best regards
    Christian


    Tuesday, March 19, 2013 2:57 PM
  • Because of this issue, I am now using Azure Reporting Services.  Export to PDF is working, however export to Excel does not work when the report has a Chart. 

    I have created a new question for this issue, but I haven't received a reply.  Are these exceptions related?

    http://social.msdn.microsoft.com/Forums/en-US/ssdsgetstarted/thread/71b6c20d-f902-408d-a81f-5f1f7bb7b7b9/#71b6c20d-f902-408d-a81f-5f1f7bb7b7b9

    Thanks,

    Garry


    • Edited by Garry English Thursday, March 21, 2013 12:12 AM typos
    Thursday, March 21, 2013 12:09 AM
  • So has everyone come to the conclusion that this will never get resolved? 
    Friday, July 05, 2013 3:50 PM
  • I've been following this thread now for over a year, and this is the largest issue that has kept me from migrating most of my site to Azure Web Sites.  I've worked around this by using VMs, but it's a little upsetting that not only has there not been a fix, there hasn't even been an announcement of when this could be fixed.  Being able to generate PDFs is a fairly simple requirement for a website, and using Reporting Services is a bit of an overkill in many situations.  

    Has anyone come up with a simple work around or other idea that doesn't involve rewriting a lot of code?  

    Sunday, August 18, 2013 2:26 PM
  • I did find a workaround to report viewer control long time ago.

    I think am using  iTextSharp or somehting like this to generate a PDF file, you can see it here http://www.CanvasBm.com the 'PDF export' link at the bottom of the page.

    There is canvas.rdlc file on the server which I dynamically data bind. 


    http://victorantos.com




    Sunday, August 18, 2013 3:08 PM
  • I have the same issue and waiting a long time for an answer. Disappointed.  No resolution for this and will likely cause me to move my site. Anyone have experience with Amazon cloud services or any other service out there? 

    Monday, August 26, 2013 12:47 AM
  • Any news here? Got the same error from my azure website:

    [ArgumentException: Parameter is not valid.]
       System.Drawing.Graphics.GetHdc() +1144409

    It's working as a cloud service.

    Azure showstopper =(

    Regards


    • Edited by ep7000 Friday, September 20, 2013 1:45 PM
    Friday, September 20, 2013 1:44 PM
  • Same problem here :/

    Is there any workaround ? Azure SQL reporting is too expensive for a site generating 15 reports A DAY (not per hour !).

    Does Microsoft think  that websites generating a few reports have to forget reporting or move to standard windows hosting provs ? Why ? 

    @Victor Antofica : please could you clarify you August post about the relation between rdlc you have on the server and iTextSharp ?


    Marco

    Sunday, September 29, 2013 6:49 AM
  • I am blocked by this issue as well.  I use Telerik Reporting, and can not migrate onto cloud solution until my users can use reporting.
    Tuesday, October 01, 2013 6:00 PM
  • You won't be able to do PDF generation server-side with WAWS because we don't allow the necessary APIs. Your options are to use a Web Role or to use an Azure VM.


    Jim Cheshire | Microsoft

    Monday, November 04, 2013 5:31 PM
    Moderator
  • Is this the final answer? If so, I am afraid I will have to look for a new hosting solution. How can you just not support something that is critical to so many sites? 
    Tuesday, January 07, 2014 1:19 PM
  • I am new to the Azure platform and currently evaluating key elements before committing fully. This issue seems to be causing me concern and may, as in Bbecks reply prompt me to investigate other hosting solutions. I would agree with BBecks that MS should support the use of Reportviewer and the export to PDF function as this is fundamental to a vast number of business sites. 

    Other than Web role and Azure VM which seem a little over kill, is there any solutions available or enhancements in the pipeline that would resolve this issue.

    Is this a feature or by design?

    Tuesday, January 07, 2014 6:02 PM
  • Hello Wei.

    Any news about this issue?

    Do you have any workaround to produce a file from a windows azure web site?

    It is actually a really problem.

    Thanks a lot,

    Stéphane.

    Wednesday, February 12, 2014 8:00 AM
  • As of right now, this is by-design. Some APIs are not allowed in WAWS for security and performance reasons. The GDI APIs that are necessary for generating PDF files are among those that are blocked.


    Jim Cheshire | Microsoft

    Friday, February 14, 2014 3:00 PM
    Moderator
  • I can understand this when a site is running in Free or Shared mode but I don't see how it could be a security issue for sites running in Standard mode?

    Regards

    David

    Friday, February 14, 2014 3:12 PM
  • Hi,

    > I'm having the same problem. Not being able to render the ReportViewer "kills" the possibility of having a LOB app in Azure WebSites.

    I personally think, that this so called security issue is just a friendlier word for MS strictly saying, no we dont't want for pure marketing and mainly money reasons that you can use LOB apps with Azure WebSites, If you want to do LOB apps you have to use the more expensive Web services ...

    I don't expect any change on that

    mfg

    Klaus Oberdalhoff 


    Klaus Oberdalhoff Germany

    Wednesday, April 02, 2014 2:45 PM
  • David,

    Good point ! Why it is not working in basic and standard mode ? Specially now with the basic mode (better price) it would be easier to recommend this service to customers...

    Friday, April 04, 2014 1:24 PM