.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

Sub report query based on main report (Microsoft Report Viewer)

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net


I searched the forum but couldn't find anyone with the same problem with me.  They were close but didn't help me solve my issue.

I'm trying to learn how to make the sub-report get data from SQL Server based on a primary key passed from the main-report.

An example:
Main report displays all student names and the sub-report would display all their contact phone numbers.

A visual:
Bobby Smith

Home Phone: 555-1212
Cell Phone: 555-2323
Work Phone: 555-3434

Jane Doe

Home Phone: 555-2020
Cell Phone: 555-3030
Work Phone: Null

Ginger Doe

Home Phone: 555-5062
Cell Phone: 555-9586
Work Phone: 555-2356

Student ID   |   Name
1                | Bobby Smith
2                 | Jane Doe
3                 | Ginger Doe

Phone ID &n

View Complete Post

More Related Resource Links

Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


how to create report on the fly using microsoft report viewer ?

hi,Is it possible to create report on the fly using microsoft report viewer in vb.net 2005 ?Developer

How to use the Microsoft Report Viewer in Miscorosft Visual Studio 2008?

Currently, I need to use this Microsoft Report Viewer to create several reports. The problem I'm having is that within the Microsoft Report Viewer, there are 2 functions that I needed some coding help. The 2 functions are the print function and also the export function. I'm connected to the local host only for this project. Please provide some code example on these 2 functions. Thank you so much.    

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.  

How to use report viewer 2010 in VS 2008


I downloaded report viewer 2010 from here


Now I want to actually use it in a website.  How do I do that?  Do I have to modify some part of web.config?  Specifically, what do I need to change?


populate report viewer by code


Hi all

I have a button "Show Report" to show some data from table

what I should write under this button to populate the reports ?

Report viewer error


  • An error has occurred during report processing.
    • A data source instance has not been supplied for the data source "PatientDetailsReport_DataTable1".

  • i am using two to three rdlc reports in my page for single report viewer when i first load the page i got the output in reportviewer but when i try to load other rdlc report then am getting the above mentioned error.i cleared all the datasources for the report viewer before giving new datasource but am getting the same error pls someone help

Passing report parameters by report viewer


I have 4 parameters in which 3 are passed in report and 1 is passed through report viewer. I have made a parameter in SSRS called CandidateId to which I want to pass the value. The code for report viewer is:

 intReportID = Convert.ToInt32(Request.QueryString["ReportID"
 CandId = Convert.ToString(Session["CandidateId"
lblReportName.Text = dtReport.Rows[0]["ReportName"
SSRSReportViewer.ShowCredentialPrompts =false

 SSRSReportViewer.ServerReport.ReportServerCredentials = new
SSRSReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.


 SSRSReportViewer.ServerReport.ReportServerUrl = new

SSRSReportViewer.ServerReport.ReportPath = dtReport.Rows[0]


 Microsoft.Reporting.WebForms.ReportParameter[] theparams = new

theparams[0] = new
, CandId);
theparams[0].Visible = false

SSRS Report viewer + Remove


I am running the report from SSRS report server in the view i am finding that the window title is Report Viewer - Windows Internet Explorer.

How to remove this name and get the name of the report over there.

I am using java at the back end to call the repot through url.

Please help me .

Thanks ,


SSRS - Where are the Sharepoint Report Usage Reports provided by Microsoft



Microsoft provided 3 example reports for Sharepoint report usage. Does anyone know where they are located? I used them about 2 years ago.




How I disable vertical scroll bar of report viewer control on Web Form.


I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

 I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.


Query Command to Report


I would like to generate a crystal report showing the report data based on my custom SQL query.

Where I can provide my SQL query or stored procedure.

Please give me good tutorial links on this too.

Thanks in advance.

Report Viewer Control Error

Hi All, I am adding a report datasource dynamically to report view web server control and getting the following eroor when i open the page. The DataSourceID of the ReportDataSource 'DataSet1_employees' of the ReportViewer 'ReportViewer1' must be the ID of a control of type IDataSource. A control with ID 'DataSet1_employees' could not be found.     Please help me where i am going wrong. The code is given below: protected void Page_Load(object sender, EventArgs e)    {        ReportViewer1.ProcessingMode = ProcessingMode.Local;        ReportViewer1.LocalReport.ReportPath = "Report2.rdlc";         ReportDataSource rdS = new ReportDataSource("Employees", GetData());        rdS.DataSourceId = "DataSet1_employees";        //this..Add(rdS);                ReportViewer1.LocalReport.DataSources.Add(rdS);        ReportViewer1.LocalReport.DataSources["Employees"].DataSourceId = "DataSet1_employees";        ReportViewer1.LocalReport.DataSources["Employees"]

report viewer error / visual web developer 2008 / sql server 2008 / report viewer add on / win7 x64

hi, i decided to export my local site to iis today, the process wasn't smooth.   anyway. i was able to access my site, the db tables are working as i am able to create new records and retrieve them. my main problem now is with the report object. i've tried the work around found here : http://support.microsoft.com/kb/2002980.. it helped sort of. i used to have only a big page of error before i did the work around, now i am able to see half of the report (the report interface) but the contents, the field are filled with 404 errors. any idea how i can fix this??                  

Find SQL Query when report is executed

Hi All, I am using SSRS 2008 R2 verison of reporting services. I have a report and the data source for this report is Oracle 10i, it takes around 2 mins to execute the report. I want to find out the query, which is sent by the reporting services to the Oracle. Is there a way to find it out. Please help me with this. Thanks Vineeshvineesh1701

SQL Reporting Service 2005 - share schedule report performace T-SQL query?

Hi, I have SQL 2005 reporting services Shared Schedules and each schedule has its own subscribed report. I would like to have T-SQL 2005 to find out performance loading on each schedule. i.e. MySchedule_1 has 10 reports in it and AVEGARE report eaxecutiontime is like 3mins 5sec      MySchedule_2 has 7 reports in it and AVEGARE report eaxecutiontime is like 4mins 9sec Pls can I have T-SQL 2005 on ReportServer database to find out load on each schedules (and more drill-down to each report level for execution time)?
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