1.ASP.NET中第一步 設計報表文件 即rpt文件
          在這個操作之前要先做好數據集的設計 即顯示那個表就把那個表的字段都列出來 方面設計報表文件
          設計好數據集之后 
          再設計報表文件 把報表文件設計好了 
          做一下操作就可以了
          當然這是個簡單的例子 至于詳細的還要看自己的鉆研了  
          cmd.Connection = cn;
                      cmd.CommandText = "SELECT EmployeeId1 as EmployeeId,EmployeeName1 as EmployeeName From Employee1";
                      da.SelectCommand = cmd;
                      da.Fill(ds, "Employee");
                     // this.dataGridView1.DataSource = ds.Tables["Employee"].DefaultView;


                      //使用報表對象加載報表
                      ReportDocument myReport = new ReportDocument();
                      string reportPath = Application.StartupPath + "/cp1.rpt";// Server.MapPath("~/app_data/crystalreport1.rpt");
                      myReport.Load(reportPath);
          設置數據集
                      myReport.SetDataSource(ds);
                      crystalReportViewer1.ReportSource = myReport;

          posted on 2011-08-29 14:09 sanmao 閱讀(582) 評論(1)  編輯  收藏

          FeedBack:
          # re: 水晶報表的顯示報表數據[未登錄]
          2016-04-20 14:39 | 123
          123456  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          常用鏈接

          留言簿(5)

          隨筆分類

          隨筆檔案

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 河西区| 五台县| 汽车| 肇庆市| 鄂伦春自治旗| 大同县| 新绛县| 梁山县| 阳新县| 利辛县| 丹凤县| 祁门县| 宜黄县| 扬州市| 万州区| 桃源县| 三亚市| 唐山市| 海盐县| 清新县| 施甸县| 仪陇县| 望谟县| 玉山县| 定陶县| 新建县| 孟津县| 河北区| 大关县| 溧阳市| 黔东| 余庆县| 恩施市| 宝清县| 得荣县| 浮梁县| 名山县| 育儿| 汝阳县| 亚东县| 漳州市|