Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Create a subreport Post Reply Post New Topic
Author Message
mojam
Newbie
Newbie
Avatar

Joined: 12 Mar 2011
Location: Bangladesh
Online Status: Offline
Posts: 2
Quote mojam Replybullet Topic: Create a subreport
    Posted: 13 Mar 2011 at 12:17am
Hello experts I have a master report with one sub report. I create all well. my code for execute report as belows:
 public void SelectAll(int id)
    {

        SqlCommand cmd = dbs.Cmd("select * from ViewDetailDetailTest ");
        SqlCommand cmd1 = dbs.Cmd("select * from View_auction_Detail where auctionNo=" + id + " order by LotNo Asc");

        SqlDataAdapter da = dbs.Da(cmd);
        SqlDataAdapter da1 = dbs.Da(cmd1);
        DataSet ds = new DataSet();
        DataSet ds1 = new DataSet();
        da.Fill(ds1, "ViewDetailDetailTest");
        da1.Fill(ds, "View_auction_Detail");

        doc.Load(Server.MapPath(".") + "\\Report\\breakup.rpt");
        rptBreakup rb = new rptBreakup();
        doc.SetDataSource(ds.Tables[0]);

        doc.OpenSubreport("xyz").SetDataSource(ds1.Tables[0]);
        CrystalReportViewer1.ReportSource = doc;
        CrystalReportViewer1.DataBind();
        CrystalReportViewer1.DisplayGroupTree = false;

    }
and in load event I passed the parameter with session value.
but my subreport doesn't display all values except parameter field

Now how can I solve this porblem.

It is top urgen.
Thanks in advance
Mojam, WSS
I Like Programming, Love Programming
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.