.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

Using ReportViewer for multiple reports by way of radio buttons

Posted By:      Posted Date: September 03, 2010    Points: 0   Category :ASP.Net
 Hi all, Thanks for taking the time to read over my scenario.  I am using one ReportViewer with already established SQL Stored Procedures connected to three report files (*.rdlc).  There are three radio buttons which are to be associated with each report that needs to be displayed in the ReportViewer.  Here is an example if a radio button is selected:ReportViewer1.Reset() Dim rds As Microsoft.Reporting.WebForms.ReportDataSource rds = New Microsoft.Reporting.WebForms.ReportDataSource ReportViewer1.LocalReport.DataSources.Clear() If RadioButtonList1.SelectedIndex = 0 Then rds.DataSourceId = ObjectDataSource1.ID rds.Name = "spEx1" rds.Value = ObjectDataSource1 ReportViewer1.LocalReport.DataSources.Add(rds) ReportViewer1.LocalReport.ReportPath = "Ex1Report.rdlc" ... The ReportViewer works for the first radio button selection but then for the other selection I get the following error: A data source instance has not been supplied for the data source 'spEx1' I'm not sure exactly what is going on or where it's still tied to the first data source.  Any help would be great!  Thank you.

View Complete Post

More Related Resource Links

Multiple radio buttons

I'm programming on C#, and I've a groupBox containing multiple radioButtons, Can anyone tell me how can i determine the checked radio button (at any time not at the radioButton checked event)?
Please give an example code.

Gridview with Radio Buttons

As now, Radio buttons are HTML controls, I am not able to get it on server side. When user select any radio button and press submit, Control will not available at code behind, you can use "e.Item.FindControl" as it is not "runat='server'". I want ID "Primary Key" value for selected radio button. To achive this I took the help of Javascript. I wrote javascript function that sets the values of "Primary Key" in hidden field when user clicks on any radio button. Now when user clicks on Submit button, user can get selected value froim hidden field.

single form multiple buttons in MVC


In a single page  has two buttons , ddown and tempname.

I wrote two actionresult separetly each one for ddown and tempname.

I need one is post and another one is get method. so i gave like

1. Get Method


        [AcceptParameter(Name = "button", Value = "tempname")]
        public ActionResult ddown_tempname(string statusName, NewsLetterAdminViewModel viewModel)

return View();



2.Post Method


        [AcceptParameter(Name = "button", Value = "ddown")]
        public ActionResult ddown(string statusName, string button, NewsLetterAdminViewModel viewModel, FormCollection collection)

return View();



if i call the post method its worked well. but if i call the get method, the code does not execute. the brea

how to write a stored proc to prevent multiple users in uploading the reports at a time? plsss help



I wanted to know how to prevent more than one user from uploading the report at a time .I am new to .net ,plss help with the code that would be great.Details are below:

This is a Windos based app written in c# . When User A  clicks Upload option on  one server  from the menu  to upload the files  and at the same time when User B clicks Upload option on different server , User B should be alerted a message saying "User A's uploading is in progress,pls wait" . How to achieve this, plsss help with the code.. I am thinking this logic should be kept in a stored proc, How do I write that proc? plss help


Thanks in advance!

Ajax.BeginForm with multiple buttons


can i have more than one AjaxOptions in Ajax.BeginForm targetting different controls?

Actually I want to exchange data between two listboxes placed in a single ajax.beginform.

How to do it..................help me.

Series of Radio Buttons in MVC


Hi.  I'm fairly new to MVC and admittedly don't fully understand how data is passed between Views and Controllers.  That said, here is my issue.


I am working with C#.  I have a page which has a list of items.  Each item has a radio button set of three associated with it and there are 15 of these sets on the page.  Thus I have radio1, radio2....radio15, etc.  Each of these has value 0, 1, or 2 upon submit.  I can't seem to understand how to get the information out of these radio button sets from the controller without passing 15 different variables to the post method in the controller which is associated with the view; ie passing Int32 radio1, Int32 radio2,.., Int32 radio15, etc.

I tried using ViewData["radio"+i] in a loop to access the value of each radio button set, but this, apparently can only be used to pass data to the View from the Controller and not the other way around.

Any advice is appreciated.



Multiple Reports in the same Viewer

Hi all, Is that possible to open three reports in the same window ? Can be using the group tree or the tabs beside the MainReport. If it is possible, how to do it ? The reports used to be open in excell and the file has three worksheet, now we want to change them for Crystal Reports, thats why were created three reports, but it must be open the same was the excell format, with three worksheets. Any work around for this will be appreciated. We are developing the asp.net in VS2010 with the CR2010. thanks !

