32 lines
975 B
C#
32 lines
975 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Data;
|
|
using Microsoft.Reporting.WebForms;
|
|
|
|
namespace FineUIPro.Web.Report
|
|
{
|
|
public partial class TestReport : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
string strSql = "SELECT * FROM dbo.Sys_User WHERE Account!='gly' ";
|
|
DataTable dt = BLL.SQLHelper.GetDataTableRunText(strSql, null);
|
|
|
|
|
|
ReportDataSource rds = new ReportDataSource("DataSet1", dt);
|
|
|
|
ReportViewer2.LocalReport.DataSources.Add(rds);
|
|
|
|
List<ReportParameter> paras = new List<ReportParameter>();
|
|
paras.Add(new ReportParameter("parm1", "用户测试"));
|
|
ReportViewer2.LocalReport.SetParameters(paras);
|
|
}
|
|
}
|
|
}
|
|
} |