当前位置: 首页>>代码示例>>C#>>正文


C# StiReport.Design方法代码示例

本文整理汇总了C#中StiReport.Design方法的典型用法代码示例。如果您正苦于以下问题:C# StiReport.Design方法的具体用法?C# StiReport.Design怎么用?C# StiReport.Design使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StiReport的用法示例。


在下文中一共展示了StiReport.Design方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowReport

        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();
            }
        }
开发者ID:AndersonGoncalves,项目名称:Build.Siac,代码行数:40,代码来源:Report.cs

示例2: CalcHouseCounterServicesReportFor354

 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);
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:40,代码来源:CalcServicesByDaysReport.cs

示例3: tsbDesigner_Click

 private void tsbDesigner_Click(object sender, System.EventArgs e)
 {
     RepReport report = this.InsertReportIntoGeneratorQueue();
     if ((report != null) && (report != RepReport.Null))
     {
         if ((report.Status != 0) || (report.ReportTemplateId == 0L))
         {
             throw new System.ApplicationException("Отчет непригоден для выполнения (id=" + ((long) report.Id) + ")");
         }
         RepReportTemplate withTemplate = RepReportTemplate.GetWithTemplate(report.ReportTemplateId);
         if ((withTemplate == null) || (withTemplate.Sql == string.Empty))
         {
             throw new System.ApplicationException("Отчет непригоден для выполнения (id=" + ((long) report.Id) + ")");
         }
         try
         {
             report.Status = 1;
             report.SaveChanges();
             System.Data.DataSet set = Mappers.RepReportMapper.GenerateReportDataSet(withTemplate.Sql, report.Id);
             StiReport report2 = new StiReport();
             report2.LoadFromString(withTemplate.Template);
             report2.RegData((System.Data.DataSet) set);
             StiOptions.Designer.DontAskSaveReport = true;
             report2.Design(true, (System.Windows.Forms.IWin32Window) this);
             if (System.Windows.Forms.DialogResult.Yes == AIS.SN.UI.Messages.QuestionYesNo(this, "Сохранить изменения в шаблоне?"))
             {
                 withTemplate.Template = report2.SaveToString();
                 withTemplate.SaveChanges();
             }
         }
         catch (System.Exception exception)
         {
             AIS.SN.UI.Messages.ShowException(this, exception);
         }
         this.UpdateBingingReports();
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:37,代码来源:ReportsMainForm.cs

示例4: btPrint_Click

 private void btPrint_Click(object sender, System.EventArgs e)
 {
     NoticeNoticeTemplate template = (this.bsNoticeTemplates.get_Current() as NoticeNoticeTemplate) ?? NoticeNoticeTemplate.Null;
     if (this.bsNotices.get_Count() == 0)
     {
         Messages.ShowMessage("Для печати ничего не найдено");
     }
     else if (template == NoticeNoticeTemplate.Null)
     {
         Messages.ShowMessage("Не выбран шаблон");
     }
     else
     {
         template = ObjectWithId.FindById<NoticeNoticeTemplate>(template.Id);
         System.Data.DataTable table = NoticeNotice.GetHeader((ObjectList<NoticeNotice>) this.bsNotices.get_DataSource(), this.cbHideClosedAccounts.get_Checked(), this.cbNoticeInformation.get_Checked());
         table.set_TableName("header");
         System.Data.DataSet set = NoticeNotice.GetReport((ObjectList<NoticeNotice>) this.bsNotices.get_DataSource(), template.Sql);
         if ((set.Tables.get_Count() >= 2) && (set.Tables.get_Item(0).Rows.get_Count() != 0))
         {
             set.Tables.get_Item(0).set_TableName("pays");
             set.Tables.get_Item(1).set_TableName("counter");
             for (int i = 2; i < set.Tables.get_Count(); i = (int) (i + 1))
             {
                 int num2 = (int) (i - 1);
                 set.Tables.get_Item(i).set_TableName("data" + ((int) num2).ToString());
             }
             if (template.IdentityName == "Счет на оплату Ульяновск вариант 3")
             {
                 if (set.Tables.get_Count() > 2)
                 {
                     set.Tables.get_Item(2).set_TableName("organizations");
                 }
                 if (set.Tables.get_Count() > 3)
                 {
                     set.Tables.get_Item(3).set_TableName("rates");
                 }
             }
             StiReport report = new StiReport();
             report.LoadFromString(template.Template);
             report.ReportCacheMode = StiReportCacheMode.Off;
             report.Compile();
             foreach (System.Data.DataTable table2 in set.Tables)
             {
                 report.RegData(table2.get_TableName(), (System.Data.DataTable) table2);
             }
             report.RegData("header", (System.Data.DataTable) table);
             report.ReportCacheMode = StiReportCacheMode.Off;
             report.Compile();
             if (this.chbxIsDesignTemplate.get_Checked())
             {
                 StiOptions.Designer.DontAskSaveReport = true;
                 report.Design(true);
                 if ((report.SaveToString() != template.Template) && (System.Windows.Forms.DialogResult.Yes == Messages.QuestionYesNo(this, "Сохранить изменения в шаблоне?")))
                 {
                     template.Template = report.SaveToString();
                     template.SaveChanges();
                 }
             }
             else
             {
                 report.Render(true);
                 report.Show(true);
             }
         }
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:66,代码来源:PaymentNoticesMainFormOld.cs

示例5: tsbDesigner_Click

 private void tsbDesigner_Click(object sender, System.EventArgs e)
 {
     System.Data.DataSet set = this.m_debtDocument.GenerateReportDebtSetNotices(this.m_DebtListNotices.procedureName, this.dbPayNotices.Value, this.cbAddDebtActionNotices.get_Checked(), (int) this.MinCountDebt.Value, (int) this.ColDayPerformance.Value, this.m_DebtListNotices.Id, this.m_SelectedAccounts);
     set.Tables.get_Item(0).set_TableName("data");
     StiReport report = new StiReport();
     DebtListNotices notices = ObjectWithId.FindById<DebtListNotices>(this.m_DebtListNotices.Id);
     report.LoadFromString(notices.template);
     report.RegData((System.Data.DataSet) set);
     StiOptions.Designer.DontAskSaveReport = true;
     report.Design(true, (System.Windows.Forms.IWin32Window) this);
     if (System.Windows.Forms.DialogResult.Yes == Messages.QuestionYesNo(this, "Сохранить изменения в шаблоне?"))
     {
         notices.template = report.SaveToString();
         notices.SaveChanges();
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:16,代码来源:DebtListNoticesForm.cs

示例6: StiReport

        private void книгаУчетаДоходовИРасходовToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StiConfig.LoadLocalization("ru.xml");
            var report = new StiReport();
            StiOptions.Dictionary.BusinessObjects.MaxLevel = 0;
            report.Load(Path.Combine(Application.StartupPath, "Reports\\kniga.mrt"));

            var opers = new AllOperationRepository().GetAllOperation(BeginDate, EndDate).ToList();
            report.RegData("Operations", opers);

            var allopers = new AllOperationRepository().GetAllOperation(new DateTime(Year, 1, 1, 0, 0, 0), EndDate).ToList();

            int count = new AllOperationRepository().GetAllOperation(new DateTime(Year, 1, 1, 0, 0, 0), BeginDate.AddSeconds(-1)).Count();

            report.Dictionary.Variables.Add("BeginDate", BeginDate);
            report.Dictionary.Variables.Add("EndDate", EndDate);

            report.Dictionary.Variables.Add("StrPeriod", _strperiod);
            report.Dictionary.Variables.Add("StrDate", _strdate);
            report.Dictionary.Variables.Add("CountPosition", count);

            report.Dictionary.Variables.Add("SummaTotalPrihod", allopers.Sum(c=>c.SummaDebet));
            report.Dictionary.Variables.Add("SummoTotalRashod", allopers.Sum(c=>c.SummaKredit));

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                report.Show(true);
            }
            else
            {
                report.Design();
            }
        }
开发者ID:lexxkrt,项目名称:usno,代码行数:33,代码来源:frmMain.cs

示例7: tsbDesigner_Click

 private void tsbDesigner_Click(object sender, System.EventArgs e)
 {
     StiReport report = new StiReport();
     AccountReportType byName = AccountReportType.GetByName("Личный кабинет. Регистрация");
     report.LoadFromString(byName.Template);
     StiOptions.Designer.DontAskSaveReport = true;
     report.Design(true, (System.Windows.Forms.IWin32Window) this);
     if (System.Windows.Forms.DialogResult.Yes == Messages.QuestionYesNo(this, "Сохранить изменения в шаблоне?"))
     {
         byName.Template = report.SaveToString();
         byName.SaveChanges();
     }
 }
开发者ID:u4097,项目名称:SQLScript,代码行数:13,代码来源:AccountReportTypesForm.cs


注:本文中的StiReport.Design方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。