Hi All,
I have below table in MSAccess
ID Name Category
1 John ASE
2 Kev ASE
3 Paul ASE
4 Lina SSE
5 Hendry SSE
I need to display result in two tables in one Crystal Report
1) one table for names with Category "ASE"
2) Second table for names with Category "SSE"
I can't display both categories details in one table
Please suggest how I can do this. I am using C# as language to generate this crystal report
Here is the script , I am using
Collapse | Copy Code //CrystalReport1 is main where I want to show subreport
//CrystalReport4 is subreport
CrystalReport1 ObjRpt;
CrystalReport4 ObjRpt1;
ObjRpt = new CrystalReport1();
ObjRpt1 = new CrystalReport4();
String StrQuery;
StrQuery="SELECT Id,Name,MemberRank FROM Members WHERE Cat=1";
OleDbDataAdapter adp = new OleDbDataAdapter(StrQuery.ToString(), ControlRules.ClsConnect.Conn);
DataSet ds = new DataSet();
int ctr = adp.Fill(ds);
DataSet1 Ds = new DataSet1();
adp.Fill(Ds, "Customer");
StrQuery="SELECT Id,Name,SubRank,Ratiopergrop,NHPL,((KLP_Num * 120) - 25) as "RHN_Number" FROM Members WHERE Cat=2";
OleDbDataAdapter adp1 = new OleDbDataAdapter(result1.ToString(), ControlRules.ClsConnect.Conn);
DataSet ds1 = new DataSet();
int ctr1 = adp1.Fill(ds1);
ds1.Tables[0].Rows.Add(0, "", 0, 0, 0, 0);
DataSet6 Ds1 = new DataSet6();
adp1.Fill(Ds1, "Customer1");
ObjRpt1.SetDataSource(Ds1);
ObjRpt.SetDataSource(Ds);
ReportDocument crystalReport = new ReportDocument();
ReportDocument crystalReport1 = new ReportDocument();
crystalReport=ObjRpt;
crystalReport1 = ObjRpt1;
crystalReportViewer1.ReportSource = ObjRpt;