Report Control (report viewer and report designer)

Hi there! ive looked over the forums and other websites that you referred but i dont have any luck for reports. i created a page that has simple data-entry, aside from that, i do want to have a printable report on what are the items i have added this day. i am using a report designer (rdlc) and a report viewer, which is in a aspx page. ive explored how it works for a simple select statement but i want to know how it will work for parameter passing. a referral for a tutorial website for the report viewer and report designer is very much appreciated. or if you want to share your knowledge about it, that will be a great help. thanks. 

3/2/2006 8:24:02 AM 91979 articles. 4 followers. Follow

16 Replies

Similar Articles

[PageSpeed] 18
Get it on Google Play
Get it on Apple App Store

  • for me even now i am not able to view report. It is giving me th following error .  if you can post how to view report it will be very helpfull ..
  • An error occurred during local report processing.
  • The definition of the report 'Main Report' is invalid.
  • The data set name is missing in the data region ‘DataSetName’.

  • Thanks and regards
    5/4/2006 4:47:37 AM

    For stedi_girl:

    Just add the condition, e.g where parameter = ? (this is for mysql format)

    And then add a select parameter to the objectdatasource


    For devarajdotnet:

    You have to add dataset to populate your report...then just drag the items from the datatable to your report (*.rdlc)

    5/16/2006 10:36:33 AM
    The reportviewer is a little difficult to get used to. AS for the parameters - you have to explicitely create the parameter object - fill it with parameter values  ( a name-value pair) and then add it to the report.
    As for the report missing a dataset - you need to add a dataset.
    In local mode ( without a report server ... using rdlc) you have to provide all the data and parameters to the report - it can't do anything other than digest what you pass it
    Here's a snippet on how I pass a parameter ( remember to add the parameter to the rdlc)

    Dim MyParameters As ReportParameter = New ReportParameter("TechName", technicians.SelectedItem.ToString())
            Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {MyParameters})

    I  do this on page_load ( but I'm not sure if thats the best place )

    the best reference I have found is

    Hope That Helps
    All that wander, are not lost...
    What were we talkin bout
    5/16/2006 1:45:47 PM

    thanks for the explanation  uncleb, but believe me, you dont need any coding to add the code behind is empty...thats the power of .net 2.0

    At the Table Adapter Configuration Wizard, just do like this eg "SELECT * FROM tbl_something
    WHERE condition = ?" I mention before the '?' is for mysql format, i'm not sure if it works for other database.

    Use the ObjectDataSource to configure you parameter...use the select parameter and select a parameter source/ID eg:'s that simple

    The parameter list (filter,delete,insert) in the ObjectDataSource will do everything for you without any extra coding...

    By the way, I'm trying to figure out if I can use multiple report (*.rdlc) in one report viewer..this one I think need some extra coding...if anyone could give me any idea, it would be nice...



    5/17/2006 2:00:03 AM
    thats for specifying a parameter for the sql
    the post is about specifying a report parameter - 2 different things.
    Besides the data, you might want to pass other parameters to the report.
    When designing a report - goto Report Menu - First Item - Report Parameter.

    Hope That Helps
    All that wander, are not lost...
    What were we talkin bout
    5/17/2006 3:11:46 AM

    hmm..maybe I am confuse...

    well...if you add a parameter for the sql....and the sql source is used by your report...doesnt it passses the parameter for the report also?

    May I know what other parameter (besides data) that you mention?


    5/17/2006 3:26:49 AM
    From the Help...
    Use the Report Parameters dialog box to define parameters for a report that is processed in local mode. You can define parameters to support conditional formatting or to use in expressions or code. You cannot use the Report Parameters dialog box to map report parameters to query parameters or use them in data source filters. In local processing mode, all data processing is handled independently of report processing. If you want to pass report parameters to a query or data source filter, you must do so in application code.

    I use it for a report that pulls service calls assigned to technicians. I pass the TechnicianID as a SQL parameter ( used to select only calls for that tech) But I also pass the technicians name as a report parameter - and i use it in the Title.
    =Parameters!TechName.Value ( in a label )

    Hope That Helps
    All that wander, are not lost...
    What were we talkin bout
    5/17/2006 4:03:42 AM

    hi hi,

    i'm using DataAdapter Configuration Wizard to specify my dataset and my report is in rdlc.

    how can i pass my parameter value through url ?

    i'm not sure how to declare my report parameter. i have added the parameters in rdlc and also in select parameter in ObjectDataSource.

    i'm stuck in my coding.

    ReportParameter[] parameters = new ReportParameter[2];

    parameters[0] = new ReportParameter("property", ????)

    ???? supposedly stores the parameter value, if i'm not mistaken.

    PLease help...


    9/22/2006 8:33:40 AM

    you don't actually pass the parameter using url - that would be for a report server, not a local report.

    do you use the parameter in the report - or is it just o select the data. - There is a difference.

    lets say I wanted a report of all slaesman in a particular state. I could make a SQL that looks something like this

    "SELECT SalesmanName, SalesmanPhone from SalesMan WHERE SalesManState='CA'"

    I could use this as the data for a report as is.

    But what If I wanted to have a Title on the report that says something like "Salesman for State of  CA"

    the CA part is not one of the fields returned, and if it was ( by adding it to the SQL select part) it would be repeated for each salesman.

    You can't use a field in a non-repeating section of the report ( like the header - where I am setting the Title)

    So in order to be able to specify the CA for the title, I need to pass it as a parameter to the report.


    To do this, you add a parameter to the report using the parameter dialog - call it something like TitleState.

    then in code you would do something like ( lets assume that you can pick the state from a dropdown on your page)

    Dim MyParameters As ReportParameter = New ReportParameter("TitleState", States.SelectedItem.ToString())
            Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {MyParameters})

    the name of the param in the report, and the name of the param you add to the report at runtime have to match (TitleState

    Not sure how to pass more than 1 parameter, but it seems like it is an array the way it is declared.

    be sure to check out


    Hope That Helps
    All that wander, are not lost...
    What were we talkin bout
    9/22/2006 1:56:22 PM

    thanks uncleb,

    does that mean i can never access a local report through url ? hmm...

    i found out i can obtain the parameter from url by using Request.QueryString

    protected void Page_Load(object sender, EventArgs e)


    ReportParameter[] parameters = new ReportParameter[2];


    parameters[0] = new ReportParameter("property", this.Request.QueryString[0]);

    parameters[1] = new ReportParameter("account", this.Request.QueryString[1]);




     but i get this error when previewing:

    • An error has occurred during report processing.
      • ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'GetData()' that has parameters: property, account.


    please help..

    9/25/2006 12:42:43 AM
    oh... btw, the parameters are to filter the dataset.....
    9/25/2006 12:52:27 AM

    i need to use url to access the report. the user will open an account information form and by clicking a button , the report will be shown in another window. it's a web app.

    ops... i realized i'm using TableAdapter, not DataAdapter as mentioned. sorry.


    9/25/2006 2:06:01 AM

    you need to specify what you want to do. if you need parameters to filter your dataset - then pass the parameter using querystring ( or any other method - session, page variable, previospagevalue,hidde field,etc...) to page that builds the dataset - you will use the parameters on a SQL query to build the dataset . You then set the report's datasource to this dataset. The report will then take this dataset and display it using the report definition you created. The reportviewer can not do any database stuff - you must pass all the data that the report needs at one time.

    All of the above is about passing parameter to be used in the "WHERE" clause of a SQL command.

    The other type of parameter is like I described in other post - used in the report - not to filter data.


    does that mean i can never access a local report through url

    you don't specify the report in the url like with a reportserver - you specify an aspx page that has a localreport (local meaning embedded in a an aspx page and not served by a reportserver)


    Hope That Helps
    All that wander, are not lost...
    What were we talkin bout
    9/25/2006 5:31:05 AM

    thanks uncleb!

     got it working...

    9/25/2006 6:29:04 AM


    thanks uncleb!

     got it working...

    I'm having trouble passing parameters to a local report from a textbox. Please help and post me that working code you used and i can modify to suite my needs.


    No Project Too Eazy.
    7/31/2007 2:47:24 PM



    I'm trying to pass a variable used in my code as a parameter  to display in the report , it  says that ReportParameter is unknown identifier. Can you guide me ?

    my code is like this ...


    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
            double m;
              ReportParameter P = new ReportParameter;
               P= new ReportParameter("foo", m);

                this->reportViewer1->LocalReport->SetParameters(P) ;     


    errors  are


    c:\documents and settings\rk\my documents\visual studio 2008\projects\reportviewertesting\reportviewertesting\Form1.h(125) : error C2065: 'ReportParameter' : undeclared identifier
    c:\documents and settings\rk\my documents\visual studio 2008\projects\reportviewertesting\reportviewertesting\Form1.h(125) : error C2146: syntax error : missing ';' before identifier 'P'
    c:\documents and settings\rk\my documents\visual studio 2008\projects\reportviewertesting\reportviewertesting\Form1.h(125) : error C2065: 'P' : undeclared identifier
    c:\documents and settings\rk\my documents\visual studio 2008\projects\reportviewertesting\reportviewertesting\Form1.h(125) : error C2061: syntax error : identifier 'ReportParameter'






    7/14/2008 12:09:14 AM

    Similar Artilces:

    Converting Crystal Reports 9 report to Crystal Reports .NET report
    I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

    How to get the Loaded Report path from Report viewer control.
    Hi, I have a report Loaded in the ReportViewer1. And from the drop down i have selected a report. Now programatically how can I get the path of the report loaded? eg./ChartTest/Defectdata_Chart Thanks in advance  ...

    "Load Report Failed."
    Hi Everyone, I have developed a report in VS2005 (On a Vista PC, in case that's relevant). In the report designer, I switch to "Main Report Preview" and the report shows up fine - it get the data from the database and displays perfectly. I tried to add a page to display the report in my app.  I added a crystal report viewer and a Crystal Report Source.  The report displays fine in design view.  However, when I run the app, all I get is "Load Report Failed". Please see the code below:<%@ Page Language="C#" M...

    about report reports generation and emailing reports
    hi i am a bit new to Bugzilla, i am using 2.18rc3version. and i am facing two problems with report generation. 1) the shows all the perl modules includig optional perl modules to be installed and available including thse required for graphical report generation. but despite this i am able to get tabular reports generated but when i click for line/bar reports of the same tabular report the next page does not show the required pie/bar reports. 2) is there any facility for sending these generated reports to the client via email through Bugzilla? kindly help. regards...

    How can I cahnge the report header before i load the report into the report viewer?
    That is basically it... Thanx in advance What are you trying to change? The report title, the items in the header, etc... Basically, in CR.NET you can't add new objects to the report during runtime. However, you can modify existing objects by setting a reference to them and then changing the properties. I have ample source code in my free ebook that teaches you how to modify the different properties of each report object. HTH, Brian Bischof Brian Bischof ...

    display reporting services report in report viewer in remote mode
    Hi  I have some problem in displaying a report done through reporting services in 2.0 report viewer server control for remote processing mode.I have created a Reporting Services project through Business Intelligence Development Studio and another Web application project in VS 2005. I have take a Report Viewer control on a form to view report created in the reporting services project. I have set the Processing mode of Report Viewer to Remote, have set ReportServerURL to "http://localhost/ReportServer" and Report Path as the "/(Reporting service proje...

    I keep getting this Error with Report viewer and Reports.
    Having problems with my Report Viewer, PLEASE HELP.  The Value expression for the textbox ‘SCC_URL’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.Here is my text box:=Last(Fields!SCC_URL.Value, "SCC_PDF")  What the heck is wrong. I have found several so to be answers with this but I still get the error as above.  I am not trying to sum the textbox but to get ...

    winforms-local report-report viewer control
    Hi, I am developing a windows application which has report viewer control and which renders local report(rdlc). I created a dataset and added the dataset fields on the report layout. I populate the dataset in the form load where report viewer control is residing. But when i run the application I get the following error in report viewer control. "A datasource instance has not been supplied for the datasource DealRatesDS_T_Table(thats my datasource name). What could be wrong? I appreciate your help a lot. Breaking my head for this from a long time..   thanks   These fo...

    Report Viewer control Javascript error with empty report
    I'm having an issue with the reportviewer control for vs2005. I've tried both local and remote reports and it's the same for both... but here's the issue. I have a group of parameters that are passed from the page into the report to filter out the data, simple. Problem is if the parameters cause no data to be returned, then i get a javascript error 'Object required' on line 13 char 692 of page Reserverd.ReportViewerWebControl.axd I've looked in google to see if there has been anyone else with this issue and haven't found anything. I've checked IIS to...

    Get message that mozilla has to close. Get booted out of web site. Get message from Mozilla to report problem. Problem reporting will not work. Eventually I delete the report message.
    Name: Linnea Hagberg Email: lhagbergatsmithcovedotcom Product: Mozilla Suite Summary: Get message that mozilla has to close. Get booted out of web site. Get message from Mozilla to report problem. Problem reporting will not work. Eventually I delete the report message. Comments: See above. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 ...

    Report viewer not showing report
    Hi all. I have a Report Viewer control on my page which isnt displaying the specified report. When the page renders it doesnt error, all i can see is a tiny wee scroll bar at the rigth-hand side of the page. On my aspx page the code is as follows: "ReportViewer2" runat="server" Width="100%" Height="1000px" Visible="false">  And on the code behind i have the following code: private void LoadReport() { string ReportName = cboReportNames.SelectedValue.ToString(); if (ReportName == "&lt;S...

    report viewer with crystal reports
    Hi every one ....i am a starter in integrating crystal reports to the asp .net website using report viewer.. it would be helpful if some one could point me on where to get started with some tutorials of 1. posting the crystal reports to the server 2. displaying the crystal reports in asp .net reportviewer control on a aspx page Thanks in advanceSriPlease mark as answer if it helped you Go to, and  If my post is your answer, please mark it as the answer. It will bring good karma.Crystal AllianceMy Blog...

    Report Viewer And Report Document
    Hi Folks What is the difference between Report Viewer And Report Document ? In Which Condition we have to use where Report VIewer or Report Document Thanking you rajaThanks,Regards, The report viewer is a quck way to load and display a crystal report. A report document is a more full featured object model, which allows you to change more options. It takes more work to use a report document, but gives you more control. For better description, buy the book from www.crystalreportsbook.comIf my post is your answer, please mark it as the answer....

    Report Viewer / Report Path
    Hello, i have a problem with an aplication. I have a ReportingServices project in wich i have some reports. Then i have a website in wich i want to see the reports that i have. I use a Report viewer to see the reports. The parameters that each report have i built inside the webpage that i have. For this reason i set the showparamateters property to false inside the report viewer. i make all the functionality in order to show the report inside the page and it works fine. I navigate inside the report viewer and go to another link report inside the first report that i show, but the when I wante...

    Web resources about - Report Control (report viewer and report designer) -

    Designer - Wikipedia, the free encyclopedia
    Classically, the main areas of design were only painting , sculpture and architecture , which were understood as the major arts. The design of ...

    Web Designer Wall – Design Trends and Tutorials
    Web Designer Wall is a blog designed and maintained by Nick La. Topics focus on web design, tutorials, and modern design trends.

    Shop top designers now using Apple Pay with Gilt
    ... popular app for shopping luxury brands with huge discounts has received an update that includes Apple Pay. Gilt now makes grabbing those designer ...

    Google Spruces Up Android Wear With New Designer Faces
    ... it comes to wearables, and while smartwatch manufacturers are still figuring out how to physically make them look great, a lot of top designers ...

    Google adds new designer watch faces to Android Wear
    Watch faces from the likes of Ted Baker, Melissa Joy Manning, and Mango are available now.

    WME Signs Robert Stromberg, ‘Maleficent’ Helmer & ‘Avatar’ Production Designer
    EXCLUSIVE : WME has signed Robert Stromberg , the Oscar-winning production designer of Avatar and Alice In Wonderland whose directorial debut ...

    Download Designer Watch Faces for Your Android Wear Smartwatch
    A collection of new Android Wear watch faces is available for download on Google Play, coming from a few of the top designers in the fashion ...

    Google debuts designer watch faces for Android Wear
    With companies like TAG Heuer and Fossil now investing in Android Wear, Google knows how important it is to keep smartwatches looking stylish. ...

    For Designers, Learning To Code Isn't A Yes-No Question
    The former CEO of Berg explains why programming is just one way that designers ought to make sense of problems. From 2005 to 2014 (or 483 weeks ...

    Designer Spotlight: London Designers Contribute British Ethos To Women's Career Wear
    Designer Spotlight is a regular column focusing on style and the professional woman. Meet four independent British fashion designers who are ...

    Resources last updated: 12/18/2015 4:56:48 PM