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

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

reportviewer component

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :Windows Application



i made an rdlc file with the layout i need for a report.

i specify the data source for this report in my code right before i call the reportviewer.render method to convert it to excel.

this all works fine but my excel sheets are named sheet1,sheet2 and sheet3.  They all contain information but i want to change their names.

I googled for a solution and found this is not possible except for vs2008R2.  i currently have VS2010 and applied the latest service patch for it.  Is it still impossible to name the excel tabs?  because this seems like a major limitation of the reportviewer.

View Complete Post

More Related Resource Links

Error Registering COM+ Component

Hi All,

I am experimenting with using EnterpriseServices. I created a component, created the SNK file, compiled the DLL. In the assemblyinfo.vb file, I added '<Assembly: AssemblyKeyFile("c:\key.snk")> '.
I created a new package in COM+, When I attempt to add the .dll to the package i get:

An error occured while processeing the last operation.
Error Code 80020009 - Exception ocurred.

The eventlog may contain additional troubleshooting information.

Here is the Event log:

Installation of 'TransactionalComponentsCore.dll' into '{6367F5F1-56A7-4223-97AC-51F7DC1D53EB}' failed with an exception:

System.EnterpriseServices.RegistrationException: Could not install type library 'TransactionalComponentsCore.tlb' into application 'TransactionalComponentsCore'.

