.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Programmatically generating html report using ReportExecutionService class fails

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :Sql Server

Hello All,

I am utilizing the ReportExecutionService class in MSRS 2008 to programmatically generate reports in a .NET Windows program. I have two Web References, one for ReportingService2005.asmx and one for ReportExecution2005.asmx. I am using ReportExecution2005 namespace to instantiate the ReportExecutionService object.

The problem is that generating report content using the ReportExecutionService.Render method is not working consistently. It works a few  times and then throws a 
"Client found response content type of ', when expected 'text/xml'. This is happening for reports that worked great on a prior test (same report name, same path, same parameters). Does anyone know if I need to change any settings in SSRS to correct this issue. Below is the code

ReportExecutionService res = new ReportExecutionService();
res.Timeout = System.Threading.Timeout.Infinite;
res.Url = url.vvlu_char_vlu_cd.ToString();

res.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Render arguments
byte[] result = null;
string reportPath = @"../../../Stuff";
ExecutionInfo ei = new ExecutionInfo();
ExecutionHeader eh = new ExecutionHeader();
res.ExecutionHeaderValue = eh;

string format = "HTML4.0";
string devInfo = @"<DeviceInfo><Toolbar>False</Tool

View Complete Post

More Related Resource Links

Generating and storing html pages in User Directories on the server



I come from corporate asp.net development, and I am now working on a public website which will get a lot of traffic, perhaps a million users a day.  So I am faced with a ton of performance and scalability questions.

I would like to share some thoughts and see if my approaches resonate with any good practices, or perhaps I am heading down the wrong path...  Either way, I want to hear opinions.

