You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Microsoft.Reporting.WebForms;
|
|
|
|
|
using NetLibrary.Data;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Data.Common;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Web;
|
|
|
|
|
using System.Web.UI;
|
|
|
|
|
using System.Web.UI.WebControls;
|
|
|
|
|
|
|
|
|
|
namespace TradeManage.PrintTemplate
|
|
|
|
|
{
|
|
|
|
|
public partial class RepoeTest : System.Web.UI.Page
|
|
|
|
|
{
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (this.IsPostBack == false)
|
|
|
|
|
{
|
|
|
|
|
string tsql = @"
|
|
|
|
|
select * from JC_UserInfo
|
|
|
|
|
";
|
|
|
|
|
Database db = DatabaseFactory.CreateDatabase();
|
|
|
|
|
DbCommand cmd = db.GetSqlStringCommand(tsql);
|
|
|
|
|
DataSet ds = db.ExecuteDataSet(cmd);
|
|
|
|
|
//ReportParameter rptParaA = new ReportParameter("rptParaA", "测试报表参数");
|
|
|
|
|
//ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rptParaA });
|
|
|
|
|
|
|
|
|
|
ReportDataSource rds = new ReportDataSource("DataSet1", ds.Tables[0]);
|
|
|
|
|
ReportViewer1.LocalReport.DataSources.Clear();
|
|
|
|
|
ReportViewer1.LocalReport.DataSources.Add(rds);
|
|
|
|
|
ReportViewer1.LocalReport.Refresh();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|