Server stack trace:
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary_W2K(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallAssembly(RegistrationConfig regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelperTx.InstallAssemblyFromConfig(RegistrationConfig& regConfig, Object sync)
at Sys

Session problem with display of image in row of reportviewer


Hello techies...

I am new to this sql reporting service. But anyhow by surfing I am able to bind the report but i was stuck in image display.

Anyways, i also managed that. But the real problem is whenever i was keeping a image control in rdlc report i was having session prob. If i remove the image control then as usual report works fine.

Please suggest me some solution.... either for session problem or for image display. I am keeping the image name in database but for binding the rdlc report i am using a store procedure which return the path (static) concating with the image name(kept in database).

Hope to find a solution .....

(Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Re


 I am trying to use ReportViewer 9 in Visual Studio 8 but I get this error when I try to run the page:

The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).

Please help if you can!


Automatic Batch Printing in ReportViewer Remote Mode


Please help me, i have a properly working codes that is capable of the following:

1. Printing of Reports from ReportViewer without using the build-in print ICON in the actual ReportViewer. to view the working for the printing alone please click here.

2. Batch Printing by making a loop and placing a checkbox on the gridview where the needed paramerter (DataKeyNames ID) is retrieved then pass to the ReportViewer

This is my Code

foreach (GridViewRow row in GridView1.Rows)
            CheckBox chk = (CheckBox)row.FindControl("CheckBox2");
            if (chk.Checked)
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://TestServer/ReportServer");
                ReportViewer1.ServerReport.ReportPath = @"/Tavern/StudPaymentReport";
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                ReportParameter[] rptParams = new ReportParameter[1];

                rptParams[0] = new ReportParameter("ClientID", GridView1.DataKeys[row.RowIndex].Value.ToString());


ReportViewer :: Failed to enable constraints. But my statement is valid!!

  • A
  • n error has occurred during report processing.
      • Exception has been thrown by the target of an invocation.
        • Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

    Why do I keep getting this error, even when not using any data on the report. When I run the query in SQL server I get a resultset. However when I try to render the report I get this error.


    Dynamic Report in reportviewer


    HI I m sorry to say this But this task too urgent.

     Ex- i have two tables in my db name called Comdetails, deptdetails.

    TCS is a one company name stored in ComDetails and Company_ID took as primany key,

    TCS having 10 department stored in deptdetails and Company_ID as foreign key.

    so now in DB we have available one company with 10 departments.

    so now i need to generate report , i m using report.rdlc and reportviewer.

    i hope upto now its clear.

    my task-

    1- i have two pages in a report in page 1 i m doing designing report like top i  need to show companydetails, middle frist department details in deptdetails table , and bottom some calculation part leave about calculation part. in report page 2 on  top i need to show second department details from deptdetails next below the design again same design i did here i need to show 3 department details from deptdetails next below the design again same design i did here i need to show 4 department details from deptdetails next below again calculation part design leave about calculation part. so up to now i shown 4 department details here still i need to show 6 department details , for this programatically after 4 department details finish next generate dynamatically page 2 of re

    Windows with C++: Windows Imaging Component Basics


    Windows Imaging Component (WIC) is an extensible framework for encoding, decoding, and manipulating images. See how to use WIC to encode and decode different image formats.

    Kenny Kerr

    MSDN Magazine April 2008

    Toolbox: Code Generation, A Charting Component, and More


    Developers have a number of tools at their disposal, but which of these components do you really need to complete your project? Each month we'll analyze the latest software and books to see if they merit inclusion in your toolbox.

    Scott Mitchell

    MSDN Magazine January 2006

    Cryptography: Employ Strong Encryption in Your Apps with Our CryptoUtility Component


    When storing sensitive data, you need to be able to identify threats, determine how these threats interact with each other, and how issues can combine to constitute a vulnerability that will leave your data exposed. With a good understanding of the various cryptographic algorithms, salt, hashes, ACLs, and other available techniques, you'll be in a better position to protect your critical data.

    Michael Stuart and J Sawyer

    MSDN Magazine November 2004

    no response when refreshing reportviewer


    Hi guys, I've been struggling with this for some time now, but I can't figure out why it's not working. I got a gridview in which I'm selecting a specific row. This gives me a string back, which is used to load some data inside a datatable, using DAL The callback works and it's also giving the correct string to retrieve the wanted data. But when I'm trying to use this fresh data update my reportviewer (.rdlc) nothing happens. For now I'm testing the event with a simple button, but even with the button nothing happens. Does anyone know what I'm missing The DAL is working correct and I'm using .NET 3.5

    <rsweb:ReportViewer ID="ReportViewer" runat="server" Font-Names="Verdana" 
                                     InteractiveDeviceInfos="(Collection)"  WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" >
            <LocalReport ReportPath="Office\Reporting\InvoiceReport.rdlc" />                                
        protected void Button1_Click(object sender, EventArgs e)
            string strInvoiceId = "603663";
            tblInvoiceTableAdapter InvoiceAdapt = new tblInvoiceTableAdapter();
            TGU.tblInvoiceDataTable invoiceDt = InvoiceAdapt.GetIn


    • A data source instance has not been supplied for the data source 'EventDetail'.

    • I am stuck with this error.

    I searched for this but no respite.

    I am using the reportviewer in a drilled down report. The parent report shows up fine. But when I try to drill down i get the data source missing error.

    ObjectDataSource obDSS = new ObjectDataSource("Business.EventDetails", "GetEventDetailsReport");
                obDSS.SelectParameters.Add("workOrderID", workorderid);       

                rpViewer.LocalReport.ReportPath = "reports/WorkOrderDetails.rdlc";

    How to capture ReportViewer Mouse Events


    I have a ReportViewer which I'm pulling into a C# WPF project, and would like to be able to capture the row a user clicks on in the reportViewer, but have had no success tapping into the mouse event handlers.   Does anyone know how to accomplish this?  

    This MSDN link seems to imply that ReportViewer(winforms) supports mouse click events such as Click, DoubleClick..etc.  http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_events.aspx, but I've not had any luck.

    If mouse events are not currently supported, does anyone know when they will be, and whether properties such as SelectedItem or SelectedIndex would also be exposed?

    Thanks for the help.

    Reading values from data access component individually



    I am trying to pick data from the database through data access layer and use those values in different text boxes on the page.Basically on a click on the form, modal popup is planned to read the database and put the values into different text boxes which can be latter changed/ updated.

     What I am unable to do is accessing those values on the form itself progamatically. I will be thankful for any ideas and help.

    My data access component is as follows:




    new SqlParameter ("@reg_id", SqlDbType.Int ));"@reg_id"].Value=reg_id;try




    Make dynamic changes to ReportViewer Report design InteractiveSize property


    Hello all,

    Could someone share with me how to dynamically change the Report design InteractiveSize property?  I want to use a radiobutton list which has two options (complete list, paginated list) which changes the height of the Report display.  I wonder if I need to use the Report Parameters but how do I change and refresh to display the selected option.  Thank you.


    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