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;
 }
Beispiel #2
0
 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_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.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;
 }
 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;
 }
 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);
 }
 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;
 }
 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(Resources.Rep_AccountServicesPersonJnBenefitsNoDebtsReport);
     report.EngineVersion = StiEngineVersion.EngineV2;
     report.ReportCacheMode = StiReportCacheMode.Off;
     report.Compile();
     report.RegData((System.Data.DataSet) ds);
     return report;
 }
Beispiel #11
0
 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();
     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;
 }
 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);
 }
Beispiel #14
0
 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 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)
 {
     StiReport report = new StiReport();
     report.Load(Resources.Rep_AccountServicesByAddresses);
     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_FaktLivingTempRegistration);
     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);
 }
Beispiel #19
0
        private StiReport GetReport()
        {
            var report = new StiReport();
            report.Load(GetReportPath());

            ChangeConnectString(report);

            report.Compile();
            SetReportParamaters(report);
           
            return report;
        }
Beispiel #20
0
 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);
     }
 }
Beispiel #22
0
        public ActionResult GetContractTemplatePdf(Guid id)
        {
            var report = new StiReport();
            var path   = System.Web.HttpContext.Current.Server.MapPath("~/Reports/Mrts/EMP/EMP_ContractReport.mrt");

            report.Load(path);
            report.Compile();
            report.RegBusinessObject("vm", _service.GetContractTemplatePdf(id));
            report.Render(false);
            Stream stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Pdf, stream);
            stream.Position = 0;
            return(new FileStreamResult(stream, "application/pdf"));
        }
 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);
 }
Beispiel #24
0
        protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestByOrganizationReport.mrt");

            report.Load(path);
            report.Compile();

            //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
            //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
            var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
            var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

            long value1 = 0;

            if (firstOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(firstOrganChartRadComboBox.SelectedValue, out value1);
            }

            long value2 = 0;

            if (secoundOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(secoundOrganChartRadComboBox.SelectedValue, out value2);
            }

            long value3 = 0;

            if (thirdOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(thirdOrganChartRadComboBox.SelectedValue, out value3);
            }

            var requestBusinessActions = new RequestBusinessActions();
            List <RequestInsertUserAction> requestCollection = requestBusinessActions.ReportByOrganization(fromDate, toDate, value1, value2, value3);

            if (requestCollection != null)
            {
                requestCollection = requestCollection.OrderBy(p => p.OrganizationTitle).ToList();
            }
            report.RegBusinessObject("RequestOrganization", "RequestOrganization", requestCollection);
            var persianDate = ReportTextHelper.GetPersianDate();

            report["TodayDate"] = persianDate;
            report.Dictionary.Synchronize();
            requestTypeStiWebViewer.Report = report;
        }
