Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7872249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:08:57+00:00 2026-06-03T02:08:57+00:00

i have business object called TeamMaster , in which i define three properties,Id,Name &

  • 0

i have business object called "TeamMaster",
in which i define three properties,Id,Name & Flg.
in my .rdlc report i apply TeamMaster object as a data source,
now i write the following code in page load event of form in which i add report viewer control and i define my report as a local report.

using (RDLC_DEMO_DBEntities objdatabase = new RDLC_DEMO_DBEntities())
        {
            lstTeamMstr = objdatabase.TeamMasters.ToList();
        }
        this.TeamMasterBindingSource.DataSource = lstTeamMstr;
        this.reportViewer1.RefreshReport();

when i check this code using debugging i get 6 records in TeamBindingSource,
but in windows report only displays six blank rows,
what is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:08:58+00:00Added an answer on June 3, 2026 at 2:08 am

    Follow this code : >>

    string path = HttpContext.Current.Server.MapPath(Your Report path);
    ReportViewer1.Reset(); //important
    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local;
    
    // Add sub report even handler if you need  
    ***ReportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(MySubreportProcessingEventHandler);***
    LocalReport objReport = ReportViewer1.LocalReport;
    objReport.ReportPath = path;
    // Add Parameter If you need 
    List<ReportParameter> parameters = new List<ReportParameter>();
    parameters.Add(new ReportParameter("Name", Value));
    ReportViewer1.LocalReport.SetParameters(parameters);
    ReportViewer1.ShowParameterPrompts = false;
    ReportViewer1.ShowPromptAreaButton = false;
    ReportViewer1.LocalReport.Refresh();
    
    //Add Datasourdce
    ReportDataSource reportDataSource = new ReportDataSource();
    reportDataSource.Name = "Datasource Name Used due to report design";
    reportDataSource.Value = DataSourceValue(Your object data-source);
    objReport.DataSources.Add(reportDataSource);
    objReport.Refresh();
    

    Here Subreport Even handler code

    private void MySubreportProcessingEventHandler(object sender,  SubreportProcessingEventArgs e)
    {
     //You can get parameter from main report 
    int paramname = int.Parse(e.Parameters[0].Values[0].ToString());
    //You can also add parameter in sub report if you  need like main report
    
    //Now add sub report data source     
     e.DataSources.Add(new ReportDataSource("DataSource Name",DataSourceValue)));
    }
    

    If you need to create Drillthrough report than follow this link Click here for Drillthrough report

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a domain object called User . Properties of user include ssoId, name,
I have a business model called Customer which has many required properties (via DataAnnotations)
I have a business object project, which contains composite structure: public class Tree {
I have a business object, which is a composite of child objects. I am
I have a class called Product in my Business object and in another class
In the following scenario, you have a business object called Employee that contains all
I have a method that is called on an object to perform some business
I have a JUnit4 test which extends AbstractTransactionalJUnit4SpringContextTests. I have a business object that
My App is crashing a 14 . I have a business object called ClientDetail
Let's say we have a business object, let's call it a Foo , which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.