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 = "******"; connectionInfo.IntegratedSecurity = true; SetDBLogonForReport(connectionInfo, reportDocument); reportDocument.SetParameterValue("@BcDate", BcDate); reportDocument.SetParameterValue("@DueDate", DueDate); DatewisecrystalReport.ReportSource = reportDocument; DatewisecrystalReport.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None; }
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 = "******"; 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()); } }
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 = "******"; connectionInfo.IntegratedSecurity = true; SetDBLogonForReport(connectionInfo, reportDocument); reportDocument.SetParameterValue("@GroupId", GroupId); GroupWisecrystalReport.ReportSource = reportDocument; GroupWisecrystalReport.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None; }
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 = "******"; 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()); } }
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; }
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; }
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; }
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(); }
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; }
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(); } }
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(); }
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; }
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 = "******"; connectionInfo.IntegratedSecurity = true; SetDBLogonForReport(connectionInfo, reportDocument); reportDocument.SetParameterValue("@DoctorID", DoctorID); DoctorCrystalRpt.ReportSource = reportDocument; DoctorCrystalRpt.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None; }
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) { } }
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; }
private void crystalReportViewer1_Load(object sender, EventArgs e) { reportDataBind(); ParameterFields paramFields = new ParameterFields(); ParameterField paramField1 = new ParameterField(); ParameterDiscreteValue discreteVal1 = new ParameterDiscreteValue(); paramField1.ParameterFieldName = "drawingno"; discreteVal1.Value = drawingno; paramField1.CurrentValues.Add(discreteVal1); paramFields.Add(paramField1); ParameterField paramField2 = new ParameterField(); ParameterDiscreteValue discreteVal2 = new ParameterDiscreteValue(); paramField2.ParameterFieldName = "blockno"; discreteVal2.Value = blockno; paramField2.CurrentValues.Add(discreteVal2); paramFields.Add(paramField2); ParameterField paramField3 = new ParameterField(); ParameterDiscreteValue discreteVal3 = new ParameterDiscreteValue(); paramField3.ParameterFieldName = "project"; discreteVal3.Value = project; paramField3.CurrentValues.Add(discreteVal3); paramFields.Add(paramField3); crystalReportViewer1.ParameterFieldInfo = paramFields; }
private void crystalReportViewer1_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = GetDs(); if (UserSecurity.HavingPrivilege(User.cur_user, "SPOOLWAREHOUSEUSERS")) { NestProjectMaterialRpt pmrpt = new NestProjectMaterialRpt(); pmrpt.SetDataSource(ds); crystalReportViewer1.ReportSource = pmrpt; } else { ProjectMaterialRpt pmrpt = new ProjectMaterialRpt(); pmrpt.SetDataSource(ds); crystalReportViewer1.ReportSource = pmrpt; } //crystalReportViewer1.DisplayGroupTree = false; ParameterFields paramFields = new ParameterFields(); ParameterField paramField1 = new ParameterField(); ParameterDiscreteValue discreteVal = new ParameterDiscreteValue(); // 第一个参数是具有多个值的离散参数。设置参数字段的名称,它必须和报表中的参数相符。 paramField1.ParameterFieldName = "kickoffdate"; // 设置离散值并将其传递给该参数。 discreteVal.Value = User .KickOffDate ; paramField1.CurrentValues.Add(discreteVal); // 将该参数添加到参数字段集合。 paramFields.Add(paramField1); ParameterField paramField2 = new ParameterField(); ParameterDiscreteValue discreteVal2 = new ParameterDiscreteValue(); paramField2.ParameterFieldName = "TotalBaseLength"; discreteVal2.Value = User.TotalBaseLength; paramField2.CurrentValues.Add(discreteVal2); paramFields.Add(paramField2); ParameterField paramField5 = new ParameterField(); ParameterDiscreteValue discreteVal5 = new ParameterDiscreteValue(); paramField5.ParameterFieldName = "kickoffdateStart"; discreteVal5.Value = User.KickOffDate_start; paramField5.CurrentValues.Add(discreteVal5); paramFields.Add(paramField5); ParameterField paramField6 = new ParameterField(); ParameterDiscreteValue discreteVal6 = new ParameterDiscreteValue(); paramField6.ParameterFieldName = "kickoffdateEnd"; discreteVal6.Value = User.KickOffDate_end; paramField6.CurrentValues.Add(discreteVal6); paramFields.Add(paramField6); ParameterField paramField7 = new ParameterField(); ParameterDiscreteValue discreteVal7 = new ParameterDiscreteValue(); paramField7.ParameterFieldName = "TotalWeight"; discreteVal7.Value = User.PipeBaseTotalWeight; paramField7.CurrentValues.Add(discreteVal7); paramFields.Add(paramField7); crystalReportViewer1.ParameterFieldInfo = paramFields; }
public ucComboParam(ParameterField p) { InitializeComponent(); _param = p; paramName = p.Name; LoadParam(); }
private void NestingDetailViewer_Load(object sender, EventArgs e) { DataSet ds = new DataSet(); ds = GetDs(); if (UserSecurity.HavingPrivilege(User.cur_user, "SPOOLWAREHOUSEUSERS")) { NestingPipeRpt pmrpt = new NestingPipeRpt(); pmrpt.SetDataSource(ds); NestingDetailViewer.ReportSource = pmrpt; } ParameterFields paramFields = new ParameterFields(); ParameterField paramField1 = new ParameterField(); ParameterDiscreteValue discreteVal = new ParameterDiscreteValue(); paramField1.ParameterFieldName = "kickoffdate"; discreteVal.Value = User.KickOffDate; paramField1.CurrentValues.Add(discreteVal); paramFields.Add(paramField1); ParameterField paramField2 = new ParameterField(); ParameterDiscreteValue discreteVa2 = new ParameterDiscreteValue(); paramField2.ParameterFieldName = "Margin"; discreteVa2.Value = User.Margin; paramField2.CurrentValues.Add(discreteVa2); paramFields.Add(paramField2); ParameterField paramField3 = new ParameterField(); ParameterDiscreteValue discreteVal3 = new ParameterDiscreteValue(); paramField3.ParameterFieldName = "TotalBaseLength"; discreteVal3.Value = User.TotalBaseLength; paramField3.CurrentValues.Add(discreteVal3); paramFields.Add(paramField3); ParameterField paramField4 = new ParameterField(); ParameterDiscreteValue discreteVal4 = new ParameterDiscreteValue(); paramField4.ParameterFieldName = "PipeRatio"; discreteVal4.Value = User.PipeRatio; paramField4.CurrentValues.Add(discreteVal4); paramFields.Add(paramField4); ParameterField paramField5 = new ParameterField(); ParameterDiscreteValue discreteVal5 = new ParameterDiscreteValue(); paramField5.ParameterFieldName = "kickoffdateStart"; discreteVal5.Value = User.KickOffDate_start; paramField5.CurrentValues.Add(discreteVal5); paramFields.Add(paramField5); ParameterField paramField6 = new ParameterField(); ParameterDiscreteValue discreteVal6= new ParameterDiscreteValue(); paramField6.ParameterFieldName = "kickoffdateEnd"; discreteVal6.Value = User.KickOffDate_end; paramField6.CurrentValues.Add(discreteVal6); paramFields.Add(paramField6); NestingDetailViewer.ParameterFieldInfo = paramFields; }
private void btnGenerar_Click(object sender, EventArgs e) { if(todos) { //C:\Users\Usuario\Documents\GitHub\ProyectoProgramacion5\ProyectoProgV\ProyectoProgV\Presentacion\reporteProveedor.rpt FormProveedor formulario = new FormProveedor(); ReportDocument crystalrpt = new ReportDocument(); crystalrpt.Load(@"C:\Users\Usuario\Documents\GitHub\ProyectoProgramacion5\ProyectoProgV\ProyectoProgV\Presentacion\reporteProveedor.rpt"); formulario.crystalReportViewer1.ReportSource = crystalrpt; formulario.crystalReportViewer1.Refresh(); formulario.Show(); } else { DateTime fecha = dateDesde.Value; string fechaDesde = fecha.ToString("d"); DateTime fecha2 = dateHasta.Value; string fechaHasta = fecha2.ToString("d"); FormProveedoresParametros form = new FormProveedoresParametros(); ReportDocument oRep = new ReportDocument(); ParameterField pf = new ParameterField(); ParameterFields pfs = new ParameterFields(); ParameterDiscreteValue pdv = new ParameterDiscreteValue(); pf.Name = "@fechaDesde"; pdv.Value = fechaDesde; pf.CurrentValues.Add(pdv); pfs.Add(pf); pfs.Clear(); pf.Name = "@fechaHasta"; pdv.Value = fechaHasta; pf.CurrentValues.Add(pdv); pfs.Add(pf); form.crystalReportViewer1.ParameterFieldInfo = pfs; oRep.Load(@"C:\Users\Usuario\Documents\GitHub\ProyectoProgramacion5\ProyectoProgV\ProyectoProgV\Presentacion\reporteProveedoresParametros.rpt"); form.crystalReportViewer1.ReportSource = oRep; form.Show(); } }
public static ParameterField CreateParameter(string ParamName, object Value) { ParameterField paramField = new ParameterField(); paramField.Name = ParamName; ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue(); paramDiscreteValue.Value = Value; paramField.CurrentValues.Add(paramDiscreteValue); return paramField; }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { if (Request.QueryString["InvoiceID"] != null) { ReportDocument reportDocument = new ReportDocument(); ParameterField paramField = new ParameterField(); ParameterFields paramFields = new ParameterFields(); ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue(); paramField.Name = "@InvoiceId"; paramDiscreteValue.Value = Convert.ToInt32(Request.QueryString["InvoiceID"]); paramField.CurrentValues.Add(paramDiscreteValue); paramFields.Add(paramField); paramFields.Add(paramField); CrystalReportViewer1.ParameterFieldInfo = paramFields; string reportPath = Server.MapPath("~/Admin/Invoice/crInvoice.rpt"); reportDocument.Load(reportPath); //reportDocument.SetParameterValue("@InvoiceId", 1770); CrystalReportViewer1.ReportSource = reportDocument; CrystalReportViewer1.ToolPanelView = CrystalDecisions.Web.ToolPanelViewType.None; Session["ReportDocument"] = reportDocument; int InvoiceId = Convert.ToInt32(Request.QueryString["InvoiceID"]); ClientScript.RegisterStartupScript(this.GetType(), "newWindow", String.Format("<script>window.open('{0}');</script>", "Annexure.aspx?InvoiceID=" + InvoiceId)); //string strPopupAnnexure = "<script language='javascript' ID='script2'>" // // Passing intId to popup window. //+ "window.open('Annexure.aspx?InvoiceID=" + HttpUtility.UrlEncode(InvoiceId.ToString()) //+ "','new window', 'top=90, left=200, width=768, height=1024, dependant=no, location=0, alwaysRaised=no, menubar=no, resizeable=no, scrollbars=n, toolbar=no, status=no, center=yes')" //+ "</script>"; //ScriptManager.RegisterStartupScript((Page)HttpContext.Current.Handler, typeof(Page), "Script2", strPopupAnnexure, false); } else { string msg = "Session Expired."; } } else { if (Session["ReportDocument"] != null) { ReportDocument doc = (ReportDocument)Session["ReportDocument"]; CrystalReportViewer1.ReportSource = doc; } } } catch (Exception ex) { string error = ex.Message.ToString(); } }
private void btnSearch_Click(object sender, EventArgs e) { try { int DoctorID; //string DoctorName; string StartDate; string EndDate; DoctorID = Convert.ToInt32(cbDoctor.SelectedValue.ToString()); // DoctorName=Convert.ToString(cbDoctor.SelectedText.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 = "@DoctorID"; //paramField.Name = "@DoctorName"; paramField.Name = "@StartDate"; paramField.Name = "@EndDate"; paramDiscreteValue.Value = 1; if (chkdailyreport.Checked == true) { reportDocument.Load(ReportPath + "Report\\DoctorPay_CrystalReportNew1.rpt"); } else { reportDocument.Load(ReportPath + "Report\\DoctorPayment_ReportNew.rpt"); } ConnectionInfo connectionInfo = new ConnectionInfo(); connectionInfo.DatabaseName = "DB_MedicalShop_02Sept20159PM"; //connectionInfo.UserID = "wms"; //connectionInfo.Password = "******"; connectionInfo.IntegratedSecurity = true; SetDBLogonForReport(connectionInfo, reportDocument); reportDocument.SetParameterValue("@DoctorID", DoctorID); //reportDocument.SetParameterValue("@DoctorName", DoctorName); reportDocument.SetParameterValue("@StartDate", StartDate); reportDocument.SetParameterValue("@EndDate", EndDate); SupplierCrystalRpt.ReportSource = reportDocument; SupplierCrystalRpt.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None; } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void crystalReportViewer1_ReportRefresh(object source, CrystalDecisions.Windows.Forms.ViewerEventArgs e) { ParameterFields campos = new ParameterFields(); ParameterField nombreEDS = new ParameterField(); ParameterDiscreteValue value = new ParameterDiscreteValue(); nombreEDS.Name = "EDS_NOMBRE"; nombreEDS.ParameterValueType = ParameterValueKind.StringParameter; value.Value = Exportador_Ventas_ServP.Properties.Settings.Default.nombreEDS; nombreEDS.DefaultValues.Add(value); nombreEDS.CurrentValues.Add(value); this.crystalReportViewer1.ParameterFieldInfo.Add(nombreEDS); }
private void AssignParam(string param) { string[] parameter = param.Split(','); ParameterDiscreteValue pdv = new ParameterDiscreteValue(); pdv.Value = parameter[1].Trim(); ParameterField pf = new ParameterField(); pf.ParameterValueType = ParameterValueKind.StringParameter; pf.CurrentValues.Add(pdv); pf.Name = parameter[0].Trim(); crViewer.ParameterFieldInfo.Add(pf); }
private void crystalReportViewer1_Load(object sender, EventArgs e) { ParameterFields campos = new ParameterFields(); ParameterField nombreEDS = new ParameterField(); ParameterDiscreteValue value = new ParameterDiscreteValue(); nombreEDS.Name = "EDS_NOMBRE"; nombreEDS.ParameterValueType = ParameterValueKind.StringParameter; value.Value = Exportador_Ventas_ServP.Properties.Settings.Default.nombreEDS; nombreEDS.DefaultValues.Add(value); nombreEDS.CurrentValues.Add(value); this.crystalReportViewer1.ParameterFieldInfo.Add(nombreEDS); //this.crystalReportViewer1.RefreshReport(); }
protected void btnppf_Click(object sender, EventArgs e) { string s, m, w; DateTime frd, td; CultureInfo cf = new CultureInfo("hi-IN"); frd = Convert.ToDateTime(txtfd.Text, cf); td = Convert.ToDateTime(txttd.Text, cf); w = txtwc.Text; m = txtsc.Text; //s = "{{CDOSU.SOC}= '" + m + "' and {CR.WCC}='" + w + "'} and {{cr.regdt}>=#" + frd + "# and {cr.regdt}<=#" + td + "#}"; s = "{CDOSU.SOC}= '" + m + "' and {CR.WCC}='" + w + "' and {CR.REGDT}>=#" + frd + "# and {CR.REGDT}<=#" + td + "#"; ParameterField pf = new ParameterField(); ParameterFields param = new ParameterFields(); ParameterDiscreteValue df = new ParameterDiscreteValue(); pf.ParameterFieldName = "statuscd"; df.Value = m; pf.CurrentValues.Add(df); param.Add(pf); ParameterField pf1 = new ParameterField(); ParameterDiscreteValue fd = new ParameterDiscreteValue(); pf1.ParameterFieldName = "wardcode"; fd.Value = w; pf1.CurrentValues.Add(fd); param.Add(pf1); ParameterField pf2 = new ParameterField(); ParameterDiscreteValue df1 = new ParameterDiscreteValue(); pf2.ParameterFieldName = "From"; df1.Value = frd; pf2.CurrentValues.Add(df1); param.Add(pf2); ParameterField pf3 = new ParameterField(); ParameterDiscreteValue df2 = new ParameterDiscreteValue(); pf3.ParameterFieldName = "To"; df2.Value = td; pf3.CurrentValues.Add(df2); param.Add(pf3); ReportDocument rpt = new ReportDocument(); rpt.Load(Server.MapPath("statusWise.rpt")); rpt.FileName=Server.MapPath("statusWise.rpt"); CrystalReportViewer1.ParameterFieldInfo = param; CrystalReportViewer1.ReportSource = rpt; CrystalReportViewer1.DisplayGroupTree = false; CrystalReportViewer1.DisplayToolbar = false; CrystalReportViewer1.SelectionFormula = s; rpt.SetDatabaseLogon("scott", "tiger", "ora9i", ""); CrystalReportViewer1.DataBind(); }
private void PrepareReport() { int iRpt = Convert.ToInt32(Request.QueryString["ReportType"]); ReportDocument rptDoc = new ReportDocument(); ParameterField prmDateFrom = new ParameterField(); ParameterField prmDateTo = new ParameterField(); ParameterField prmBrand = new ParameterField(); ParameterFields prmList = new ParameterFields(); prmDateFrom.ParameterFieldName = "DateFrom"; prmDateTo.ParameterFieldName = "DateTo"; prmBrand.ParameterFieldName = "BrandName"; ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue(); ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue(); ParameterDiscreteValue pramBrandValue = new ParameterDiscreteValue(); prmDateFromValue.Value = Request.QueryString["DateFrom"]; prmDateToValue.Value = Request.QueryString["DateTo"]; pramBrandValue.Value = Request.QueryString["BrandName"]; prmDateFrom.CurrentValues.Add(prmDateFromValue); prmDateTo.CurrentValues.Add(prmDateToValue); prmBrand.CurrentValues.Add(pramBrandValue); switch (iRpt) { case 1: { // rptDoc = new RptMarkdownSummaryPerMemo(); prmList.Add(prmDateFrom); prmList.Add(prmDateTo); break; } case 2: { prmList.Add(prmBrand); //rptDoc = new RptMarkdownSummaryPerBrand(); break; } } DataBaseLogIn(rptDoc); this.crMarkDownReport.ParameterFieldInfo = prmList; this.crMarkDownReport.ReportSource = rptDoc; }
private void InitializeReport() { ReportDocument REPORT_DOC = new ReportDocument(); REPORT_DOC = new RptSummaryOfMonthlyPilferage(); DataBaseLogIn(REPORT_DOC); ParameterField prmDateFrom = new ParameterField(); ParameterField prmDateTo = new ParameterField(); ParameterField prmBrand = new ParameterField(); ParameterField prmInventoryGroupNumber = new ParameterField(); ParameterField prmInventoryGroupName = new ParameterField(); ParameterFields prmList = new ParameterFields(); prmDateFrom.ParameterFieldName = "@DATE_FROM"; prmDateTo.ParameterFieldName = "@DATE_TO"; prmBrand.ParameterFieldName = "@BRAND_NAME"; prmInventoryGroupNumber.ParameterFieldName = "@INVENTORY_GROUP"; prmInventoryGroupName.ParameterFieldName = "group_name"; ParameterDiscreteValue prmDateFromValue = new ParameterDiscreteValue(); ParameterDiscreteValue prmDateToValue = new ParameterDiscreteValue(); ParameterDiscreteValue prmBrandValue = new ParameterDiscreteValue(); ParameterDiscreteValue prmInventoryGroupNumberValue = new ParameterDiscreteValue(); ParameterDiscreteValue prmInventoryGroupNameValue = new ParameterDiscreteValue(); prmDateFromValue.Value = Request.QueryString["DateFrom"]; prmDateToValue.Value = Request.QueryString["DateTo"]; prmBrandValue.Value = Request.QueryString["Brand"]; prmInventoryGroupNumberValue.Value = Request.QueryString["InventoryGroupNumber"]; prmInventoryGroupNameValue.Value = Request.QueryString["InventoryGroupName"]; prmDateFrom.CurrentValues.Add(prmDateFromValue); prmDateTo.CurrentValues.Add(prmDateToValue); prmBrand.CurrentValues.Add(prmBrandValue); prmInventoryGroupNumber.CurrentValues.Add(prmInventoryGroupNumberValue); prmInventoryGroupName.CurrentValues.Add(prmInventoryGroupNameValue); prmList.Add(prmDateFrom); prmList.Add(prmDateTo); prmList.Add(prmBrand); prmList.Add(prmInventoryGroupName); prmList.Add(prmInventoryGroupNumber); this.SummaryOfMonthlyPilferage.ParameterFieldInfo = prmList; SummaryOfMonthlyPilferage.ReportSource = REPORT_DOC; }
private void btnThongKePhim_Click(object sender, EventArgs e) { int thang = Convert.ToInt16(dtpNgay.Value.Month); //MessageBox.Show(thang.ToString()); ParameterFields paramFields = new ParameterFields(); ParameterField paramThang = new ParameterField(); ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue(); paramThang.Name = "pThang"; paramDiscreteValue = new ParameterDiscreteValue(); paramDiscreteValue.Value = thang; paramThang.CurrentValues.Add(paramDiscreteValue); paramFields.Add(paramThang); crystalReportViewer1.ParameterFieldInfo = paramFields; crystalReportViewer1.ReportSource = new rptPhim(); crystalReportViewer1.Refresh(); }
private void TINReport_Load(object sender, EventArgs e) { ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(Application.StartupPath + "\\Reports\\TINReport.rpt"); crystalReportViewer1.ReportSource = cryRpt; ParameterFields paramFields = new ParameterFields(); ParameterField paraCompAddresss1 = new ParameterField(); ParameterDiscreteValue decCompAddresss1 = new ParameterDiscreteValue(); decCompAddresss1.Value = Form1.pass; paraCompAddresss1.Name = "userID"; paraCompAddresss1.CurrentValues.Add(decCompAddresss1); paramFields.Add(paraCompAddresss1); crystalReportViewer1.ParameterFieldInfo = paramFields; crystalReportViewer1.Show(); }
public FacturaImprimir(int numero) { ParameterDiscreteValue crtParamDiscreteValue; ParameterField crtParamField; ParameterFields crtParamFields; crtParamDiscreteValue = new ParameterDiscreteValue(); crtParamField = new ParameterField(); crtParamFields = new ParameterFields(); crtParamDiscreteValue.Value = numero; crtParamField.ParameterFieldName = "codigofactura"; crtParamField.CurrentValues.Add(crtParamDiscreteValue); crtParamFields.Add(crtParamField); InitializeComponent(); crystalReportViewer1.ParameterFieldInfo = crtParamFields; }
public override Expression VisitMemberBinding(MemberBinding memberBinding) { if (memberBinding == null || memberBinding.BoundMember == null) { return(null); } if (this._string == null) { this._string = new StringBuilder(); } ParameterField pf = memberBinding.BoundMember as ParameterField; if (pf != null) { this._string.Append("$"); this._string.Append(pf.Parameter.ArgumentListIndex); } else { if (memberBinding.BoundMember != null && memberBinding.BoundMember.DeclaringType is BlockScope) { this.Visit(memberBinding.BoundMember); } else if (memberBinding.TargetObject != null && memberBinding.BoundMember != null) { this.VisitExpression(memberBinding.TargetObject); this._string.Append("@"); this.Visit(memberBinding.BoundMember); } else if (memberBinding.TargetObject == null) { if (memberBinding.BoundMember.IsStatic) { this.Visit(memberBinding.BoundMember); return(memberBinding); } else if (memberBinding.BoundMember is InstanceInitializer) { this.VisitMethod((InstanceInitializer)memberBinding.BoundMember); //dealing with constructor no different from dealing with other calls. } } } return(memberBinding); }
public void ReferenceTest() { int ch1 = 2, ch2 = 1, ch3 = 4, ch4 = 3, chsum = ch1 + ch2 + ch3 + ch4; int s1 = 6, s2 = 4, s3 = 5; float[] x1val = (new float[ch1 * s1 * s2 * s3]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] x2val = (new float[ch2 * s1 * s2 * s3]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] x3val = (new float[ch3 * s1 * s2 * s3]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] x4val = (new float[ch4 * s1 * s2 * s3]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] yval = (new float[chsum * s1 * s2 * s3]).Select((_, idx) => idx * 1e-3f).Reverse().ToArray(); Tensor x1tensor = new Tensor(new Shape(ShapeType.Map, ch1, s1, s2, s3), x1val); Tensor x2tensor = new Tensor(new Shape(ShapeType.Map, ch2, s1, s2, s3), x2val); Tensor x3tensor = new Tensor(new Shape(ShapeType.Map, ch3, s1, s2, s3), x3val); Tensor x4tensor = new Tensor(new Shape(ShapeType.Map, ch4, s1, s2, s3), x4val); Tensor ytensor = new Tensor(new Shape(ShapeType.Map, chsum, s1, s2, s3), yval); ParameterField x1 = x1tensor; ParameterField x2 = x2tensor; VariableField x3 = x3tensor; ParameterField x4 = x4tensor; VariableField y_actual = ytensor; Field y_expect = Concat(axis: 0, x1, x2, x3, x4); Field err = Abs(y_expect - y_actual); (Flow flow, Parameters Parameters) = Flow.Optimize(err); flow.Execute(); float[] gx1_actual = x1.GradTensor.State; AssertError.Tolerance(gx1_expect, gx1_actual, 1e-7f, 1e-5f, $"not equal gx1"); float[] gx2_actual = x2.GradTensor.State; AssertError.Tolerance(gx2_expect, gx2_actual, 1e-7f, 1e-5f, $"not equal gx2"); float[] gx4_actual = x4.GradTensor.State; AssertError.Tolerance(gx4_expect, gx4_actual, 1e-7f, 1e-5f, $"not equal gx4"); }
private void frm_officer_large_img_report_Load(object sender, EventArgs e) { base.WindowState = FormWindowState.Maximized; cr_guard_large_img report = new cr_guard_large_img(); ParameterFields paramFields = new ParameterFields(); ParameterField parameterField = new ParameterField(); ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue(); foreach (Table tbCurrent in report.Database.Tables) { Set_Report_logons.SetTableLogin(tbCurrent); } report.SetDataSource(sg_Reports.SELECT_GUARD_LARGE_IMAGE_RPT("", SystemConst.guard_number)); report.SetParameterValue("QueryName", "SELECT_GUARD_LARGE_IMAGE_RPT"); report.SetParameterValue("guard_number", SystemConst.guard_number); this.cr_large_image_report.ParameterFieldInfo = paramFields; this.cr_large_image_report.ReportSource = report; }
public void ReferenceTest() { int length = 27; float decay = 0.25f; float[] xval = (new float[length]).Select((_, idx) => 0.1f * ((float)idx * 3 - length)).ToArray(); float[] yval = xval.Select((v) => v * (1 - decay)).ToArray(); Tensor x_tensor = new Tensor(Shape.Vector(length), xval); ParameterField x = x_tensor; (Flow flow, _) = Flow.Optimize(x); x.AddUpdater(new Ridge(x, decay)); x.Update(); AssertError.Tolerance(yval, x_tensor.State, 1e-7f, 1e-5f); }
protected void rptBTN_Click(object sender, EventArgs e) { //TrackReportGeneration.Add("Details Report"); //Getting the input values from front-end string ILCID = ilcDDL.SelectedValue.ToString(); string fromDate = datePickerFrom.Text; string toDate = datePickerTo.Text; Session["ILCID"] = ILCID; rprt.Load(Server.MapPath("~/rptDateWiseDetailUser.rpt")); rprt.SetDatabaseLogon("sa", "sqladmin@123", "103.234.26.37", "SESIP", true); SqlConnection conRpt = new SqlConnection(ConfigurationManager.ConnectionStrings["ILCDBConnectionString"].ToString()); SqlCommand cmdRpt = new SqlCommand("SP_ILC_Logged_On_User_Details", conRpt); cmdRpt.CommandType = CommandType.StoredProcedure; cmdRpt.Parameters.AddWithValue("@vDateFrom", fromDate); cmdRpt.Parameters.AddWithValue("@vDateTo", toDate); cmdRpt.Parameters.AddWithValue("@vILCID", ILCID); SqlDataAdapter sda = new SqlDataAdapter(cmdRpt); DataSet ds = new DataSet(); sda.Fill(ds); rprt.SetDataSource(ds); crv.ReportSource = rprt; ParameterField field1 = this.crv.ParameterFieldInfo[0]; ParameterDiscreteValue val1 = new ParameterDiscreteValue(); val1.Value = fromDate; field1.CurrentValues.Add(val1); ParameterField field2 = this.crv.ParameterFieldInfo[1]; ParameterDiscreteValue val2 = new ParameterDiscreteValue(); val2.Value = toDate; field2.CurrentValues.Add(val2); ParameterField field3 = this.crv.ParameterFieldInfo[2]; ParameterDiscreteValue val3 = new ParameterDiscreteValue(); val3.Value = ILCID; field3.CurrentValues.Add(val3); }
//-------------------------------------------------------------------------------------------------------------------------------------------------- public void generoFactura(int NroFac, string nt, string iv, string ivaImp) { facturaReporteForm fcr = new facturaReporteForm(); ParameterField pf = new ParameterField(); ParameterFields pfs = new ParameterFields(); ParameterDiscreteValue pdv = new ParameterDiscreteValue(); pf.Name = "@Nro_Fac"; pdv.Value = NroFac; pf.CurrentValues.Add(pdv); pfs.Add(pf); fcr.crystalReport.ParameterFieldInfo = pfs; PATHReport = Environment.CurrentDirectory + @"\Factura.rpt"; oRep.Load(PATHReport); TextObject neto; TextObject IVA; TextObject ivaImpuesto; if (oRep.ReportDefinition.ReportObjects["neto"] != null) { neto = (TextObject)oRep.ReportDefinition.ReportObjects["neto"]; neto.Text = nt; } if (oRep.ReportDefinition.ReportObjects["iva"] != null) { IVA = (TextObject)oRep.ReportDefinition.ReportObjects["iva"]; IVA.Text = iv; } if (oRep.ReportDefinition.ReportObjects["IVAImp"] != null) { ivaImpuesto = (TextObject)oRep.ReportDefinition.ReportObjects["IVAImp"]; ivaImpuesto.Text = ivaImp; } fcr.crystalReport.ReportSource = oRep; fcr.ShowDialog(); }
public void TheoreticalTest() { int inchannels = 8, outchannels = 12, kwidth = 3, kheight = 5, stride = 2, inwidth = 7, inheight = 8; int outwidth = (inwidth - kwidth) / stride + 1, outheight = (inheight - kheight) / stride + 1, batch = 3; float[] xval = (new float[inwidth * inheight * inchannels * batch]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] yval = (new float[outwidth * outheight * outchannels * batch]).Select((_, idx) => idx * 1e-3f).ToArray(); float[] wval = (new float[kwidth * kheight * outchannels * inchannels / 4]).Select((_, idx) => idx * 1e-3f).Reverse().ToArray(); Tensor xtensor = new Tensor(Shape.Map2D(inchannels, inwidth, inheight, batch), xval); Tensor ytensor = new Tensor(Shape.Map2D(outchannels, outwidth, outheight, batch), yval); Tensor wtensor = new Tensor(Shape.Kernel2D(inchannels, outchannels / 4, kwidth, kheight), wval); VariableField x_actual = xtensor; ParameterField w = wtensor; ParameterField y = ytensor; Field yr = QuaternionR(y), yi = QuaternionI(y), yj = QuaternionJ(y), yk = QuaternionK(y); Field wr = QuaternionR(w), wi = QuaternionI(w), wj = QuaternionJ(w), wk = QuaternionK(w); Shape outshape = Shape.Map2D(inchannels / 4, inwidth, inheight, batch); Field xr = Deconvolution2D(yr, wr, stride, outshape) - Deconvolution2D(yi, wi, stride, outshape) - Deconvolution2D(yj, wj, stride, outshape) - Deconvolution2D(yk, wk, stride, outshape); Field xi = Deconvolution2D(yr, wi, stride, outshape) + Deconvolution2D(yi, wr, stride, outshape) + Deconvolution2D(yj, wk, stride, outshape) - Deconvolution2D(yk, wj, stride, outshape); Field xj = Deconvolution2D(yr, wj, stride, outshape) - Deconvolution2D(yi, wk, stride, outshape) + Deconvolution2D(yj, wr, stride, outshape) + Deconvolution2D(yk, wi, stride, outshape); Field xk = Deconvolution2D(yr, wk, stride, outshape) + Deconvolution2D(yi, wj, stride, outshape) - Deconvolution2D(yj, wi, stride, outshape) + Deconvolution2D(yk, wr, stride, outshape); Field x_expect = QuaternionCast(xr, xi, xj, xk); Field err = x_expect - x_actual; (Flow flow, Parameters Parameters) = Flow.Optimize(err); flow.Execute(); float[] gy_actual = y.GradTensor.State; float[] gw_actual = w.GradTensor.State; AssertError.Tolerance(gy_expect, gy_actual, 1e-7f, 1e-5f, $"not equal gy"); AssertError.Tolerance(gw_expect, gw_actual, 1e-6f, 1e-4f, $"not equal gw"); /*backward tolerance*/ }
/// <summary> /// báo cáo kết quả hoạt động của nhân viên /// </summary> /// <param name="FullPathReport"></param> /// <param name="dtBieuMau16"></param> /// <param name="TuNgay"></param> /// <param name="DenNgay"></param> public void InBaoCaoBieuMau16(string FullPathReport, DataTable dtBieuMau16_NVDienThoai, DataTable dtBieuMau16_NVTongDai, DateTime TuNgay, DateTime DenNgay) { try { //Load lên mẫu in của giấy phép vào đối tượng report document mReportDocument.Load(FullPathReport); //Thực hiện gán Datasource cho report document // mReportDocument.SetDataSource(dtBieuMau16_NVDienThoai); mReportDocument.Subreports["DienThoai"].SetDataSource(dtBieuMau16_NVDienThoai); mReportDocument.Subreports["TongDai"].SetDataSource(dtBieuMau16_NVTongDai); //Thực hiện view thông tin của giấy phép lên form in ParameterFields myParameterFields = new ParameterFields(); //TuNgay ParameterField FieldTuNgay = new ParameterField(); ParameterDiscreteValue DiscreteValueTuNgay = new ParameterDiscreteValue(); FieldTuNgay.ParameterFieldName = "pTuNgay"; DiscreteValueTuNgay.Value = string.Format("{0: dd/MM/yyyy}", TuNgay); FieldTuNgay.CurrentValues.Add(DiscreteValueTuNgay); myParameterFields.Add(FieldTuNgay); //DenNgay ParameterField FieldDenNgay = new ParameterField(); ParameterDiscreteValue DiscreteValueDenNgay = new ParameterDiscreteValue(); FieldDenNgay.ParameterFieldName = "pDenNgay"; DiscreteValueDenNgay.Value = string.Format("{0: dd/MM/yyyy}", DenNgay); FieldDenNgay.CurrentValues.Add(DiscreteValueDenNgay); myParameterFields.Add(FieldDenNgay); //-- Duong dan logo --- ParameterField FieldLogo_Path = new ParameterField(); ParameterDiscreteValue DiscreteValueLogo = new ParameterDiscreteValue(); FieldLogo_Path.ParameterFieldName = "pLogoPath"; DiscreteValueLogo.Value = g_LogoPath; FieldLogo_Path.CurrentValues.Add(DiscreteValueLogo); myParameterFields.Add(FieldLogo_Path); // --------------------- crGiayPhepViewer.ParameterFieldInfo = myParameterFields; crGiayPhepViewer.ReportSource = mReportDocument; } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { clsSpeedo.Authenticate(); if (!Page.IsPostBack) { //Report crvMRCF.Height = 600; ConnectionInfo ConnInfo = new ConnectionInfo(); { ConnInfo.ServerName = "hades"; ConnInfo.DatabaseName = "MySTIHQ"; ConnInfo.UserID = "usermystihq"; ConnInfo.Password = "******"; } foreach (TableLogOnInfo cnInfo in this.crvMRCF.LogOnInfo) { cnInfo.ConnectionInfo = ConnInfo; } ParameterFields paramFields = new ParameterFields(); ParameterField paramField = new ParameterField(); ParameterDiscreteValue discreteVal = new ParameterDiscreteValue(); paramField.ParameterFieldName = "MRCF Number"; if (Request.QueryString["mrcfcode"] != null || Request.QueryString["mrcfcode"] != "") { discreteVal.Value = Request.QueryString["mrcfcode"]; paramField.CurrentValues.Add(discreteVal); paramFields.Add(paramField); crvMRCF.ParameterFieldInfo = paramFields; crvMRCF.PrintMode = CrystalDecisions.Web.PrintMode.Pdf; } else { Response.Redirect("~/AccessDenied.aspx"); } } }