Beispiel #25
0
        /// <summary>
        /// با فشردن این کلید محل آزمون ها نمایش داده می شود
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void btnExamPlaceList_Click(object sender, EventArgs e)
        {
            this.StiWebViewer1.ResetReport();
            string tterm      = ddl_Term.SelectedValue.ToString();
            int    iddanesh   = int.Parse(ddl_Danesh.SelectedValue.ToString());
            string Examdate   = "0";
            string ExamTime   = "0";
            int    examinerID = int.Parse(Session[sessionNames.userID_Karbar].ToString());

            if (ddl_ExamDate.SelectedIndex > 0)
            {
                Examdate = ddl_ExamDate.SelectedValue;
            }

            if (ddl_ExamTime.SelectedIndex > 0)
            {
                ExamTime = ddl_ExamTime.SelectedValue;
            }

            DataTable dt = new DataTable();

            dt = ExamBusiness.Get_ListClassCityByDate(iddanesh, tterm, Examdate, ExamTime, examinerID);

            if (dt.Rows.Count > 0)
            {
                StiWebViewer1.Visible = true;
                StiReport rpt = new StiReport();
                rpt.Load(Server.MapPath("../Reports/ExamClassList1.mrt"));
                rpt.Dictionary.Databases.Clear();
                rpt.Dictionary.Databases.Add(new StiSqlDatabase("Supplementary", CB.ReportConnection.ToString()));
                rpt.Compile();
                rpt.CompiledReport.DataSources["[Exam].[Sp_GetListClassCityByDate]"].Parameters["@iddanesh"].ParameterValue   = int.Parse(ddl_Danesh.SelectedValue.ToString());
                rpt.CompiledReport.DataSources["[Exam].[Sp_GetListClassCityByDate]"].Parameters["@tterm"].ParameterValue      = tterm;
                rpt.CompiledReport.DataSources["[Exam].[Sp_GetListClassCityByDate]"].Parameters["@dateexam"].ParameterValue   = Examdate;
                rpt.CompiledReport.DataSources["[Exam].[Sp_GetListClassCityByDate]"].Parameters["@saatexam"].ParameterValue   = ExamTime;
                rpt.CompiledReport.DataSources["[Exam].[Sp_GetListClassCityByDate]"].Parameters["@examinerID"].ParameterValue = examinerID;
                rpt.RegData(dt);
                rpt.ReportCacheMode   = StiReportCacheMode.On;
                StiWebViewer1.Report  = rpt;
                StiWebViewer1.Visible = true;
                CB.InsertIntoUserLog(int.Parse(Session[sessionNames.userID_Karbar].ToString()), DateTime.Now.ToShortTimeString(), int.Parse(Session[sessionNames.appID_Karbar].ToString()), 52, "مشاهده گزارش لیست محل برگزاری");
            }
            else
            {
                StiWebViewer1.Visible = false;
                rwmValidations.RadAlert("رکوردی موجود نیست", null, 100, "پیام", "");
            }
        }
Beispiel #26
0
        public FileStreamResult ExportTransferZbk([DataSourceRequest] DataSourceRequest request)
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("../Reports/Mrts/OBK/ZBKTransferList.mrt"));
            report.Compile();
            var data = repository.ZBKTransferRegister().ToDataSourceResult(request);

            report.RegBusinessObject("ZBKList", data.Data);
            report.Render(false);
            var stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Excel, stream);
            stream.Position = 0;
            return(File(stream, "application/excel", "Список Передачи ЗБК.xls"));
        }
Beispiel #27
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         StiReport report = new StiReport();   //sakhte Shey
         report.Load("Report/rptMosafer.mrt"); //masir file MRT report
         report.Compile();
         //ersal Variable ha b Stimulsoft
         report["strNameAgency"] = NameAgency;
         report.ShowWithRibbonGUI();
     }
     catch (Exception)
     {
         MessageBox.Show("در هنگام گزارش گیری خطایی رخ داده است لطفا مجددا تلاش کنید", "Blit", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath(@"Reports\Invoice.mrt"));
            report.Compile();

            DataSet data = new DataSet();

            data.ReadXml(Server.MapPath(@"Data\Demo.xml"));

            report.RegData(data);

            StiWebViewer1.Localization = string.Format("Localization/{0}.xml", (string)Session["lang"]);
            StiWebViewer1.Report       = report;
        }
        public ActionResult ExportSummaryReportTF(DateTime?dateFrom, DateTime?dateTo)
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("../Reports/Mrts/OBK/SummaryReportTF.mrt"));
            report.Compile();
            var data = repository.OBK_SummaryReportTF(dateFrom, dateTo);

            report.RegBusinessObject("List", data);
            report.Render(false);
            var stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Excel, stream);
            stream.Position = 0;
            return(File(stream, "application/excel", "Отчет.xls"));
        }
        public FileStreamResult ExportFile([DataSourceRequest] DataSourceRequest request)
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("../Reports/Mrts/OBK/ZBKBlanks.mrt"));
            report.Compile();
            var data = repository.List().ToDataSourceResult(request);

            report.RegBusinessObject("List", data.Data);
            report.Render(false);
            var stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Excel, stream);
            stream.Position = 0;
            return(File(stream, "application/excel", "Отчет по бланкам.xls"));
        }
