2
我有一個數據集,並在該數據集中有2個dataTableAdapteres。如何在水晶報表中使用多個表格?
第一個DataTable中使用此查詢 -
select * from a_object
inner join l_pageobject
on o_objectID = PO_ObjectID
inner join a_page
on po_pageid = p_pageid
inner join l_pagepermission
on p_pageid = pp_pageid
inner join a_permission
on P_permissionID = pp_permissionID
where p_description = 'testing.asp'
order by P_Name
和第二數據表的用途 -
select * from l_pagelink
inner join l_pageobject
on po_pageid = pl_pageid
inner join a_object
on o_objectID = po_ObjectID
inner join a_page
on pl_pageID = p_pageid
where p_description = 'testing.asp'
order by O_Name
我想在水晶報表中使用兩個表,但不能似乎得到它的工作。
以下是c#中的代碼,我到目前爲止已將其作爲空白報告結束。
public void reportOutput(string nameOfFile)
{
string file;
file = nameOfFile + ".pdf";
ReportDataSet1 ds = new ReportDataSet1();
CrystalReport1 objRpt = new CrystalReport1();
objRpt.SetDataSource(ds);
objRpt.ExportToDisk(ExportFormatType.PortableDocFormat, file);
}
我該如何解決這個問題?
你的數據集的數據在哪裏被填滿? – Zenwalker