protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_HouseCounters); report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.PaymentReportByJn); report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_ResidentVacations); report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.ReceiptTerminalReportByParameters); report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.CounterIndicationStatistics); report.Compile(); report.RegData("ReportData", (System.Data.DataSet) ds); report["period"] = (base.DateBeg.Date == base.DateEnd.Date) ? ("за " + base.DateBeg.Date.ToString("dd.MM.yyyy")) : ("с " + base.DateBeg.Date.ToString("dd.MM.yyyy") + " по " + base.DateEnd.Date.ToString("dd.MM.yyyy")); return report; }
private void ChangeConnectString(StiReport report) { //((Stimulsoft.Report.Dictionary.StiSqlDatabase)(report.Dictionary.Databases["Connection1"])).ConnectionString = ConfigurationManager.ConnectionStrings["Mms"].ConnectionString; foreach (Stimulsoft.Report.Dictionary.StiSqlDatabase item in report.Dictionary.Databases) { var prefix = item.Name.Split('_')[0]; item.ConnectionString = ConfigurationManager.ConnectionStrings[prefix].ConnectionString; } }
public static void ShowInspectionActPystografMinReport(System.Windows.Forms.IWin32Window owner, long inspectionId) { System.Data.DataSet ujfApartmentHouseInspectionActPystografMinReport = Mappers.SimpleReportMapper.GetUjfApartmentHouseInspectionActPystografMinReport(inspectionId); ujfApartmentHouseInspectionActPystografMinReport.Tables.get_Item(0).set_TableName("InspectionInfo"); StiReport report = new StiReport(); report.Load(Resources.UjfApartmentHouseInspectionAct_PystografMin); report.Compile(); report.RegData((System.Data.DataSet) ujfApartmentHouseInspectionActPystografMinReport); report.Show((System.Windows.Forms.IWin32Window) owner); }
public static void ShowCoordinationVolumesDefectsReport(System.Windows.Forms.IWin32Window owner, long inspectionId) { System.Data.DataSet ujfCoordinationVolumesDefectsReport = Mappers.SimpleReportMapper.GetUjfCoordinationVolumesDefectsReport(inspectionId); ujfCoordinationVolumesDefectsReport.Tables.get_Item(0).set_TableName("CoordinationDefects"); StiReport report = new StiReport(); report.Load(Resources.UJFListCoordinationVolumesDefects); report.Compile(); report.RegData((System.Data.DataSet) ujfCoordinationVolumesDefectsReport); report.Show((System.Windows.Forms.IWin32Window) owner); }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(this.rbTypeBySimple.get_Checked() ? Resources.Rep_AccountServicesSaldoSimpleReport : (this.rbTypeByOper.get_Checked() ? Resources.Rep_AccountServicesSaldoByOper : Resources.Rep_AccountServicesSaldo)); report.EngineVersion = StiEngineVersion.EngineV2; report.ReportCacheMode = StiReportCacheMode.Off; report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { System.Data.DataTable table = ds.Tables.get_Item(0); StiReport report = new StiReport(); report.Load(Resources.Rep_ObjLogOper); report.Compile(); report.RegData("obj_log_oper", (System.Data.DataTable) table); report["period"] = (base.DateBeg.Date == base.DateEnd.Date) ? ("за " + base.DateBeg.Date.ToString("dd.MM.yyyy")) : ("с " + base.DateBeg.Date.ToString("dd.MM.yyyy") + " по " + base.DateEnd.Date.ToString("dd.MM.yyyy")); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_AccountServicesPaymentByGroupOper); report.EngineVersion = StiEngineVersion.EngineV2; report.ReportCacheMode = StiReportCacheMode.Off; report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_AccountServicesPersonJnBenefitsNoDebtsReport); report.EngineVersion = StiEngineVersion.EngineV2; report.ReportCacheMode = StiReportCacheMode.Off; report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
public static void ShowDialog(System.Windows.Forms.IWin32Window owner, System.DateTime date, ObjectList<LocalAddress> addresses) { System.Data.DataSet accountServiceByAddressesReport = GroupOperation.GetAccountServiceByAddressesReport(date, addresses); accountServiceByAddressesReport.Tables.get_Item(0).set_TableName("dataAccountServices"); accountServiceByAddressesReport.Tables.get_Item(1).set_TableName("date"); StiReport report = new StiReport(); report.Load(Resources.Rep_AccountServicesByAddresses); report.Compile(); report.RegData((System.Data.DataSet) accountServiceByAddressesReport); report.Show((System.Windows.Forms.IWin32Window) owner); }
protected override StiReport MakeReport(System.Data.DataSet ds) { System.Data.DataTable table = ds.Tables.get_Item(0); System.Data.DataTable table2 = ds.Tables.get_Item(1); StiReport rep = new StiReport(); this.LoadReport(rep); rep.Compile(); rep.RegData("Header", (System.Data.DataTable) table); rep.RegData("Data", (System.Data.DataTable) table2); return rep; }
public static void ShowDefectsDelayWorkReport(System.Windows.Forms.IWin32Window owner, long inspectionId) { System.Data.DataSet ujfApartmentHouseDefectsDelayWorkReport = Mappers.SimpleReportMapper.GetUjfApartmentHouseDefectsDelayWorkReport(inspectionId); ujfApartmentHouseDefectsDelayWorkReport.Tables.get_Item(0).set_TableName("DefectsInfo"); ujfApartmentHouseDefectsDelayWorkReport.Tables.get_Item(1).set_TableName("HouseInfo"); StiReport report = new StiReport(); report.Load(Resources.UjfApartmentHouseInspectionDefectsDelayWorksByInspection); report.Compile(); report.RegData((System.Data.DataSet) ujfApartmentHouseDefectsDelayWorkReport); report.Show((System.Windows.Forms.IWin32Window) owner); }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); AccountReportType byName = AccountReportType.GetByName("Уведомление для Грозного, без долга"); report.LoadFromString(byName.Template); report.EngineVersion = StiEngineVersion.EngineV2; report.ReportCacheMode = StiReportCacheMode.Off; report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(this.m_withServices ? Resources.Rep_AccountServicesPaymentByMonth : Resources.Rep_AccountPaymentByMonth); if (!base.IsOrientationSet) { report.Pages[0].Orientation = base.Orientation; } report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_AccountServicesPersonBenefitsReport); if (!base.IsOrientationSet) { report.Pages[0].Orientation = base.Orientation; } report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
public static void ShowExpiredAndCurrentDefectsReport(System.Windows.Forms.IWin32Window owner, long inspectionId, System.DateTime period) { System.Data.DataSet ujfListExpiredAndCurrentDefectsReport = Mappers.SimpleReportMapper.GetUjfListExpiredAndCurrentDefectsReport(inspectionId, period); ujfListExpiredAndCurrentDefectsReport.Tables.get_Item(0).set_TableName("CurentDefects"); ujfListExpiredAndCurrentDefectsReport.Tables.get_Item(1).set_TableName("ExpiredDefects"); ujfListExpiredAndCurrentDefectsReport.Tables.get_Item(2).set_TableName("Period"); StiReport report = new StiReport(); report.Load(Resources.ListExpiredAndCurrentDefects); report.Compile(); report.RegData((System.Data.DataSet) ujfListExpiredAndCurrentDefectsReport); report.Show((System.Windows.Forms.IWin32Window) owner); }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_FaktLivingTempRegistration); if (!base.IsOrientationSet) { report.Pages[0].Orientation = base.Orientation; } report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
private StiReport GetReport() { var report = new StiReport(); report.Load(GetReportPath()); ChangeConnectString(report); report.Compile(); SetReportParamaters(report); return report; }
protected override StiReport MakeReport(System.Data.DataSet ds) { StiReport report = new StiReport(); report.Load(Resources.Rep_WritingOutFinAccount); if (!base.IsOrientationSet) { report.Pages[0].Orientation = base.Orientation; } report.Compile(); report.RegData((System.Data.DataSet) ds); return report; }
public static void ShowDialog(System.Windows.Forms.IWin32Window owner, PayRequest request) { System.Data.DataTable dataTableByRequestIdFormSpScheme; System.Data.DataTable dataTableById; System.Data.DataTable dataTableByRequestId = PayRequestBenefit.GetDataTableByRequestId(request); if ((dataTableByRequestId == null) || (dataTableByRequestId.Rows.get_Count() == 0)) { System.Data.DataRow row = dataTableByRequestId.Rows.Add((object[]) new object[0]); row.set_Item("benefitName", "Льготы отсутствуют"); row.set_Item("PersonsCount", 0); } if (request.Id > 0L) { dataTableByRequestIdFormSpScheme = PayRequestService.GetDataTableByRequestId(request); } else { dataTableByRequestIdFormSpScheme = PayRequestService.GetDataTableByRequestIdFormSpScheme(request); } StiReport report = new StiReport(); string valueByName = Setting.GetValueByName("Глобальные установки", "Шаблон квитанции"); string info = ""; if (valueByName == "ReceiptReportSakhalin") { report.Load(Resources.ReceiptReportSakhalin); long accountId = 0L; if (long.TryParse(request.AccountId, ref accountId) && (accountId > 0L)) { info = Organization.FindHouseHolderByAccountId(accountId).Info; } } else { bool flag = (bool) ((Setting.GetValueByName("Параметры квитанций", "Печатать в кассе колонку ЕДК") ?? "").ToUpper() == "ДА"); report.Load(flag ? Resources.ReceiptReportWithEDK : Resources.ReceiptReport); info = (Organization.CentralOffice == Organization.Null) ? ((string) "Отсутсвует ОРГАНИЗАЦИЯ в глобальных установках") : Organization.CentralOffice.Info; } report.Compile(); report.Dictionary.Variables.Add("orgInfo", info); report.Dictionary.Variables.Add("diffEDKMonth", ("Да" == (Setting.GetValueByName("Параметры расчетов", "Использовать ЕДК за предыдущий период") ?? string.Empty)) ? -1 : 0); if (request.Id > 0L) { dataTableById = PayRequest.GetDataTableById(request); } else { dataTableById = PayRequest.GetDataTableByIdFormSpScheme(request); } report.RegData("dataRequests", (System.Data.DataTable) dataTableById); report.RegData("dataRequestBenefits", (System.Data.DataTable) dataTableByRequestId); report.RegData("dataRequestServices", (System.Data.DataTable) dataTableByRequestIdFormSpScheme); report.Show((System.Windows.Forms.IWin32Window) owner); }
/// <summary> /// /// </summary> /// <returns></returns> public virtual ActionResult StiReport() { using (var db = new Models.DBContext()) { var obj = db.Provinces.Select(z => new {ProvinceName = z.Name, Citys= z.Citys}).ToList(); var mainReport = new StiReport(); mainReport.Load(Server.MapPath("~/Files/Report.mrt")); mainReport.Compile(); mainReport["DateTimeNow"] = DateTime.UtcNow; mainReport.RegBusinessObject("ProvincesWithCitys", obj); return Stimulsoft.Report.Mvc.StiMvcViewer.GetReportSnapshotResult(HttpContext, mainReport); } }
public static void ShowDialog(System.Windows.Forms.IWin32Window owner, ObjectList<PayRequest> requests, string caption, bool byCashier) { StiReport report = new StiReport { AutoLocalizeReportOnRun = true }; report.Load(byCashier ? Resources.ReceiptTerminalReportByCashier : Resources.ReceiptTerminalReport); report.Compile(); System.Data.DataTable table = Mappers.PayRequestMapper.ObjectListToDateTable(requests); report.RegData("dataRequests", (System.Data.DataTable) table); System.Data.DataTable table2 = new System.Data.DataTable("captionTable"); table2.Columns.Add("caption"); table2.Rows.Add((object[]) new object[] { caption }); report.RegData(table2.get_TableName(), (System.Data.DataTable) table2); report.Show((System.Windows.Forms.IWin32Window) owner); }
private void SetReportParamaters(StiReport report) { //report.CompiledReport.DataSources["check"].Parameters["FromDate"].ParameterValue = DateTime.Parse("10/05/1999"); var dataSource = report.CompiledReport.DataSources; foreach (Stimulsoft.Report.Dictionary.StiDataSource ds in dataSource) { var param = Request.QueryString; foreach (string key in param.Keys) { if (!ds.Parameters.Contains(key)) continue; var p = ds.Parameters[key]; var v = param[key]; p.ParameterValue = v; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string from = Request.Params["from"] == null ? DateTime.Now.ToString("dd/MM/yyyy") : Request.Params["from"].ToString(); string to = Request.Params["to"] == null ? DateTime.Now.ToString("dd/MM/yyyy") : Request.Params["to"].ToString(); Session["ssLaiLoFromDate"] = (Session["ssLaiLoFromDate"] == null || Session["ssLaiLoFromDate"] == "") ? from : Session["ssLaiLoFromDate"]; Session["ssLaiLoToDate"] = (Session["ssLaiLoToDate"] == null || Session["ssLaiLoToDate"] == "") ? from : Session["ssLaiLoToDate"]; } tmp = new StiReport(); LoadReportANDGetData(tmp, @"\ReportSources\SALE\BaoCaoLaiLo.mrt", "SALE_report_baocaoLaiLo", Session["ssLaiLoFromDate"].ToString(), Session["ssLaiLoToDate"].ToString()); tmp.Dictionary.Synchronize(); StiWebViewer1.Report = tmp; StiWebViewer1.ShowDesignButton = true; StiWebViewer1.ReportDesign += StiWebViewer1_ReportDesign; tmp.Render(true); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { dateDelivery.Value = DateTime.Now; cmbStaff.Value = -1; Session["ssDateDelivery"] = dateDelivery.Date.ToString("dd/MM/yyyy"); Session["ssStaffID"] = -1; } tmp = new StiReport(); LoadReportANDGetData(tmp, @"\ReportSources\SALE\BangKeGiaoHang.mrt", "SALE_Invoice_report_deliver_summary", int.Parse(Session["ssStaffID"].ToString()), Session["ssDateDelivery"].ToString()); tmp.Dictionary.Synchronize(); StiWebViewer1.Report = tmp; StiWebViewer1.ShowDesignButton = true; StiWebViewer1.ReportDesign += StiWebViewer1_ReportDesign; tmp.Render(true); }
protected void Page_Load(object sender, EventArgs e) { string appDirectory = HttpContext.Current.Server.MapPath(string.Empty); // Load report StiReport report = new StiReport(); report.Load(appDirectory + "\\Reports\\SimpleList.mrt"); // Assign data StiXmlDatabase database = new StiXmlDatabase("Demo", appDirectory + "\\Data\\Demo.xsd", appDirectory + "\\Data\\Demo.xml"); report.Dictionary.Databases.Add(database); report.Dictionary.Synchronize(); // Design report StiWebDesignerFx1.Design(report); }
private void btPreview_Click(object sender, RoutedEventArgs e) { var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("UsingBusinessObjects.SimpleList.mrt"); StiReport report = new StiReport(); report.Load(stream); stream.Close(); stream.Dispose(); stream = null; report.CalculationMode = StiCalculationMode.Interpretation; report.RegBusinessObject("Data", "Data", new Data()); report.Render(); report.Show(); }
private void BtnPrint_Click(object sender, EventArgs e) { StiReport Report = new StiReport(); Report.Load("Report/rptAmalkard.mrt"); Report.Compile(); Report["strTarikh1"] = mskTarikh1.Text; Report["strTarikh2"] = mskTarikh2.Text; Report["Tedad"] = lblTedad.Text; Report["Bemeh"] = lblBemeh.Text; Report["Khadamat"] = lblKhadamat.Text; Report["MablaghKol"] = lblMablagh.Text; Report["NameMatab"] = lblName.Text; Report["Tel"] = lblTel.Text; Report.ShowWithRibbonGUI(); }
private void BtnPrint_Click(object sender, RoutedEventArgs e) { var v = Business.GetPayrollSentencesBusiness().GetItems().ToList(); if (txtSearch.Text.Trim().Length > 0) { v = Business.GetPayrollSentencesBusiness().GetItems().Where(i => i.PrSTypeDesc.Contains(txtSearch.Text) || i.PrSOTypeDesc.Contains(txtSearch.Text)).ToList(); } else { grdBenefitAndDeductionsLists.ItemsSource = Business.GetPayrollSentencesBusiness().GetItems().ToList(); } StiReport report = new StiReport(); report.Load(@".\\Report\\Payroll\\PayrollSentencesSubmit.mrt"); report.RegData("v", v); report.Show(); }
public ReturnedSaveFuncInfo DesignNew(StiReport st, DataSet ds, int sanadId, int sanadType, List <object> lst) { var res = new ReturnedSaveFuncInfo(); try { PutExtras(st, ds, sanadId, sanadType, lst); st.Design(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); res.AddReturnedValue(ex); } return(res); }
private void OnLoading(object sender, StiLoadingObjectEventArgs e) { using (var form = new FrmBuscadorInformes()) { if (form.ShowDialog() == DialogResult.OK) { informe = form.Informe; //Add data to datastore stiReport = new StiReport(); stiReport.LoadEncryptedReportFromString(informe.Codigo, informe.Guid); stiReport.Dictionary.Databases.Clear(); stiReport.Dictionary.Databases.Add(new StiSqlDatabase("Dym", @"Data Source=.\SQLEXPRESS;Initial Catalog=Dym;Integrated Security=True;")); designer.Report = stiReport; } } }
async private void MainPage_Loaded(object sender, RoutedEventArgs e) { StorageFile storageFileData = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("Items\\DemoNet.data"); StorageFile storageFileReport = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("Items\\MasterDetail.mrt"); DataSet dataSet = new DataSet(); await dataSet.LoadAsync(storageFileData); StiReport report = new StiReport(); await report.LoadAsync(storageFileReport); report.RegBusinessObject("Demo", dataSet); report.Dictionary.SynchronizeBusinessObjects(3); await report.RenderAsync(); viewerControl.Report = report; }
private void ReadOdbcDataConnection(XmlNode node, StiReport report) { StiOdbcDatabase database = new StiOdbcDatabase(); report.Dictionary.Databases.Add(database); database.Name = ReadString(node, "Name", database.Name); foreach (XmlNode elementNode in node.ChildNodes) { switch (elementNode.Name) { case "TableDataSource": ReadTableDataSource(elementNode, report, database.Name); break; } } }
public string GetFile(int id) { StiReport report = new StiReport(); report.Dictionary.DataStore.Clear(); report.Load(Path.GetFullPath("SimpleList.mrt")); report.Dictionary.Variables["id"].ValueObject = id; string data = report.SaveToJsonString(); //string filePath = Path.GetFullPath("SimpleList.mrt"); //StreamReader rd = new StreamReader(filePath); //string data = rd.ReadToEnd(); //rd.Close(); return(data); }
private void ShowReport() { StiReport report = new StiReport(); using (var uow = new SainaDbContext()) { var data = productDataGrid.SelectedItems.Cast <Product>().Select(Product => new { ProductCode = Product.ProductCode, ProductTitle = Product.ProductTitle, }); report.RegBusinessObject("ProductReport", data); report.Load($"{Environment.CurrentDirectory}\\report.mrt"); report.Show(); } }
// //========================================================================================================================================= /// <summary> /// 取得 DEMO PDF 的檔案串流 (記得把範本放到 D:\DEMO_1.mrt) /// </summary> /// <returns></returns> private byte[] GetPdfBinaryArray() { byte[] content = null; string path = @"D:\\DEMO_1.mrt"; // 建立綁定資料 string ret = string.Empty; StiReport report = new StiReport(); report.Load(path); report.RegData(GetDataSet()); report.Render(); using (MemoryStream ms = new MemoryStream()) { report.ExportDocument(StiExportFormat.Pdf, ms); content = ms.ToArray(); } return(content); }
public async Task <IActionResult> GetReport([FromQuery] Guid template) { var stiReport = StiReport.CreateNewReport(); if (_memoryCache.TryGetValue <byte[]>(template.ToString("D"), out var data)) { stiReport.Load(data); } stiReport.RegBusinessObject("Data", new { Test = "Test" }); stiReport.Dictionary.SynchronizeBusinessObjects(5); await stiReport.Dictionary.SynchronizeAsync(); return(await StiNetCoreDesigner.GetReportResultAsync(this, stiReport)); }
public string InstitutionTrialBalance([FromBody] JObject data) { string startDate = data.GetValue("startDate").ToString(); DateTime sdate = ChangeDateFormat(startDate); string databaseID = data.GetValue("databaseID").ToString(); StiReport report = new StiReport(); var path = StiNetCoreHelper.MapPath(this, "C:/MohamedFahmy/BinHamranAdminPanelFront/src/reports/InstitutionTrialBalance.mrt"); report.Load(path); report["FromDate"] = sdate; report["@STARTDATE"] = sdate; report["@DatabaseID"] = databaseID; var dbMS_SQL = (StiSqlDatabase)report.Dictionary.Databases["MS SQL"]; dbMS_SQL.ConnectionString = appSettings.Report_Connection; report.Render(false); return(report.SaveDocumentJsonToString()); }
private void button1_Click(object sender, EventArgs e) { var report = new StiReport(); report.Load(@"Reports\Variables.mrt"); // Required to prepare the in compilation mode report.Compile(); // Set Variables report["Name"] = textBoxName.Text; report["Surname"] = textBoxSurname.Text; report["Email"] = textBoxEmail.Text; report["Address"] = textBoxAddress.Text; report["Sex"] = radioButtonMale.Checked; report.Show(); }
private void ButtonShow_Click(object sender, RoutedEventArgs e) { var report = new StiReport(); report.Load(@"Reports\Variables.mrt"); // Required to prepare the in compilation mode report.Compile(); // Set Variables report["Name"] = TextBoxName.Text; report["Surname"] = TextBoxSurname.Text; report["Email"] = TextBoxEmail.Text; report["Address"] = TextBoxAddress.Text; report["Sex"] = RadioButtonMale.IsChecked.GetValueOrDefault(); report.ShowWithWpf(); }
public static void ClientesXmonedero() { try { report = new StiReport(); report.Load(FClientesXmonedero); report.Compile(); report["creador"] = Ambiente.LoggedUser.UsuarioId; report.RegBusinessObject("clientes", clienteController.SelectAllOrderByMonedero()); report.Show(); } catch (Exception e) { Ambiente.Mensaje(e.Message); } }
private void ShowReport() { StiReport report = new StiReport(); using (var uow = new SainaDbContext()) { var data = measurementUnitDataGrid.SelectedItems.Cast <MeasurementUnit>().Select(MeasurementUnit => new { MeasurementUnitTitle = MeasurementUnit.MeasurementUnitTitle, MeasurementUnitTitle2 = MeasurementUnit.MeasurementUnitTitle2, }); report.RegBusinessObject("MeasurementUnitReport", data); report.Load($"{Environment.CurrentDirectory}\\report.mrt"); report.Show(); } }
public void ReportCreated(StiReport rpt, AccountServicesJournalReportForm form, string xml) { string str; using (System.IO.MemoryStream stream = new System.IO.MemoryStream()) { rpt.ExportDocument(StiExportFormat.Pdf, (System.IO.Stream) stream); str = System.Convert.ToBase64String(stream.ToArray()); } ExchangeRequest objectWithId = (ExchangeRequest) base.ObjectWithId; try { this.MakeResponse(objectWithId, "Получение справки об оплате для единого окна", string.Empty, str, xml); } catch (System.Exception exception) { AIS.SN.UI.Messages.ShowException(this, exception); } }
private void loadReport() { StiReport report = new StiReport(); report.Load("Reports\\benhan_tontamung.mrt"); StiSqlDatabase sqlDB = new StiSqlDatabase(); sqlDB = (StiSqlDatabase)report.Dictionary.Databases["Oracle"]; sqlDB.ConnectionString = FormHISSMS.conn_string; report.Compile(); report["schemamonth"] = dateToSchemaMonth(dateEditTuNgay.Text, dateEditDenNgay.Text); report["tungay"] = dateEditTuNgay.Text; report["denngay"] = dateEditDenNgay.Text; report.Render(false); stiViewerControl.Report = report; }
/// <summary> /// 导出-打印(根据所选中的行ID获取DATATABLE,用于报表输出) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TmPrint_Click(object sender, EventArgs e) { var filename = string.Empty; try { if (gvdtl.Rows.Count == 0) { throw new Exception("没有内容,不能选择."); } if (gvdtl.SelectedRows.Count == 0) { throw new Exception("请至少选择一行"); } task.TaskId = 4; task.FunctionId = "4"; task.Id = Convert.ToInt32(gvdtl.Rows[gvdtl.CurrentCell.RowIndex].Cells[0].Value); //获取所选行的ID主键值 task.FunctionName = Convert.ToString(gvdtl.Rows[gvdtl.CurrentCell.RowIndex].Cells[1].Value); //单据类型:AdornOrder MaterialOrder Start(); var resultdt = task.ResultTable; if (resultdt.Rows.Count == 0) { throw new Exception("导出异常,请联系管理员"); } //调用STI模板并执行导出代码 //加载STI模板 MaterialOrderReport filename = Convert.ToString(gvdtl.Rows[gvdtl.CurrentCell.RowIndex].Cells[1].Value) == "AdornOrder" ? "AdornOrderReport" : "MaterialOrderReport"; var filepath = Application.StartupPath + $"/Report/{filename}.mrt"; var stireport = new StiReport(); stireport.Load(filepath); //加载DATASET 或 DATATABLE stireport.RegData("Order", resultdt); stireport.Compile(); stireport.Show(); //调用预览功能 //stireport.Design(true); //调用设计功能 } catch (Exception ex) { MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public ActionResult GetReportSnapshot() { try { // //load report table // var con = new AppSettings(); //var param = new DynamicParameters(); //param.Add("P_SCHEMEFUNDID", GlobalValue.Report_Param_1, DbType.String, ParameterDirection.Input); //param.Add("P_DATE", GlobalValue.Report_Param_2, DbType.DateTime, ParameterDirection.Input); //param.Add("P_MAKER_ID", GlobalValue.User_ID, DbType.String, ParameterDirection.Input); //con.GetConnection().Execute("REPORT_INSERT_PORT_SUM_SCH", param, commandType: CommandType.StoredProcedure); if (GlobalValue.Report_Index_Id == "employee_report1") { string pa = Server.MapPath("~/Penfad_Reports/MM_TBILL_BOND_PV_Scheme.dll"); System.Reflection.Assembly assembly_1 = System.Reflection.Assembly.LoadFrom(pa); StiReport My_Report = StiReport.GetReportFromAssembly(assembly_1); //////asign constring My_Report.Dictionary.DataStore.Clear(); My_Report.Dictionary.Databases.Add(new StiOracleDatabase("con", GlobalValue.ConString)); My_Report[":P_SF_ID"] = GlobalValue.Report_Param_1; My_Report[":P_DATE"] = GlobalValue.Report_Param_2; My_Report[":P_USER"] = GlobalValue.Report_Param_2_string; //((StiOracleSource)My_Report.Dictionary.DataSources["con"]).CommandTimeout = 6000; X.Mask.Hide(); return(StiMvcViewer.GetReportSnapshotResult(My_Report)); } else { X.Mask.Hide(); return(this.Direct()); } } catch (Exception ex) { X.Mask.Hide(); string ssss = ex.ToString(); return(this.Direct()); } }
protected void Page_Load(object sender, EventArgs e) { if (this.Session.SessionID == Request.QueryString["key"]) { string cmd = null; DataTable dt = new DataTable(); string year = Request.QueryString["year"].ToString(), cat = Request.QueryString["cat"].ToString(), ngaylapbc = Request.QueryString["date"].ToString(); switch (cat) { case "0": cmd = "getRpt0"; break; case "1": cmd = "getRpt1"; break; case "2": cmd = "getRpt2"; break; case "3": cmd = "getRpt3"; break; default: break; } dt = getReportData(year, ngaylapbc, cmd); StiReport report = new StiReport(); report.Load(Server.MapPath("Report" + cat + ".mrt")); report.Compile(); report.RegData(dt); report["namkt"] = year; report["ngaylapbc"] = ngaylapbc; //report.Dictionary.Synchronize(); //StiWebViewerSL1.Report = report; StiWebViewer1.Report = report; } }
protected override StiReport MakeReport(System.Data.DataSet ds) { System.DateTime dateBeg = base.DateBeg; System.DateTime time6 = new System.DateTime(base.DateEnd.get_Year(), base.DateEnd.get_Month(), base.DateEnd.get_Day()); System.DateTime time2 = time6.AddDays((double) 1.0).AddMilliseconds((double) -1.0); StiReport report = new StiReport { AutoLocalizeReportOnRun = true }; report.Load(this.m_OnlyByProvider ? Resources.ReceiptTerminalReportOnlyByProvider : Resources.ReceiptTerminalReportByProvider); report.Compile(); report["DateBegin"] = dateBeg; report["DateEnd"] = time2; report.RegData("dataRequests", (System.Data.DataTable) this.m_DtRequests); System.Data.DataTable table = new System.Data.DataTable("captionTable"); table.Columns.Add("caption"); table.Rows.Add((object[]) new object[] { this.m_Caption }); report.RegData(table.get_TableName(), (System.Data.DataTable) table); return report; }
public IActionResult GetReport() { string Report = "demoreport"; var reportPath = HostEnvironment.WebRootPath + "\\Reports\\" + Report + ".mrt"; StiReport report = new StiReport(); //report.Load(reportPath); report.Load(StiNetCoreHelper.MapPath(this, reportPath)); //// ///What is the code for loading the json her ///The link to json is , considering that the json api is protected ///http://localhost:52507/api/Reports/GetEmployees return(StiNetCoreViewer.GetReportResult(this, report)); }
public static StiReport CreateTemplate() { var report = StiReport.CreateNewDashboard(); var dashboard = report.Pages[0] as StiDashboard; var textElement = new StiTextElement(); textElement.Left = 100; textElement.Top = 100; textElement.Width = 300; textElement.Height = 100; textElement.Text = "Sample Text"; textElement.Border.Side = StiBorderSides.All; textElement.BackColor = Color.LightGray; dashboard.Components.Add(textElement); return(report); }
private void btLoadReport_Click(object sender, System.Windows.RoutedEventArgs e) { if (cbReports.SelectedItem != null) { System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); var stream = a.GetManifestResourceStream(string.Format("DesignerSaveLoad.ReportFiles.{0}.mrt", ((ComboBoxItem)cbReports.SelectedItem).Content.ToString())); StiReport report = new StiReport(); report.Load(stream); stream.Close(); stream.Dispose(); stream = null; report.CalculationMode = StiCalculationMode.Interpretation; report.RegBusinessObject("Data", "Data", new Data()); designer.Report = report; } }
private void CrearNuevoReporte() { using (var form = new FrmReporte(true)) { if (form.ShowDialog() == DialogResult.OK) { reporte = form.Reporte; stiReport = form.StiReport; if (reporte == null || stiReport == null) { procesado = true; } else { ReportDesigner.Report = stiReport; } } } }
private void DesignReport() { StiReport report = new StiReport(); using (var uow = new SainaDbContext()) { var data = productModelDataGrid.SelectedItems.Cast <ProductModel>().Select(ProductModel => new { ProductModelCode = ProductModel.ProductModelCode, ProductModelTitle = ProductModel.ProductModelTitle, RequiredCode = ProductModel.RequiredCode, RequiredDocument = ProductModel.RequiredDocument }); report.RegBusinessObject("ProductModelReport", data); report.Design(); } }
private void PrintReport() { StiReport report = new StiReport(); using (var uow = new SainaDbContext()) { var data = productModelDataGrid.SelectedItems.Cast <ProductModel>().Select(ProductModel => new { ProductModelCode = ProductModel.ProductModelCode, ProductModelTitle = ProductModel.ProductModelTitle, RequiredCode = ProductModel.RequiredCode, RequiredDocument = ProductModel.RequiredDocument }); report.RegBusinessObject("ProductModelReport", data); report.Load($"{Environment.CurrentDirectory}\\glReport.mrt"); report.Print(); } }
async private void btLoad_Click(object sender, RoutedEventArgs e) { var openPicker = new FileOpenPicker(); openPicker.FileTypeFilter.Add(".xml"); openPicker.SuggestedStartLocation = PickerLocationId.ComputerFolder; StorageFile storageFile = await openPicker.PickSingleFileAsync(); if (storageFile != null) { StiReport report = viewerCotnrol.Report; viewerCotnrol.Report = null; await report.LoadEditableFieldsAsync(storageFile); viewerCotnrol.Report = report; } }
private void PrintReport() { StiReport report = new StiReport(); //using (var uow = new SainaDbContext()) //{ // var headerIds = StcDocumentHeaderRadGridView.SelectedItems.Cast<StcDocumentHeader>().Select(x => x.StcDocumentHeaderId); // var data = uow.StcDocumentItems.Include(x => x.StcDocumentHeader).Include(x => x.SL).Include(x => x.DL1).Include(x => x.DL2).Where(x => headerIds.Contains(x.StcDocumentHeaderId)) // .ToList() // .Select(accDocumentItem => new // { // HeaderDescription = accDocumentItem.StcDocumentHeader.HeaderDescription, // ManualDocumentNumber = accDocumentItem.StcDocumentHeader.ManualDocumentNumber, // Seconder = accDocumentItem.StcDocumentHeader.Seconder, // Status = accDocumentItem.StcDocumentHeader.Status, // SumDebit = accDocumentItem.StcDocumentHeader.SumDebit, // SystemFixNumber = accDocumentItem.StcDocumentHeader.SystemFixNumber, // SystemName = accDocumentItem.StcDocumentHeader.SystemName, // TypeDocumentTitle = accDocumentItem.StcDocumentHeader.TypeDocument.TypeDocumentTitle, // DocumentNumber = accDocumentItem.StcDocumentHeader.DocumentNumber, // DocumentDate = accDocumentItem.StcDocumentHeader.DocumentDate, // DailyNumber = accDocumentItem.StcDocumentHeader.DailyNumber, // ItemDebit = accDocumentItem.Debit, // Credit = accDocumentItem.Credit, // CurrencyTitle = accDocumentItem.Currency.CurrencyTitle, // CurrencyAmount = accDocumentItem.CurrencyAmount, // Description1 = accDocumentItem.Description1, // Description2 = accDocumentItem.Description2, // DLCode1 = accDocumentItem.DL1.DLCode, // DLCode2 = accDocumentItem.DL2.DLCode, // DLTitle1 = accDocumentItem.DL1.Title, // DLTitle2 = accDocumentItem.DL2.Title, // SLTitle = accDocumentItem.SL.Title, // TrackingDate = accDocumentItem.TrackingDate, // TrackingNumber = accDocumentItem.TrackingNumber, // DescriptionItem1 = accDocumentItem.Description1, // DescriptionItem2 = accDocumentItem.Description2, // }) // ; // report.RegBusinessObject("AccHeaderItemReport", data); // report.Load($"{Environment.CurrentDirectory}\\report.mrt"); // report.Print(); //} }
private void button1_Click(object sender, EventArgs e) { try { string filepath = Application.StartupPath + "\\LabelMultiSku.mrt"; StiReport report = new StiReport(); report.Load(filepath); report.Compile(); report["HU"] = "999"; PrinterSettings printerSettings = new PrinterSettings(); report.Print(false, printerSettings); } catch (Exception ex) { LogHelper.WriteLine(ex.Message + "\r\n" + ex.StackTrace); } }