Beispiel #31
0
        public ActionResult SubTaskProtokol(int psId)
        {
            var report = new StiReport();
            var path   = System.Web.HttpContext.Current.Server.MapPath("~/Reports/Mrts/OBK/TaskProtocol.mrt");

            report.Load(path);
            report.Compile();
            report.RegBusinessObject("tmp", repo.GetTaskProtocolData(psId));
            report.RegBusinessObject("tmpExecutors", repo.GetTaskProtocolExecutorListData(psId));
            report.Render(false);
            Stream stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Word2007, stream);
            stream.Position = 0;
            return(File(stream, "application/msword", $"Протокол.docx"));
        }
        private void PrintButton_Click(object sender, RoutedEventArgs e)
        {
            Report = new StiReport();
            UserGrid.Visibility  = Visibility.Collapsed;
            PrintGrid.Visibility = Visibility.Visible;
            Report.Load(@"ProductsReport.mrt");
            Report.Compile();

            Report["OrganizationName"]        = PublicVariables.Organization.Name;
            Report["OrganizationAddress"]     = PublicVariables.Organization.Address;
            Report["OrganizationPhoneNumber"] = PublicVariables.Organization.PhoneNumber;

            Report["DateTime"] = DateTime.Now.ToShortTimeString();

            Report.Render();
            ProductsReportPrint.Report = Report;
        }
        private void BtnPrint_Click(object sender, EventArgs e)
        {
            StiReport Report = new StiReport();

            Report.Load("Report/rptGavahi.mrt");
            Report.Compile();
            Report["strTarikh1"] = mskTarikh1.Text;
            Report["NameBemar"]  = txtName.Text;
            Report["Bemari"]     = txtBemari.Text;
            Report["Tedad"]      = txtTedad.Text;
            Report["Makan"]      = txtMakan.Text;

            Report["NameMatab"] = lblName.Text;
            Report["Tel"]       = lblTel.Text;

            Report.ShowWithRibbonGUI();
        }
Beispiel #34
0
        void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            DataSet data = new DataSet();

            data.ReadXml("..\\..\\Data\\Demo.xml");

            report.RegData(data);
            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SampleProgress.Master-Detail-Subdetail.mrt"))
            {
                report.Load(stream);
            }

            report.Compile();
            report.CompiledReport.Rendering += new EventHandler(CompiledReport_Rendering);

            report.Render(false);
        }
Beispiel #35
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            StiReport report = new StiReport();

            report.Load("Report/rptReportALL.mrt");
            report.Compile();
            report["NameAgency"] = NameAgency;
            report["TelA"]       = TelA;
            report["AddressA"]   = AddressA;
            report["TCity"]      = lblCity.Text;
            report["THavapeyma"] = lblHavapeyma.Text;
            report["TParvaz"]    = lblParvaz.Text;
            report["TBlit"]      = lblTedadBlit.Text;
            report["TGroup"]     = lblTedadGroupha.Text;
            report["Mojodi"]     = lblMojodi.Text;
            report.ShowWithRibbonGUI();
        }
 protected void btn_AccessCards_Click(object sender, EventArgs e)
 {
     //img_ExportToExcel1.Visible = false;
     //img_ExportToExcel2.Visible = false;
     if (ddl_Term.SelectedValue == null || ddl_Term.SelectedValue == "0")
     {
         RadWindowManager1.RadAlert("لطفا ترم را انتخاب بفرمایید", 0, 100, "پیام", "");
     }
     else
     {
         if (ddl_Cooperation.SelectedIndex == null)
         {
             ddl_Cooperation.SelectedValue = "0";
         }
         if (ddl_EducationGroup.SelectedValue == null)
         {
             ddl_EducationGroup.SelectedValue = "0";
         }
         dt = FRB.GetAccessCardsProf(ddl_Term.SelectedValue, int.Parse(ddl_EducationGroup.SelectedValue), int.Parse(ddl_Cooperation.SelectedValue));
         if (dt.Rows.Count == 0)
         {
             RadWindowManager1.RadAlert("رکوردی وجود ندارد", 0, 100, "پیام", "");
         }
         else
         {
             //img_ExportToExcel1.Visible = true;
             this.StiWebViewer1.ResetReport();
             StiWebViewer1.Visible = true;
             StiReport rpt = new StiReport();
             rpt.Load(Server.MapPath("../Report/ReportAccessCardsProf.mrt"));
             rpt.ReportCacheMode = StiReportCacheMode.On;
             rpt.Dictionary.Databases.Clear();
             rpt.Dictionary.Databases.Add(new StiSqlDatabase("Connection1", CB.ReportConnection.ToString()));
             rpt.Compile();
             rpt.CompiledReport.DataSources["[Faculty].[SP_AccessCardsProf]"].Parameters["@Departman"].ParameterValue   = int.Parse(ddl_EducationGroup.SelectedValue);
             rpt.CompiledReport.DataSources["[Faculty].[SP_AccessCardsProf]"].Parameters["@Term"].ParameterValue        = ddl_Term.SelectedValue;
             rpt.CompiledReport.DataSources["[Faculty].[SP_AccessCardsProf]"].Parameters["@Cooperation"].ParameterValue = int.Parse(ddl_Cooperation.SelectedValue);
             rpt.RegData(dt);
             rpt.Dictionary.Synchronize();
             //rpt.Show();
             StiWebViewer1.Report  = rpt;
             StiWebViewer1.Visible = true;
             //rpt.Print(true);
         }
     }
 }
        public ActionResult ExportOBKLaboratoryReport([DataSourceRequest] DataSourceRequest request, Guid?unitLaboratoryId)
        {
            StiReport report = new StiReport();

            report.Load(Server.MapPath("../Reports/Mrts/OBK/OBKLaboratoryReport.mrt"));
            report.Compile();
            var data   = repository.OBK_LaboratoryFunction(unitLaboratoryId);
            var result = data.ToDataSourceResult(request);

            report.RegBusinessObject("List", result.Data);
            report.Render(false);
            var stream = new MemoryStream();

            report.ExportDocument(StiExportFormat.Excel, stream);
            stream.Position = 0;
            return(File(stream, "application/excel", "Отчет.xls"));
        }
Beispiel #38
0
        private void loadReport()
        {
            StiReport report = new StiReport();

            report.Load("Reports\\SoMri.mrt");
            StiSqlDatabase sqlDB = new StiSqlDatabase();

            sqlDB = (StiSqlDatabase)report.Dictionary.Databases["Oracle"];
            sqlDB.ConnectionString = FormHISSMS.conn_string;
            report.Compile();
            report["schemamonth"] = datauser(dateEditTuNgay.Text, dateEditDenNgay.Text);
            report["tungay"]      = dateEditTuNgay.Text;
            report["denngay"]     = dateEditDenNgay.Text;
            report.Render(false);

            stiViewerControl.Report = report;
        }
        private void BtnPrint_Click(object sender, EventArgs e)
        {
            MessageBox.Show(con.ConnectionString);
            StiReport Report = new StiReport();

            //Report.Dictionary.Databases.Clear();
            //Report.Dictionary.Databases.Add(
            //    new Stimulsoft.Report.Dictionary.StiOleDbDatabase("NameInReport", con.ConnectionString));
            Report.Load("Report/rptBemeh.mrt");
            Report.Compile();
            Report.ShowWithRibbonGUI();


            //cmd = new SqlCommand("ReportBemeh",con);
            //cmd.CommandType = CommandType.StoredProcedure;
            //con.Open();
            //SqlDataReader reader = cmd.ExecuteReader();
            //List<string> Id = new List<string>();
            //List<string> NameBemeh = new List<string>();
            //List<string> Mablagh = new List<string>();
            //List<string> Tozih = new List<string>();
            //while (reader.Read())
            //{
            //    Id.Add(reader["Id"].ToString());
            //    NameBemeh.Add(reader["NameBemeh"].ToString());
            //    Mablagh.Add(reader["Mablagh"].ToString());
            //    Tozih.Add(reader["Tozih"].ToString());
            //}

            //List<string> output = new List<string>();
            //for (int i = 0; i <= Id.Count; i++)
            //{
            //    output.Add(Id[i] + ";" + NameBemeh[i] + ";" + Mablagh[i] + ";" + Tozih[i]);
            //}

            //string data = string.Empty;
            //foreach (var item in output)
            //{
            //    data += item + "\n";
            //}

            //MessageBox.Show(data);

            //con.Close();
        }
Beispiel #40
0
        public ActionResult Print(int id)
        {
            using (var db = new KiaGalleryContext())
            {
                var entity = db.PostItem.Single(x => x.Id == id);

                var sender = db.Settings.SingleOrDefault(x => x.Key == Model.Context.Settings.KeyPostSenderAddress)?.Value;

                StiReport report = new StiReport();
                report.Load(Server.MapPath("~/Report/Post/Report.mrt"));
                report.Dictionary.Databases.Clear();
                report.ScriptLanguage = StiReportLanguageType.CSharp;
                report.Dictionary.Variables["Count"].Value        = entity.Count.ToString();
                report.Dictionary.Variables["Weight"].Value       = entity.Weight.ToString();
                report.Dictionary.Variables["Price"].Value        = Core.ToSeparator(entity.Price);
                report.Dictionary.Variables["Customer"].Value     = entity.Customer;
                report.Dictionary.Variables["Address"].Value      = entity.City.Name + " - " + entity.Address;
                report.Dictionary.Variables["PhoneNumber"].Value  = entity.PhoneNumber;
                report.Dictionary.Variables["MobileNumber"].Value = entity.MobileNumber;
                report.Dictionary.Variables["PostalCode"].Value   = entity.PostalCode;
                report.Dictionary.Variables["Sender"].Value       = sender;

                //report.Dictionary.Synchronize();
                report.Compile();
                report.Render(false);
                MemoryStream stream = new MemoryStream();

                StiPdfExportSettings settings = new StiPdfExportSettings();

                StiPdfExportService service = new StiPdfExportService();
                service.ExportPdf(report, stream, settings);

                this.Response.Buffer = true;
                this.Response.ClearContent();
                this.Response.ClearHeaders();
                this.Response.ContentType = "application/pdf";
                this.Response.AddHeader("Content-Disposition", "attachment; filename=\"Kia-Post-" + entity.Id + ".pdf\"");
                this.Response.ContentEncoding = Encoding.UTF8;
                this.Response.AddHeader("Content-Length", stream.Length.ToString());
                this.Response.BinaryWrite(stream.ToArray());
                this.Response.End();

                return(new FileStreamResult(stream, "application/pdf"));
            }
        }
        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();
        }
Beispiel #42
0
        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();
        }
        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();
        }
Beispiel #44
0
        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);
            }
        }
Beispiel #45
0
        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;
            }
        }
Beispiel #46
0
        /// <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);
            }
        }
Beispiel #47
0
        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);
            }
        }
        private void BtnPrint_Click(object sender, RoutedEventArgs e)
        {
            StiReport report = new StiReport();

            IQueryable <AccountingTafsillevelsDetail> t = ak.AccountingTafsillevelsDetails;

            var iqTafsil = t;

            if (txt_search.Text.Trim().Length > 0)
            {
                iqTafsil = iqTafsil.Where(r => r.ATLName.Contains(txt_search.Text));
            }

            report.Load(@"D:\New folder (2)\accountingKernel\AccountingKernel\Debug_AccountingKernel\Report\modiriate_hesabe_tafsili.mrt");

            report.RegData("testt", iqTafsil);
            report.Compile();
            report.Show();
        }
Beispiel #49
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                UserValidate();

                ReportObject(ANP.Data.BaseData.Library.Encryption.Decrypt(Request.QueryString["pra"].ToString()));
                string ConnectionString             = _host.ConnectionString;
                Stimulsoft.Report.StiReport _report = new StiReport();
                _report.Load(Resources.mrtFinancialParcelOfFirstState);
                _report.Dictionary.Databases.Clear();
                _report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("PofficeCOD186", ConnectionString));
                _report.Compile();

                _report["FirstState"]       = (ddlState == string.Empty ? 0 : Convert.ToInt32(ddlState));
                _report["FirstCity"]        = (ddlCity == string.Empty ? 0 : Convert.ToInt32(ddlCity));
                _report["FirstPostNode"]    = (ddlPostNode == string.Empty ? 0 : Convert.ToInt32(ddlPostNode));
                _report["LastState"]        = (ddlLastState == string.Empty ? 0 : Convert.ToInt32(ddlLastState));
                _report["LastCity"]         = (ddlLastCity == string.Empty ? 0 : Convert.ToInt32(ddlLastCity));
                _report["LastPostNode"]     = (ddlLastPostNode == string.Empty ? 0 : Convert.ToInt32(ddlLastPostNode));
                _report["FirstDate"]        = Fdate;
                _report["LastDate"]         = Ldate;
                _report["PayType"]          = (ddlCredit == string.Empty ? 0 : Convert.ToInt32(ddlCredit));
                _report["BarcodeStatus"]    = (ddlBarcodeStatus == string.Empty ? 0 : Convert.ToInt32(ddlBarcodeStatus));
                _report["BarcodeSubStatus"] = (ddlBarcodeSubStatus == string.Empty ? 0 : Convert.ToInt32(ddlBarcodeSubStatus));
                _report["UserName"]         = _LoginDetails.Pname + " " + _LoginDetails.RolePname + " از " + _LoginDetails.StateName;
                _report["ReportDate"]       = DateAndTime.GetSQLDate10DigitShamsi() + " -- " + DateAndTime.GetSQLTime8Digit();

                StiWebViewer1.Report = _report;
            }
            catch (Exception ex)
            {
                string Query = string.Format(@"EXECUTE sp_FilltblErrorProgrammer
                                       @Message=N'{0}'
                                      ,@DateError='{1}'
                                      ,@PhysicalPath=N'{2}'
                                      ,@UserHostAddress='{3}'
                                      ,@Browser='{4}'"
                                             , "Error For Load Report :  rptFinancialParcelOfFirstState ; Detail :  " + ex.Message.Replace("'", "''")
                                             , DateAndTime.GetDateTime16Digit_Latin(), "", "", "");
                _host.SqlExecute(Query);
            }
        }
Beispiel #50
0
        public static void PrintTest()
        {
            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);
            }
        }
 public static void CalcHouseCounterServicesReportForPublicSpaceShowDialog(System.Windows.Forms.IWin32Window owner, long calcId, System.DateTime period, string number, string serviceName, long serviceId)
 {
     System.Data.DataSet set = Mappers.SimpleReportMapper.GetCalcHouseCounterServicesReportForPublicSpace(calcId, period, serviceId);
     set.Tables.get_Item(0).set_TableName("dataCalcHouseCounterServices");
     set.Tables.get_Item(1).set_TableName("dataCalcHouseCounterAccountServiceCounters");
     set.Tables.get_Item(2).set_TableName("dataCalcHouseCounterAccountServiceNormativs");
     set.Tables.get_Item(3).set_TableName("dataCalcHouseCounterAccountServiceNonResidentials");
     set.Tables.get_Item(4).set_TableName("dataCalcHouseCounterSubCounters");
     StiReport report = new StiReport();
     report.Load(Resources.CalcHouseCounterServicesReport);
     report.Compile();
     report.RegData((System.Data.DataSet) set);
     if (serviceName != null)
     {
         report.Dictionary.Variables.Add("ServiceName", serviceName);
         report["ServiceName"] = serviceName;
     }
     report.Show((System.Windows.Forms.IWin32Window) owner);
 }
 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;
 }
