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 8789083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:18:16+00:00 2026-06-13T22:18:16+00:00

i have web application in which i am using crystal reports.In main crystal report

  • 0

i have web application in which i am using crystal reports.In main crystal report i want to display two sub reports but when i try to that, it displays data of main-report but other two sub report data is not dispalyed.i tried following code but doesn’t work.

ReportDocument rptDoc = new ReportDocument();
DataTable dt1, dt2;
dt1 = new SalesMasterRepository().GetSalesHeaderData(Salesid);

 dt2 = new SalesMasterRepository().GetSalesFooterData(Salesid);

 DataTable dtproductview=getProductViewDetails();
  rptDoc.Load(Server.MapPath("../Reports/SalesProductReport.rpt"));
            rptDoc.SetDataSource(dtproductview);
            rptDoc.Subreports[0].SetDataSource(dt1);
            rptDoc.Subreports[1].SetDataSource(dt2);
 CrystalReportViewer1.ReportSource = rptDoc;

that’s it i don’t get any error but data also not displayed.

  • 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-13T22:18:18+00:00Added an answer on June 13, 2026 at 10:18 pm

    i have got the solution

    SalesProductReport rptDoc = new SalesProductReport(); //Main report
    
        DataTable dt1, dt2;
        dt1 = new SalesMasterRepository().GetSalesHeaderData(Salesid);
    
         dt2 = new SalesMasterRepository().GetSalesFooterData(Salesid);
    
         DataTable dtproductview=getProductViewDetails();
        salesrpt.Subreports["Sales_header1.rpt"].SetDataSource(dt1);//datasource for subreport
    
            rptDoc .SetDataSource(dtproductview);//Mainreport datasourcce
           rptDoc .Subreports["SalesFooter.rpt"].SetDataSource(dt2);//datasource for subreport
    
        CrystalReportViewer1.ReportSource = rptDoc ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application which I uploaded using IIS. I want the users
I have a crystal report in my asp.net web application which has a lot
We have an ASP.net 2.0 web application which is using themes set on the
Using JDeveloper as my IDE, I have a web application which calls services provided
I have a java web application which I can debug using IntelliJ or Eclipse
I have an Web-application in which I capture Image using EdgeCamShots Sample Application Saving
I have a web application, which is using a SQL Server 2005 database. My
I have an ASP.net web service that I'm using for a web application which
I am using VS2005 ASP.NET 2.0. I have a web application which uses Active
I have a j2ee web application which uses log4j for logging. I want to

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.