佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > 水晶報(bào)表asp.net的webform下基本用法實(shí)例

水晶報(bào)表asp.net的webform下基本用法實(shí)例

熱門標(biāo)簽:電銷業(yè)務(wù) 科大訊飛語音識別系統(tǒng) 百度AI接口 網(wǎng)站排名優(yōu)化 國美全國運(yùn)營中心 人工智能 客戶服務(wù) 電商新玩法

本文實(shí)例講述了水晶報(bào)表asp.net的webform下基本用法。分享給大家供大家參考。

具體實(shí)現(xiàn)方法如下:

復(fù)制代碼 代碼如下:
protected void Page_Init(object sender, EventArgs e)
{
     ConfigureCrystalReport();
 }
protected void Page_Unload(object sender, EventArgs e)
 {
         if (rptDocument == null)
            return;
           rptDocument.Close();
           rptDocument.Dispose();
  }

private void ConfigureCrystalReport()
{
    string temp = BusinessObject.Util.Decrypt(Request.QueryString["toid"]);
    TourOrderId = Util.ConvertToint>(temp, 0);

    if (ViewState["reportdoc"] == null)
    {
 string report_path = "";
 report_path = Server.MapPath("~/Report/TourNote.rpt");

 DataSet ds = BusinessObject.TourOrders.GetTourNoteDsRpt(TourOrderId);
 if (ViewState["reportdata"] == null)
 {
     ViewState["reportdata"] = ds;
 }
 else
 {
     ds = (DataSet)ViewState["reportdata"];
 }
 rptDocument = new ReportDocument();
 rptDocument.Load(report_path);
 rptDocument.SetDataSource(ds);
 rptDocument.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.DefaultPaperSize;
 ViewState["reportdoc"] = rptDocument;
    }
    else
    {
 rptDocument = (ReportDocument)ViewState["reportdoc"];
    }
 
    this.CrystalReportViewer1.ReportSource = rptDocument;
    this.CrystalReportViewer1.HasToggleGroupTreeButton = false;
    this.CrystalReportViewer1.DisplayGroupTree = false;
}

使用方法.先建了一個數(shù)據(jù)集做為數(shù)據(jù)源,作為水晶報(bào)表的數(shù)據(jù)架構(gòu).

代碼里面調(diào)用一個存儲過程,返回?fù)碛卸鄰埍淼腄ataSet.

希望本文所述對大家的asp.net程序設(shè)計(jì)有所幫助。

您可能感興趣的文章:
  • HighCharts圖表控件在ASP.NET WebForm中的使用總結(jié)(全)
  • ASP.NET WebForm中%=%>與%#%>的區(qū)別
  • WebForm獲取checkbox選中的值(幾個簡單的示例)
  • js腳本獲取webform服務(wù)器控件的方法
  • Ajax Throws Sys.WebForms.PageRequestManagerErrorException with Response.Redirect的解決方法
  • 如何在WebForm中使用javascript防止連打(雙擊)
  • asp.net WebForm頁面間傳值方法
  • asp.net WebForm頁面間傳值方法
  • Webform 內(nèi)置對象 Session對象、Application全局對象,ViewState詳細(xì)介紹

標(biāo)簽:咸寧 南平 拉薩 攀枝花 益陽 POS機(jī) 棗莊 廈門

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《水晶報(bào)表asp.net的webform下基本用法實(shí)例》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    陈巴尔虎旗| 荣昌县| 涟源市| 游戏| 漳平市| 闽侯县| 碌曲县| 凭祥市| 榆社县| 陆良县| 永修县| 永兴县| 华亭县| 四子王旗| 钦州市| 普宁市| 宜宾市| 东光县| 沂源县| 保康县| 偃师市| 通许县| 邻水| 遵义市| 璧山县| 新化县| 浙江省| 柏乡县| 伊吾县| 桂阳县| 北安市| 水富县| 南雄市| 靖宇县| 乌恰县| 大田县| 通化县| 乡城县| 原平市| 长宁区| 亳州市|