(My number one concern is the fact that I am using asp.net for a public website.  I don't know of a lot of websites using asp.net)

I am using asp.net 2.0 (I know, its not the latest technology but I don't need any advanced features of asp.net 3.5 or 4, unless there are significant improvements geared towards what I am doing) 

On launch date, this will be running on a dedicated Windows Server 2008 running on Intel ATOM 330 1MB L2 Cache 1.6Ghz Dual-Core with 2GB DDR RAM.  Its fully managed by a full service hosting company which gives me an option to upgrade to a bigger server within a few hours.  I can even move the site to a webfarm if the traffic demands it.

So I have a User Dashboard, where users can create albums and upload pictures.  So what I am doing

SQL Server 2008 installation fails There was an error generating the XML document. Error code 0x84B

My system config: window XP - SP3 4 GB RAM, I have VS2008 with SP1, VS2010 Ultimate installed First when I tried to install SQL 2008 R2 Dev edition I got an error saying vs2008 SP1 was not installed, infact I had the SP1 installed in my m/c.  I did reinstalled the SP1 and tried to install SQL again. while in the final installation process I got the error  "Setup has encountered the following error: There was an error generating the XML document. Error code 0x84B10001." I uninstall the SQL server again to remove the files which were created from Unsuccessful installation I removed the register entry as suggested by this forum. reinstalled but no chance, I have tried all the option which I can get know in web. Please help me. here is the log files details  Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException 2010-08-26 14:54:53 Slp:     Message: 2010-08-26 14:54:53 Slp:         There was an error generating the XML document. 2010-08-26 14:54:53 Slp:     Stack: 2010-08-26 14:54:53 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) 2010-08-26 14:54:53 Slp:   &nb

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in Silverlight without bind to any datagrid and other control? Please help.chanmm

How to update row using Domain Service Class programmatically?

How to update row using Domain Service Class programmatically in silverlight without binding to any datagrid and so? Please help.  chanmm

Report Builder Report manage data sources - relink programmatically

As part of a site definition solution several report builder report rdl files are uploaded to a report folder.  After a site is created with the defintion, the reports must be manually re-linked to the data source through the UI context menu ("Manage Data Sources").  I have been trying to figure out how to do the re-linking programmatically without luck.  Any ideas? ( Reporting Services is configured as integrated with sharepoint)

SQLTask fails :: f"Retrieving the COM class factory for component with CLSID {19E353EF-DAF4-45D8-9A0

OS :: Windows 2008 R2 x64 SQL :: 2008 R2 Enterprise x64 The package and task worked fine untill I migrated to a different server, now the SQL Task fails with the following error msg, see below. The package was developed on the same OS & version of SQL.   SSIS package "Package.dtsx" starting. Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "" failed with the following error: "Retrieving the COM class factory for component with CLSID {19E353EF-DAF4-45D8-9A04-FB7F7798DCA7} failed due to the following error: 800700c1.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task SSIS package "Package.dtsx" finished: Success.  

Possibility of HTML report in asp.net

Dear all,            I need your help on how to generate HTML reports in an asp.net application.The report content should be database driven. since we have faced some problems with Crystal reports during the Deployment ,and also it takes some time to load data,rapidly it affects the performance of application. Regards, Nivas K

Advanced HTML Report Design

Aside from using Reporting Services an such - I was wondering if there were any suggestions to this logic: * ASP.NET Repeaters to generate the output of the report - sortable columns. * Use SQL Stored Procedures to generate the data. My painful hurdle right now is sorting (eventually implement throttling with SQL paging). I really don't want to do stored procedure sorting nor do I want to call the stored procedure every time I want to sort. So my solutions I've came up with so far: 1. Store a datatable in session and do sorting on it and bind it to the repeater. 2. Store the datatable as xml form in a blob field in SQL database - when the user sorts, we retrive the xml, convert to datatable, then sort, rebind repeater. 3. Insert all the report data into a "temp" (a more permenant table used just for storing output) sql table, and just perform queries off of it with sorting. - I really don't like this option. Does anyone else have any suggestions? Is it the norm out there to use reporting services? I'm wondering what everyone else is doing when it comes to web based reporting without licensing other products. Thanks in advance,Reece

It is possible Html Formatted Textbox in RDLC (microsoft Report Viewer)

I am trying to create a rdlc report.   One of the fields in the report contains HTML formatted information. e.g. (It's a text field which is populated from a Rich Text Editor similar to one we have here).   When I put the content of this, in a text box of RDLC file, it shows HTML instead of formatted output.   I have been doing this in Crystal Reports using Text Format tag in there.   Is there some similar option available for RDLC text box too? I could not find any.  

Bug report: MouseMove on document fails over disabled objects.

I found a bug in the event handler code of the client library related to document-mousemove and disabled DomElements. Steps to reproduce: 1. Add an input button to the page and disable it:               <input type="button" id="Button1" value="Button 1" disabled="disabled" />  2. Attach a mousemove event to the document in the init event of the application:              Sys.Application.add_init(function() { $addHandler(document,'mousemove',function(e) { }); }); 3. Run the page in IE and move the mouse over the disabled button. An exception is thrown:             Microsoft JScript runtime error: Sys.ArgumentException: Value must be a DOM element. Parameter name: element This problem occurs because the event target is not null, but an empty object. The DomEvent handler tries to get the location of the element, but fails when it realizes that this is not a DomElement (Since MSAJAX doesn't check for argument types in non-debug mode, it there tries to get a property of the object that doesn't exist which fails too). Because of IE's buggy mouseover/out eventhandlers, attaching a mousemove event to the document is

catch the html button click event on a class file including html text box value.


I want to catch the html button click event on a class file including html text box value..

<p><input name="" type="text"  value="Enter Name*"/></p>
<p><input name="" type="text"  value="Enter Email*"/></p>

  <input name="Input" type="submit" value="Submit" />

plz tell me how can i do this..

Report always fails, need description


OK, this may sound like a total noob question:

I'm not too familiar with SSRS.  I've created stored procedures for report data sources, and I've built and deployed a few reports over a year ago.  Other than that, I haven't used it much.  Now we have a report that seems to always fail.  It is part of the CRM application, and was not created by us.  We are using SQL Sentry to monitor that server, so that's how I realized it was failing.  However, I can't figure out why it's failing.  I need to be able to see some detailed info regarding the failure (i.e. the kind of info one might see in a job failure step from SQL agent).  I'm not really sure how to proceed.  If someone could point me in the right direction, that would be great. 



how to apply a css class on html span tag in javascript?



I'm trying to apply a css class on an html span tag in javascript, like below-

$('#company-info').css("class", "help");

But this line of code isn't working!

Can anyone let me know the right way of doing this?



SSRS 2005/2008 - Chart with bar graph not generating on subsequent executions of report even with mo


For a report executed from Report Manager that has a bar chart component, regenerating the report via refresh or view with same input parameters either gives a different result that is garbled or an empty chart (2008) or no chart at all (2005). I have the report set up to not do any caching, so that does not seem to be the issue. Is there some chart option I may need to set to get the proper chart display.

SPFeatureReceiver: Creating report viewer web part programmatically


I have a feature that adds a report viewer web part (SP integrated mode) into the newly created site page.

Problem: The feature activates without any problem through the UI, but I cannot activate it through STSADM (which will be the case when going to production).

Here is my code block that adds the web part to the page. This code block exists in FeatureActivated:

Assembly currentAssembly = Assembly.GetExecutingAssembly();
string dwpStr = string.Empty;

    using (Stream resourceStream = currentAssembly.GetManifestResourceStream("Report.dwp"))
        using (StreamReader sr = new StreamReader(resourceStream))
            dwpStr = sr.ReadToEnd();
            dwpStr = string.Format(dwpStr, web.Url);

    using (StringReader sr = new StringReader(dwpStr))
        string err = string.Empty;
        System.Web.UI.WebControls.WebParts.WebPart wp = wpMan.ImportWebPart((XmlReader.Create(sr as TextReader)), out err); //Exception thrown from this line
        wpMan.AddWebPart(wp, "HeaderZone", 0);
catch (Exception ex)
    //Log errors
Report.dwp is as follows:
<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&q

Generating report from different tables in ASP.net


I have 3 tables(Status,Clist,longlead) having "WOnumber" common column in 3 tables and 3 web forms(status.aspx,Clist.aspx,longlead.aspx), on main page(status.aspx) i have buttons to redirect the clist.aspx and longlead.aspx to give the inputs and save it to database.I have button called scheduleReport on status.aspx when i click this button I want the values from Clist table and longlead table of corresponding WONumber values should be listed either in word or pdf.on the top of the report it should have WONUmber.Can any one help me how to acheive this

Generating SSRS report by taking data both from sql server and web service.



In my report, i need join data from both sql server and web service and display that on ssrs report.

is this possible in ssrs ?


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend