Friday, April 13, 2012

Export to excel/word saves blank document or problems with the ReportViewer 2010 in the SharePoint 2010. Again.

Initial data
The disposition is the same like in the previous post: SharePoint 2010 -> Visual Web Part -> UpdatePanel -> Microsoft Report Viewer 2010.


Situation
MRV 2010 generates correct report in the  own report section. BUT when we click "Export to Excel/Word" and try to open generated  document -  we have a following warning:   "The file you are trying to open '<FileName.xls>', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do  you want to open the file now?". If we click yes - we have blank excel/word document.
 
Investigation
If we login as  web-server's admin user and   click "Export to Excel/Word" - we have correct documents without any warnings. If we login as" not admin" user  - we have problem. So the reason is somewhere in the permissions. By "Procees Monitor" I found that "Network Service" had write error in one directory when it was trying to create excel document. It was a signal.


Solution
This directory was "C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp".  So to solve this problem - I just added "Authenticated Users" to this directory with "Full Control " permissions.

BUT! This path is not fully correct answer. This path  just a special case... The correct answer is following - to add  "Authenticated Users" with "Full Control " permissions to the temporary directory of  your Web Application pool  account.  I had my pool that worked as "Network Service". So I used  path as above. But ,for example, if your pool has identity = "Administrator.Office", your path could be following: C:\Users\Administrator.OFFICE\AppData\Local\Temp. And don't forget to do it on the server, not  on your local PC.



It  solved this problem for me.  Hope it will help you.

15 comments:

  1. Awe-inspiring bequest! Your blog is attention-grabbing. I feel affection for it.

    ReplyDelete
  2. Good solution! I just intensify my knowledge about excel settings

    ReplyDelete
  3. great post, the "BUT!" helped me a lot. Thanks!

    ReplyDelete
  4. Thanks a lot! This really helped me out!

    ReplyDelete
  5. Thank you...:) you saved my time :)

    ReplyDelete
  6. There could be legal consequences for professionals who do not adequately store patient files so the wise professional will use a professional storage service.Self Storage

    ReplyDelete
  7. Data Analytics Company explores data meaningfully. It transforms the data into useful information by organising, interpreting, and structuring it. CronJ has been a trustworthy company for startups, small companies, and large enterprises. Hire the web of experienced Data Analysts for your esteemed project today.

    ReplyDelete
  8. Thanks for sharing this article. this article helps me to move forward to learn about data analytics in field.

    ReplyDelete
  9. Our Intelligent Video Analytics Solutions use artificial intelligence and machine learning to identify and remove particles in the video, identify each object using a professional Deep Convolutional Neural network, and classify each object for innovative surveillance analysis, such as search and filtration notifying, and aggregation of data and visualization.

    ReplyDelete
  10. Hello! Do you have problems with your customer support? You do not have time to serve them all, because of different time zones, or there are not enough communication channels? To solve all these problems, we offer you our outsource customer service call center shared services! We have been hiring supports for a long time, and we will select specialists for you who will solve all the problems!

    ReplyDelete
  11. Have you ever wondered what the actual costs of developing online applications and services are? And if the cost also includes the maintenance of your own development team who need to provide a workplace in the office? All this can significantly hit the budget. To minimize costs and still get a quality result, check out appentwicklung kosten and reduce your development costs today!

    ReplyDelete
  12. You may save a lot of money by purchasing an international SIM card. It might range from 60% to 80%. Many of the companies who provide worldwide Roaming IoT SIM Card, however, may only save you money in certain regions, and their pricing vary widely from one country to the next. If you are thinking about signing up with a certain service provider, you should look at their pricing page first.

    ReplyDelete
  13. Eminently, as indicated by the Display Counseling Gathering 2020 report, 93% of organizations that went to ERP arrangements noticed its positive effect on their organizations. No big surprise that ERP counseling organizations are sought after these days, and the worldwide market for ERP counseling will arrive at $86B by 2027, as per the figure of 2019 Unified Statistical surveying.

    Albeit the execution of Big business Asset Arranging frameworks can be very precarious and tedious, with an all around defensively covered expert, the organization can colossally benefit from carrying out Big business Asset Arranging programming over the long haul. What benefits it can bring for a business? We should examine this exhaustively>> erp implementation consultant salary

    ReplyDelete
  14. A World Data SIM card, also known as a Global Data SIM card, is a specialized type of SIM card that provides data connectivity to users across multiple countries or regions around the world. It is designed to offer international data services without the need to change SIM cards or incur high roaming charges while traveling to different countries.

    ReplyDelete