Beispiel #53
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {
                StiReport report = new StiReport();
                report.Load("Report/rptBlit.mrt");
                report.Compile();
                report["Code"]          = Convert.ToInt32(txtCode.Text);
                report["strNameAgency"] = NameAgency;
                report["strAddressA"]   = AddressA;
                report["strTelA"]       = TelA;

                report.ShowWithRibbonGUI();
            }
            catch (Exception)
            {
                MessageBox.Show("در هنگام گزارش گیری خطایی رخ داده است لطفا مجددا تلاش کنید", "Blit", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #54
0
 private void گزارشکلینامههاToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (designReports.CheckState == CheckState.Checked)
     {
         StiReport report = new StiReport();
         report.Load("Report/ReportAll.mrt");
         ((StiSqlDatabase)report.Dictionary.Databases["MS SQL"]).ConnectionString = ApplicationSetting.ConnectionString();
         report.Compile();
         report.Design();
     }
     else
     {
         StiReport report = new StiReport();
         report.Load("Report/ReportAll.mrt");
         ((StiSqlDatabase)report.Dictionary.Databases["MS SQL"]).ConnectionString = ApplicationSetting.ConnectionString();
         report.Compile();
         report.ShowWithRibbonGUI();
     }
 }
 public static void CalcHouseCounterServicesReportFor354(System.Windows.Forms.IWin32Window owner, long calcId, System.DateTime period, long serviceId)
 {
     ObjectList<RepReportTemplate> list = RepReportTemplate.FindByName("09.01.01 Детализация по коллективным приборам учета");
     if (list.get_Count() > 0)
     {
         RepReportTemplate template = list.get_Item(0);
         System.Data.SqlClient.SqlParameter[] parameters = new System.Data.SqlClient.SqlParameter[3];
         parameters[0] = new System.Data.SqlClient.SqlParameter("@calcId", System.Data.SqlDbType.BigInt);
         parameters[0].set_Value((long) calcId);
         parameters[1] = new System.Data.SqlClient.SqlParameter("@period", System.Data.SqlDbType.DateTime);
         parameters[1].set_Value(period);
         parameters[2] = new System.Data.SqlClient.SqlParameter("@serviceId", System.Data.SqlDbType.BigInt);
         if (serviceId > 0L)
         {
             parameters[2].set_Value((long) serviceId);
         }
         else
         {
             parameters[2].set_Value(System.DBNull.Value);
         }
         System.Data.DataSet set = DALSql.ExecuteDataSet("exec " + template.Sql + " @calcId, @period, @serviceId", parameters);
         StiReport report = new StiReport();
         report.LoadFromString(template.Template);
         report.Compile();
         report.RegData((System.Data.DataSet) set);
         if (User.IsMemberOf(RightsEnum.ОтчетыРедактированиеШаблона))
         {
             report.Design(true, (System.Windows.Forms.IWin32Window) owner);
             if (System.Windows.Forms.DialogResult.Yes == Messages.QuestionYesNo(owner, "Сохранить изменения в шаблоне?"))
             {
                 template.Template = report.SaveToString();
                 template.SaveChanges();
             }
         }
         else
         {
             report.Show((System.Windows.Forms.IWin32Window) owner);
         }
     }
 }
Beispiel #56
0
        internal static void ShowReport(StiReport report, bool wpf, bool design, DataSet dtSet,
            string vrReportAutor, string vrReportDescricao, string vrEmpresa, string vrCnc,
            string vrTitulo, string vrUsuario, string vrFiltros, string vrImage)
        {
            report.ReportAuthor = vrReportAutor;
            report.ReportDescription = vrReportDescricao;
            if (vrImage == null || vrImage == "")
                report.Dictionary.Variables["vrEmpresa"].ValueObject = vrEmpresa;
            else
            {
                if (System.IO.File.Exists(vrImage))
                {
                    report.Dictionary.Variables["vrEmpresa"].ValueObject = sEspacos + vrEmpresa;
                    StiImage stiImage = report.GetComponents()["imgLogo"] as StiImage;
                    Image myImage = Image.FromFile(vrImage);
                    stiImage.Image = myImage;
                }
            }
            report.Dictionary.Variables["vrCnc"].ValueObject = vrCnc;
            report.Dictionary.Variables["vrTitulo"].ValueObject = vrTitulo;
            report.Dictionary.Variables["vrUsuario"].ValueObject = vrUsuario;
            report.Dictionary.Variables["vrFiltros"].ValueObject = vrFiltros;

            report.RegData(dtSet);
            report.Compile();
            if (design)
            {                
                if (wpf)
                    report.DesignWithWpf();
                else
                    report.Design();
            }
            else
            {
                if (wpf)
                    report.ShowWithWpf();
                else
                    report.Show();
            }
        }
Beispiel #57
0
 private void FaktLivingKomunalReport(AccountReportType accountReportType)
 {
     Account currentAccount = this.CurrentAccount;
     if (currentAccount.Id != Account.Null.Id)
     {
         System.Data.DataSet set = Mappers.RepReportMapper.FaktLivingKomunal(currentAccount.Id);
         if (((set != null) && (set.Tables.get_Count() != 0)) && (set.Tables.get_Item(0).Rows.get_Count() != 0))
         {
             StiReport report = new StiReport();
             report.Load(Resources.Rep_FaktLivingKomunal);
             report.Compile();
             report.RegData((System.Data.DataSet) set);
             report.Render(true);
             report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
         }
     }
 }
Beispiel #58
0
 private void AccountServicesJournalCurrentReportSR(AccountReportType accountReportType)
 {
     Account currentAccount = this.CurrentAccount;
     if (currentAccount.Id != Account.Null.Id)
     {
         System.DateTime period = System.DateTime.Now.Date.AddDays((double) (1 - System.DateTime.Now.get_Day()));
         System.Data.DataSet set = Mappers.SimpleReportMapper.GetAccountCurrentJournalReportByPeriod(currentAccount.Id, period, true, true, false);
         if (((set != null) && (set.Tables.get_Count() == 4)) && (set.Tables.get_Item(0).Rows.get_Count() != 0))
         {
             set.Tables.get_Item(0).set_TableName("dataHeader");
             set.Tables.get_Item(1).set_TableName("dataResidents");
             set.Tables.get_Item(2).set_TableName("dataBenefits");
             set.Tables.get_Item(3).set_TableName("dataAccountServices");
             StiReport report = new StiReport();
             report.Load(Resources.Rep_AccountServicesJournalCurrentSR);
             report.Compile();
             report.RegData((System.Data.DataSet) set);
             report.Render(true);
             report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
         }
     }
 }
Beispiel #59
0
 private void AccountServicesNotificationReport(AccountReportType accountReportType)
 {
     Account currentAccount = this.CurrentAccount;
     if (currentAccount.Id != Account.Null.Id)
     {
         System.DateTime date = System.DateTime.Now.Date;
         System.Data.DataSet set = Mappers.SimpleReportMapper.GetAccountServicesNotification(currentAccount.Id, date, 0L, 0L);
         if (((set != null) && (set.Tables.get_Count() == 2)) && (set.Tables.get_Item(0).Rows.get_Count() != 0))
         {
             set.Tables.get_Item(0).set_TableName("dataHeader");
             set.Tables.get_Item(1).set_TableName("dataServices");
             StiReport report = new StiReport();
             if (accountReportType.Template.get_Length() > 0)
             {
                 report.LoadFromString(accountReportType.Template);
             }
             report.Compile();
             report.RegData((System.Data.DataSet) set);
             report.Render(true);
             if (accountReportType.Name == "Уведомление для Грозного, без долга")
             {
                 StimulsoftUtilsOptions options = new StimulsoftUtilsOptions(false);
                 report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
                 options.RestoreValues();
             }
             else
             {
                 report.Show((System.Windows.Forms.IWin32Window) this.ContentControl);
             }
         }
     }
 }
Beispiel #60
0
 private void btnCreateMeetingResultReport_Click(object sender, System.EventArgs e)
 {
     System.Data.DataSet ujfMeetingResultReport = Mappers.SimpleReportMapper.GetUjfMeetingResultReport(this.meetingId);
     ujfMeetingResultReport.Tables.get_Item(0).set_TableName("dataMeetingAndHouseInfo");
     ujfMeetingResultReport.Tables.get_Item(1).set_TableName("dataMeetingQuestionList");
     ujfMeetingResultReport.Tables.get_Item(2).set_TableName("dataMeetingResult");
     StiReport report = new StiReport();
     report.Load(Resources.UjfMeetingResultProtocol);
     report.Compile();
     report.RegData((System.Data.DataSet) ujfMeetingResultReport);
     report.Show();
 }