水晶報表的列印

2021-04-13 22:40:16 字數 1478 閱讀 1292

using system;

using system.data;

using system.configuration;

using system.collections;

using system.web;

using system.web.security;

using system.web.ui;

using system.web.ui.webcontrols;

using system.web.ui.webcontrols.webparts;

using system.web.ui.htmlcontrols;

using crystaldecisions.shared;

using crystaldecisions.crystalreports.engine;

using system.data.sql;

using system.data.sqlclient ;

public partial class print : system.web.ui.usercontrol

return arraylist; }

//獲得印表機列表

private arraylist getprinter()

protected void page_load(object sender, eventargs e)

*****sourcelist.datasource = get*****sources();

databind(); }

//設定列印選項

private void setprintoptions()

//例項化下拉列表

private void initcontrol()

//獲得選定的印表機資源

private system.drawing.printing.*****source getselected*****source()

} return selected*****source; }

// 載入報表

private void loadreport()

中的引數可以不用賦值,即使賦了值也不起作用。

crystalreportsource1.databind();

crystalreportviewer1.reportsource = crystalreportsource1;

crystalreportviewer1.databind();

//hierarchicalgroupingreport = this.crystalreportsource1.reportdocument; }

catch (exception exc)

} //列印

protected void printreport_click(object sender, eventargs e)

catch (exception aaa)

} }

水晶報表列印

水晶報表列印問題 reportdocument areportdocument new reportdocument 載入報表 子報表資料來源 areportdocument.subreports sonrpt.rpt setdatasource sonds 傳遞引數 areportdocument...

水晶報表列印

1.資料來源的使用,當從外部新增資料庫檔案或更新資料庫檔案時,可以直接將解決方案中的資料庫檔案替換掉,但是如果程式設計介面中用到了資料繫結,涉及到了資料來源的話,如果要將資料來源中的內容也更新的話,可以從伺服器資源管理器中直接拖過來。我太傻了,以前都不知道 2.為報表繫結資料集 3.在報表中如果用到...

列印水晶報表流程

列印水晶報表流程 一 資料的查詢與篩選 通過分組查詢 多表聯查等方法查詢出所需要的資料進行列印 二 給水晶報表設計資料來源與模板 在設計水晶報表前得有一系列的準備工作,首先得建立乙個資料夾在資料夾裡建立資料集和安裝水晶報表軟體。圖例 資料夾printreport 將上面查詢出來的資料轉化為datat...