本文整理汇总了C#中ParameterField类的典型用法代码示例。如果您正苦于以下问题:C# ParameterField类的具体用法?C# ParameterField怎么用?C# ParameterField使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ParameterField类属于命名空间,在下文中一共展示了ParameterField类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnSearch_Click_1
private void btnSearch_Click_1(object sender, EventArgs e)
{
try
{
string DoctorName;
int MedicalShopID;
int ProductID;
string StartDate;
string EndDate;
DoctorName = Convert.ToString(cbDoctor.Text);
MedicalShopID = Convert.ToInt32(cbMedicalShop.SelectedValue.ToString());
ProductID = Convert.ToInt32(cbProduct.SelectedValue.ToString());
StartDate = Convert.ToString(dtpStartDate.Text);
EndDate = Convert.ToString(dtpEndDate.Text);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
string ReportPath = ConfigurationManager.AppSettings["ReportPath"];
paramField.Name = "@DoctorName";
paramField.Name = "@MedicalShopID";
paramField.Name = "@ProductID";
paramField.Name = "@StartDate";
paramField.Name = "@EndDate";
paramDiscreteValue.Value = 1;
reportDocument.Load(ReportPath+"Report\\Commission_CrystalReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "DB_MedicalShop_02Sept20159PM";
//connectionInfo.UserID = "wms";
//connectionInfo.Password = "wms";
connectionInfo.IntegratedSecurity = true;
SetDBLogonForReport(connectionInfo, reportDocument);
reportDocument.SetParameterValue("@DoctorName", DoctorName);
reportDocument.SetParameterValue("@MedicalShopID", MedicalShopID);
reportDocument.SetParameterValue("@ProductID", ProductID);
reportDocument.SetParameterValue("@StartDate", StartDate);
reportDocument.SetParameterValue("@EndDate", EndDate);
CommissionCrystalRpt.ReportSource = reportDocument;
CommissionCrystalRpt.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
示例2: btnSearch_Click
private void btnSearch_Click(object sender, EventArgs e)
{
string BcDate;
string DueDate;
BcDate = Convert.ToString(dtpfromdate.Text);
DueDate = Convert.ToString(dtpTodate.Text);
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
string ReportPath = ConfigurationManager.AppSettings["ReportPath"];
paramField.Name = "@BcDate";
paramField.Name = "@DueDate";
paramDiscreteValue.Value = 1;
reportDocument.Load(ReportPath + "Reports\\DateWiseTransactionReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "DB_LoanApplication";
//connectionInfo.UserID = "wms";
//connectionInfo.Password = "wms";
connectionInfo.IntegratedSecurity = true;
SetDBLogonForReport(connectionInfo, reportDocument);
reportDocument.SetParameterValue("@BcDate", BcDate);
reportDocument.SetParameterValue("@DueDate", DueDate);
DatewisecrystalReport.ReportSource = reportDocument;
DatewisecrystalReport.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
}
示例3: PrintSI
public PrintSI(string Supplier, string city, string kapal, string date)
{
InitializeComponent();
reportDocument = new ReportDocument();
paramFields = new ParameterFields();
paramField = new ParameterField();
paramField.Name = "supplier";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = Supplier;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramField = new ParameterField();
paramField.Name = "kapal";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = kapal;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramField = new ParameterField();
paramField.Name = "tujuan";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = city;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramField = new ParameterField();
paramField.Name = "ATD";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = date;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
crystalReportViewer1.ParameterFieldInfo = paramFields;
}
示例4: ReportDocument
private void Reporte_de_Gastos_de_Inversión_Load(object sender, EventArgs e)
{
//Diseño de la ventana
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(237)))), ((int)(((byte)(228)))), ((int)(((byte)(196)))));
this.Icon = global::Sistema_Shajobe.Properties.Resources.Caja_ICO;
//REPORTE CRISTAL REPORT
//PRIMER PARAMETRO
ReportDocument reporte = new ReportDocument();
ParameterField parametro = new ParameterField();
ParameterFields parametros = new ParameterFields();
ParameterDiscreteValue discretos = new ParameterDiscreteValue();
parametro.Name = "@Apartir";
discretos.Value = Convert.ToDateTime(_Apartir);
parametro.CurrentValues.Add(discretos);
parametros.Add(parametro);
//SEGUNDO PARAMETRO
ParameterField parametro1 = new ParameterField();
ParameterDiscreteValue discretos1 = new ParameterDiscreteValue();
parametro1.Name = "@Hasta";
discretos1.Value = Convert.ToDateTime(_Hasta);
parametro1.CurrentValues.Add(discretos1);
parametros.Add(parametro1);
crystalReportViewer1.ParameterFieldInfo = parametros;
crystalReportViewer1.ReportSource = RGastosInventario1;
}
示例5: FormSupplierPayment_Print_Load
private void FormSupplierPayment_Print_Load(object sender, EventArgs e)
{
try
{
// int TransactionID;
//SaleTransactionID = Convert.ToInt32(cbSupplier.SelectedValue.ToString());
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
string ReportPath = ConfigurationManager.AppSettings["ReportPath"];
paramField.Name = "@SupplierPaymentID";
paramDiscreteValue.Value = @SupplierPaymentID;
reportDocument.Load(ReportPath+"SupplierPay_Print_CrystalReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "DB_MedicalShop_02Sept20159PM";
//connectionInfo.UserID = "wms";
//connectionInfo.Password = "wms";
connectionInfo.IntegratedSecurity = true;
SetDBLogonForReport(connectionInfo, reportDocument);
reportDocument.SetParameterValue("@SupplierPaymentID", SupplierPaymentID);
SupplierPyCrystalPrint.ReportSource = reportDocument;
SupplierPyCrystalPrint.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
示例6: btnSearch_Click
private void btnSearch_Click(object sender, EventArgs e)
{
int GroupId;
GroupId = Convert.ToInt32(cbgroupNames.SelectedValue.ToString());
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
string ReportPath = ConfigurationManager.AppSettings["ReportPath"];
paramField.Name = "@GroupId";
paramDiscreteValue.Value = 1;
reportDocument.Load(ReportPath + "Reports\\GroupWise_CrystalReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "DB_LoanApplication";
//connectionInfo.UserID = "wms";
//connectionInfo.Password = "wms";
connectionInfo.IntegratedSecurity = true;
SetDBLogonForReport(connectionInfo, reportDocument);
reportDocument.SetParameterValue("@GroupId", GroupId);
GroupWisecrystalReport.ReportSource = reportDocument;
GroupWisecrystalReport.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
}
示例7: InitializeReport
public void InitializeReport()
{
ReportDocument PullOutSummaryPerCustomer;
PullOutSummaryPerCustomer = new PullOutSummaryPerOutletRpt();
DataBaseLogIn(PullOutSummaryPerCustomer);
ParameterField prmCustomerNumber = new ParameterField();
ParameterField prmDateFrom = new ParameterField();
ParameterField prmDateTo = new ParameterField();
ParameterFields prmList = new ParameterFields();
prmCustomerNumber.ParameterFieldName = "customer_number";
prmDateFrom.ParameterFieldName = "date_from";
prmDateTo.ParameterFieldName = "date_to";
ParameterDiscreteValue prmCustomerNumberValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue();
prmCustomerNumberValue.Value = Request.QueryString["CustomerNumber"];
prmDateFromValue.Value = Request.QueryString["DateFrom"];
prmDateToValue.Value = Request.QueryString["DateTo"];
prmCustomerNumber.CurrentValues.Add(prmCustomerNumberValue);
prmDateFrom.CurrentValues.Add(prmDateFromValue);
prmDateTo.CurrentValues.Add(prmDateToValue);
prmList.Add(prmCustomerNumber);
prmList.Add(prmDateFrom);
prmList.Add(prmDateTo);
this.crViewerMonthlyPullOutSummaryPerCustomer.ParameterFieldInfo = prmList;
crViewerMonthlyPullOutSummaryPerCustomer.ReportSource = PullOutSummaryPerCustomer;
}
示例8: InitializeReport
private void InitializeReport()
{
ReportDocument REPORT_DOC = new ReportDocument();
REPORT_DOC = new RptSummaryMonthlyPilferageDeptStores();
DataBaseLogIn(REPORT_DOC);
ParameterField prmBrand = new ParameterField();
ParameterField prmDateFrom = new ParameterField();
ParameterField prmDateTo = new ParameterField();
ParameterFields prmList = new ParameterFields();
prmBrand.ParameterFieldName = "@BRAND_NAME";
prmDateFrom.ParameterFieldName = "@DATE_FROM";
prmDateTo.ParameterFieldName = "@DATE_TO";
ParameterDiscreteValue prmBrandValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue();
prmBrandValue.Value = Request.QueryString["Brand"];
prmDateFromValue.Value = Request.QueryString["DateFrom"];
prmDateToValue.Value = Request.QueryString["DateTo"];
prmBrand.CurrentValues.Add(prmBrandValue);
prmDateFrom.CurrentValues.Add(prmDateFromValue);
prmDateTo.CurrentValues.Add(prmDateToValue);
prmList.Add(prmBrand);
prmList.Add(prmDateFrom);
prmList.Add(prmDateTo);
this.SummaryOfMonthlyPilferagePerDepartmentStores.ParameterFieldInfo = prmList;
SummaryOfMonthlyPilferagePerDepartmentStores.ReportSource = REPORT_DOC;
}
开发者ID:DennisPitallano,项目名称:IRMS-ACCOUNTING,代码行数:33,代码来源:MonthlySummaryPilferageReportDepartmentStore.aspx.cs
示例9: setParameters
public void setParameters(ReportDocument Rpt)
{
if (HttpContext.Current.Request.QueryString["StartDate"] != null && HttpContext.Current.Request.QueryString["EndDate"] != null)
{
ParameterFields paramFields = new ParameterFields();
ParameterField StartDay, EndDay;
ParameterDiscreteValue dcStartDay, dcEndDay;
StartDay = new ParameterField();
StartDay.ParameterFieldName = "@FromDate";
dcStartDay = new ParameterDiscreteValue();
dcStartDay.Value = Request.QueryString["StartDate"].ToString();
EndDay = new ParameterField();
EndDay.ParameterFieldName = "@ToDate";
dcEndDay = new ParameterDiscreteValue();
dcEndDay.Value = Request.QueryString["EndDate"].ToString();
StartDay.CurrentValues.Add(dcStartDay);
EndDay.CurrentValues.Add(dcEndDay);
paramFields.Add(StartDay);
paramFields.Add(EndDay);
AdminActivityCRViewer.ParameterFieldInfo = paramFields;
AdminActivityCRViewer.ReportSource = Rpt;
AdminActivityCRViewer.DataBind();
}
}
示例10: RptCetakKwitansi_Load
private void RptCetakKwitansi_Load(object sender, EventArgs e)
{
string strPath = Application.StartupPath + @"\Form\Report\Kwitansi\RptKwitansi.rpt";
// Object for load report.
ReportDocument rpt = new ReportDocument();
rpt.Load(strPath);
//Set Parameter
ParameterFields pfields = new ParameterFields();
ParameterField pfield = new ParameterField();
ParameterDiscreteValue disValue = new ParameterDiscreteValue();
pfield.Name = "spell";
disValue.Value = spell;
pfield.CurrentValues.Add(disValue);
pfields.Add(pfield);
pfield = new ParameterField();
pfield.Name = "price";
disValue = new ParameterDiscreteValue();
disValue.Value = harga;
pfield.CurrentValues.Add(disValue);
pfields.Add(pfield);
pfield = new ParameterField();
pfield.Name = "keterangan";
disValue = new ParameterDiscreteValue();
disValue.Value = ket;
pfield.CurrentValues.Add(disValue);
pfields.Add(pfield);
crystalReportViewer1.ParameterFieldInfo = pfields;
crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
示例11: InitializeReport
public void InitializeReport()
{
ReportDocument PullOutConsolidated;
PullOutConsolidated = new PullOutConsolidatedMonthly();
DataBaseLogIn(PullOutConsolidated);
ParameterField prmDateFrom = new ParameterField();
ParameterField prmDateTo = new ParameterField();
ParameterFields prmList = new ParameterFields();
prmDateFrom.ParameterFieldName = "date_from";
prmDateTo.ParameterFieldName = "date_to";
ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue();
prmDateFromValue.Value = Request.QueryString["DateFrom"];
prmDateToValue.Value = Request.QueryString["DateTo"];
prmDateFrom.CurrentValues.Add(prmDateFromValue);
prmDateTo.CurrentValues.Add(prmDateToValue);
prmList.Add(prmDateFrom);
prmList.Add(prmDateTo);
this.crViewerMonthlyConsolidatedReport.ParameterFieldInfo = prmList;
crViewerMonthlyConsolidatedReport.ReportSource = PullOutConsolidated;
}
示例12: setParameters
public void setParameters(ReportDocument Rpt)
{
ParameterFields paramFields = new ParameterFields();
if (HttpContext.Current.Request.QueryString["MailingId"] != null && HttpContext.Current.Request.QueryString["MailingId"] != string.Empty)
{
ParameterField MailingId = new ParameterField();
MailingId.ParameterFieldName = "@CampaignId";
ParameterDiscreteValue dcMailingId = new ParameterDiscreteValue();
dcMailingId.Value = Convert.ToInt32(Request.QueryString["MailingId"].ToString());
MailingId.CurrentValues.Add(dcMailingId);
paramFields.Add(MailingId);
}
else
{
ParameterField CampId = new ParameterField();
CampId.ParameterFieldName = "@AssignedCampaignID";
ParameterDiscreteValue dcCampId = new ParameterDiscreteValue();
dcCampId.Value = Convert.ToInt32(Request.QueryString["CampId"].ToString());
CampId.CurrentValues.Add(dcCampId);
paramFields.Add(CampId);
}
CrystalReportViewer1.ParameterFieldInfo = paramFields;
CrystalReportViewer1.ReportSource = Rpt;
CrystalReportViewer1.DataBind();
}
示例13: btnSearch_Click
private void btnSearch_Click(object sender, EventArgs e)
{
int DoctorID;
DoctorID = Convert.ToInt32(cbDoctor.SelectedValue.ToString());
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
string ReportPath = ConfigurationManager.AppSettings["ReportPath"];
paramField.Name = "@DoctorID";
paramDiscreteValue.Value = DoctorID;
reportDocument.Load(ReportPath + "Report\\DoctorCrystalReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.DatabaseName = "DB_MedicalShop_02Sept20159PM";
//connectionInfo.UserID = "wms";
//connectionInfo.Password = "wms";
connectionInfo.IntegratedSecurity = true;
SetDBLogonForReport(connectionInfo, reportDocument);
reportDocument.SetParameterValue("@DoctorID", DoctorID);
DoctorCrystalRpt.ReportSource = reportDocument;
DoctorCrystalRpt.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
}
示例14: LoadReport
private void LoadReport()
{
try
{
string strSql = "select work_id,shipsup,cargosup,to_char(appdate,'yyyy-mm-dd') appdate, cargo_name,cargo_num from zjgdou_declare where to_char(appdate,'yyyy-mm-dd')>='2009-05-08'";
// DataTable tab = rpDocDB.GetDataTable(strSql);
string strPath = Server.MapPath("../../rpt/declare.rpt");
this.rpDoc.Load(strPath);
// rpDoc.SetDataSource(tab);
this.Login(rpDoc);
ParameterFields pfs = new ParameterFields();
ParameterField pf = new ParameterField();
ParameterDiscreteValue pfv = new ParameterDiscreteValue();
string strCode = "信息中心";
pfv.Value = strCode;
pf.Name = "corp";
pf.CurrentValues.Add(pfv);
pfs.Add(pf);
this.CrystalReportViewer1.ParameterFieldInfo = pfs;
this.CrystalReportViewer1.ReportSource = rpDoc;
this.CrystalReportViewer1.DataBind();
//this.CrystalReportViewer1.RefreshReport();
//this.Session["REPORT"] = rpDoc;
}
catch (Exception err)
{
}
}
示例15: InitializeReport
private void InitializeReport()
{
ReportDocument REPORT_DOC = new ReportDocument();
REPORT_DOC = new RptSummaryMonthlySOIPilferageByLocation();
DataBaseLogIn(REPORT_DOC);
ParameterField prmDateFrom = new ParameterField();
ParameterField prmDateTo = new ParameterField();
ParameterFields prmList = new ParameterFields();
prmDateFrom.ParameterFieldName = "@DateFrom";
prmDateTo.ParameterFieldName = "@DateTo";
ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue();
ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue();
prmDateFromValue.Value = Request.QueryString["DateFrom"];
prmDateToValue.Value = Request.QueryString["DateTo"];
prmDateFrom.CurrentValues.Add(prmDateFromValue);
prmDateTo.CurrentValues.Add(prmDateToValue);
prmList.Add(prmDateFrom);
prmList.Add(prmDateTo);
this.SummaryOfMonthlyPilferageByLocation.ParameterFieldInfo = prmList;
SummaryOfMonthlyPilferageByLocation.ReportSource = REPORT_DOC;
}