groupBox radio buttons

Hello   On my form, I've got two groupbox's and each group box has two radio buttons. I believe the expected operation, is that if one is checked , the other is not with in the groupbox. How can I make it so only one is checked among the four?

One report >> Multiple Linked Reports in different folders?

I love Linked Reports in SSRS because of my ability to change one report in one project and post changes to one location on my SSRS server and then have those changes take effect in my linked report.  Today however I was asked to make one of those reports which is already liniked elsewhere to be linked to two locations and I was dismayed to find out that there is a chance that its limited to one linked report for any source report. Can someone tell me this isn't so and show me a way around this?  I don't want to have to post my RDL to multiple locations unless its absolutely necessary. I'm using SQL Server 2008, SSRS2008, Standard Edition. Thanks, Keith

Multiple reports

Hi, I want Display 9 Reports in single Report LayOut. plz let me know how can i create reports. thats very help full for me.

Multiple Reports

Hey All, I need to create a 5 page Report for each employee in our organisation based on some criteria and then i need to send that 5 page report to the related employee only. Similarly all the reports created that way will go to the related employee as an email. I've the idea of how to do it for single report at a time, But how to do this for all of the employees at one go i am not sure about that. Please give me some idea or solution to work it out. Please help me out. Thanks a lot Punu

Multiple Rdlc report in one reportviewer.

Hi, I have multiple reports that take the same parameters. Need to create a master report with all the reports merged together. I dont want to copy paste the rdlc files into one large file. found a control by Telerik called ReportBook but it costs money!! http://www.telerik.com/help/reporting/designing-reports-general-explanation.html anyone knows something similar? or am i missing something very obvious? using visual studio 2005... Cheers will subreports solve my problem? not sure how these work. so say i have a report that lists employers and i create a subreport that lists all employees for a particular empoyer. is it then possible on one rdlc to have the list of employers and a bunch of subreports for each employer's employees?

CS0102 Error on ReportViewer reports using VS2010 Professional

I am trying to build reports using the ReportViewer feature in Visual Studio 2010 Professional and I am encountering the following error when I try to run the aspx page containing the report.Compiler Error Message: CS0102: The type 'SupApps_SecurityDataSet' already contains a definition for '_schemaSerializationMode'The error is stating the issue is on line 27 of the file but I dont see how to view the code on a rdc file in Visual Studio.HERE IS THE CODE FOR THE ASPX PAGE<%@ Page Language="VB" AutoEventWireup="false" CodeFile="QMDailyJournalReport.aspx.vb" Inherits="reports_QMDailyJournalReport" %> <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>              <rsweb:ReportViewer I

Problem with radio buttons in a repeater


I can use the asp control and find the radio buttun in the code behind when a button is clicked but the user can select multiple buttons, or I can use an html input type radio and be able to select only one button of the group but not find it in the button's click event.  Is there a way to both be able to find the radio button AND have it di what it's supposed to - only allow one to be checked?

How can I process multiple buttons with one click event?


I want to dynamically build a table where each of the first three cells may or may not contain an image.  If a cell contains an image, it may or may not contain a radio button.  The last cell contains a button or link button.  I want all the buttons to be handled by the same click event.  The number of rows, which cells will have an image, and which cells will have a radio button is not known at design time.  Finally, the images are displayed using the better image control.

I'm trying to get this to work usinging a repeater, but at the moment I can't get the radio button checked propety to change from the default value.  I'm using an arraylist as a datasource.  I thought of using a gridview, but I don't know how to add a radio button and a better image control to a cell. 

I've gone round and round with this thing. Each time after a lot of work I find there is something I can;t get working.  Is there a reasonable solution for this? 

I'm back to wanting to build a table, but how do I handle the buttons?

Radio Buttons - OnChange


I'm having a time finding out I could not do something simple as :

On the onchange event getting the new selected checkbox, this with jquery.

The checkboxes are located in the following div :

<div id="radio">
                <%= Html.RadioButton("radio1", "Ja", Model.Status == 1 ? true : false) %><label for="radio1">Ja</label> 
                <%= Html.RadioButton("radio2", "Nee", Model.Status == 0 ? true : false) %><label for="radio2">Nee</label> 
                <input type="hidden" id="radioValue" name="radioValue" />

This all located in a form, when I will find out the selected radio on change I will post the form and use the value of the hidden field to know the selected radion button. Nothing realy difficult.

The js code :

$("input[type='radio']", "#radio").change(function(e) {
      // Get the selected radio button


Any help appreciated.

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