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


C# Report.FindObject方法代码示例

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


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

示例1: PrepareReport

 public Report PrepareReport(Resume resume)
 {
     Report report = new Report();
     report.Load(Environment.CurrentDirectory + @"\Templates\About.frx");
     PictureObject picture = report.FindObject("Picture1") as PictureObject;
     picture.ImageLocation = Environment.CurrentDirectory + @"\Templates\logo.png";
     report.Prepare();
     return report;
 }
开发者ID:vincentlauvlwj,项目名称:FrameDAL,代码行数:9,代码来源:AboutReportGenerator.cs

示例2: DanfeFrNfce

        /// <summary>
        /// Construtor da classe reponsável pela impressão do DANFE da NFCe em Fast Reports
        /// </summary>
        /// <param name="proc">Objeto do tipo nfeProc</param>
        /// <param name="configuracaoDanfeNfce">Objeto do tipo ConfiguracaoDanfeNfce contendo as definições de impressão</param>
        public DanfeFrNfce(nfeProc proc, ConfiguracaoDanfeNfce configuracaoDanfeNfce)
        {
            #region Define as varíaveis que serão usadas no relatório (dúvidas a respeito do fast reports consulte a documentação em https://www.fast-report.com/pt/product/fast-report-net/documentation/)

            _relatorio = new Report();
            _relatorio.RegisterData(new[] { proc }, "NFCe", 20);
            _relatorio.GetDataSource("NFCe").Enabled = true;
            _relatorio.Load(new MemoryStream(Properties.Resources.NFCe));
            _relatorio.SetParameterValue("NfceDetalheVendaNormal", configuracaoDanfeNfce.DetalheVendaNormal);
            _relatorio.SetParameterValue("NfceDetalheVendaContigencia", configuracaoDanfeNfce.DetalheVendaContigencia);
            ((PictureObject) _relatorio.FindObject("poEmitLogo")).Image = configuracaoDanfeNfce.ObterLogo();
            ((TextObject)_relatorio.FindObject("txtUrl")).Text = EnderecadorDanfeNfce.ObterUrl(proc.NFe.infNFe.ide.tpAmb, proc.NFe.infNFe.ide.cUF, TipoUrlDanfeNfce.UrlConsulta);
            ((BarcodeObject)_relatorio.FindObject("bcoQrCode")).Text = EnderecadorDanfeNfce.ObterUrlQrCode(proc, configuracaoDanfeNfce);

            //Segundo o Manual de Padrões Padrões Técnicos do DANFE - NFC - e e QR Code, versão 3.2, página 9, nos casos de emissão em contigência deve ser impresso uma segunda cópia como via do estabelecimento
            _relatorio.PrintSettings.Copies = proc.NFe.infNFe.ide.tpEmis == TipoEmissao.teNormal ? 1 : 2;

            #endregion
        }
开发者ID:elyfran,项目名称:Zeus.Net.NFe.NFCe,代码行数:24,代码来源:DanfeFrNfce.cs

示例3: DanfeFrNfe

        /// <summary>
        /// Construtor da classe reponsável pela impressão do DANFE da NFe em Fast Reports
        /// </summary>
        /// <param name="proc">Objeto do tipo nfeProc</param>
        /// <param name="configuracaoDanfeNfe">Objeto do tipo configuracaoDanfeNfe contendo as definições de impressão</param>
        public DanfeFrNfe(nfeProc proc, ConfiguracaoDanfeNfe configuracaoDanfeNfe)
        {
            #region Define as varíaveis que serão usadas no relatório (dúvidas a respeito do fast reports consulte a documentação em https://www.fast-report.com/pt/product/fast-report-net/documentation/)

            Relatorio = new Report();
            Relatorio.RegisterData(new[] { proc }, "NFe", 20);
            Relatorio.GetDataSource("NFe").Enabled = true;
            Relatorio.Load(new MemoryStream(Properties.Resources.NFe));
            ((PictureObject)Relatorio.FindObject("poEmitLogo")).Image = configuracaoDanfeNfe.ObterLogo();

            #endregion
        }
开发者ID:luispelin,项目名称:Zeus.Net.NFe.NFCe,代码行数:17,代码来源:DanfeFrNfe.cs

示例4: PrepareReport

        public Report PrepareReport(Entity.Resume resume)
        {
            Report report = new Report();

            DataTable personInfo = getResumeInfo(resume);
            DataTable expect = getExpert(resume);
            DataTable eduback = getEduBack(resume);

            report.Load(Environment.CurrentDirectory + @"\Templates\大众通用.frx");
            TextObject txtTitle = report.FindObject("txtTitle") as TextObject;
            txtTitle.Text = resume.ResumeName + "的个人资料";
            PictureObject pictureHead = report.FindObject("pictureHead") as PictureObject;
            pictureHead.ImageLocation = Environment.CurrentDirectory + @"\Templates\logo.png";

            TextObject gender = report.FindObject("gender") as TextObject;
            gender.Text = (personInfo.Rows[0]["person_gender"].ToString() == "0") ? "男" : "女";

            TextObject birth =report.FindObject("birthday")as TextObject;
            IFormatProvider provider = new CultureInfo("zh-CN",true);
            birth.Text = DateTime.Parse(personInfo.Rows[0]["person_birthday"].ToString(),provider).ToShortDateString().ToString();

            report.RegisterData(personInfo, "person_info");
            report.RegisterData(expect, "expect");
            report.RegisterData(eduback, "education_background");
            DataBand db = report.FindObject("Data1") as DataBand;
            db.DataSource = report.GetDataSource("education_background");

            TextObject expectarea = report.FindObject("expectarea") as TextObject;
            expectarea.Text = getAreaByAreaCode(expect.Rows[0]["expect_area1"].ToString()).Rows[0]["area_name"].ToString();

            TextObject living = report.FindObject("living") as TextObject;
            living.Text = getAreaByAreaCode(personInfo.Rows[0]["person_living_area"].ToString()).Rows[0]["area_name"].ToString();

            TextObject belong = report.FindObject("belong")as TextObject;
            belong.Text = getAreaByAreaCode(personInfo.Rows[0]["person_born_area"].ToString()).Rows[0]["area_name"].ToString();

            report.Prepare();
            return report;
        }
开发者ID:vincentlauvlwj,项目名称:FrameDAL,代码行数:39,代码来源:CommonTemplate.cs

示例5: DanfeFrNfce

        /// <summary>
        /// Construtor da classe reponsável pela impressão do DANFE da NFCe em Fast Reports
        /// </summary>
        /// <param name="proc">Objeto do tipo nfeProc</param>
        /// <param name="configuracaoDanfeNfce">Objeto do tipo ConfiguracaoDanfeNfce contendo as definições de impressão</param>
        /// <param name="cIdToken">Identificador do CSC – Código de Segurança do Contribuinte no Banco de Dados da SEFAZ</param>
        /// <param name="csc">Código de Segurança do Contribuinte(antigo Token)</param>
        public DanfeFrNfce(nfeProc proc, ConfiguracaoDanfeNfce configuracaoDanfeNfce, string cIdToken, string csc)
        {
            #region Define as varíaveis que serão usadas no relatório (dúvidas a respeito do fast reports consulte a documentação em https://www.fast-report.com/pt/product/fast-report-net/documentation/)

            Relatorio = new Report();
            Relatorio.RegisterData(new[] { proc }, "NFCe", 20);
            Relatorio.GetDataSource("NFCe").Enabled = true;
            Relatorio.Load(new MemoryStream(Properties.Resources.NFCe));
            Relatorio.SetParameterValue("NfceDetalheVendaNormal", configuracaoDanfeNfce.DetalheVendaNormal);
            Relatorio.SetParameterValue("NfceDetalheVendaContigencia", configuracaoDanfeNfce.DetalheVendaContigencia);
            Relatorio.SetParameterValue("NfceImprimeDescontoItem", configuracaoDanfeNfce.ImprimeDescontoItem);
            Relatorio.SetParameterValue("NfceModoImpressao", configuracaoDanfeNfce.ModoImpressao);
            ((ReportPage) Relatorio.FindObject("PgNfce")).LeftMargin = configuracaoDanfeNfce.MargemEsquerda;
            ((ReportPage)Relatorio.FindObject("PgNfce")).RightMargin = configuracaoDanfeNfce.MargemDireita;
            ((PictureObject) Relatorio.FindObject("poEmitLogo")).Image = configuracaoDanfeNfce.ObterLogo();
            ((TextObject)Relatorio.FindObject("txtUrl")).Text = proc.NFe.infNFeSupl.ObterUrl(proc.NFe.infNFe.ide.tpAmb, proc.NFe.infNFe.ide.cUF, TipoUrlConsultaPublica.UrlConsulta);
            ((BarcodeObject)Relatorio.FindObject("bcoQrCode")).Text = proc.NFe.infNFeSupl  == null ? proc.NFe.infNFeSupl.ObterUrlQrCode(proc.NFe, cIdToken, csc) : proc.NFe.infNFeSupl.qrCode;

            //Segundo o Manual de Padrões Padrões Técnicos do DANFE - NFC - e e QR Code, versão 3.2, página 9, nos casos de emissão em contigência deve ser impresso uma segunda cópia como via do estabelecimento
            Relatorio.PrintSettings.Copies = (proc.NFe.infNFe.ide.tpEmis == TipoEmissao.teNormal | (proc.protNFe != null && proc.protNFe.infProt != null && NfeSituacao.Autorizada(proc.protNFe.infProt.cStat))
                /*Se a NFe for autorizada, mesmo que seja em contingência, imprime somente uma via*/ ) ? 1 : 2;

            #endregion
        }
开发者ID:luispelin,项目名称:Zeus.Net.NFe.NFCe,代码行数:31,代码来源:DanfeFrNfce.cs

示例6: Print

 public static void Print(DataTable data, string fileName,MemoryStream ms=null)
 {
     //不显示打印进度条
     setting.ReportSettings.ShowProgress = false;
     Report report = new Report();
     report.Load(fileName);
     report.PrintSettings.ShowDialog = false;
     report.RegisterData(data, fileName);
     if (ms != null)
     {
         object obj = report.FindObject("Picture1");
         {
             if(obj!=null)
                 ((PictureObject)obj).Image = System.Drawing.Image.FromStream(ms);
         }
     }
     //这样就可以打印数据了
     report.Print();
     report.Dispose();
 }
开发者ID:yangdaichun,项目名称:ZHXY.ZSXT,代码行数:20,代码来源:PrintHelper.cs

示例7: showReportLKK

        public void showReportLKK(string id, DataTable results)
        {
            Report reportLKK = new Report();
            if (Program.status == 0)
            {
                reportLKK.Load("report.frx");
            }
            else
            {
                reportLKK.Load("register.frx");
            }
            reportLKK.RegisterData(results, "resultData");
            if (id != "")
            {
                DataBand dataBand = reportLKK.FindObject("reportData") as DataBand;
                dataBand.Filter = "[resultData.id]==" + id;

            }
            reportLKK.Show();
        }
开发者ID:unix-admin,项目名称:lkk,代码行数:20,代码来源:ReportLKK.cs

示例8: Report


//.........这里部分代码省略.........
                              as_ = a.As,
                              sb = a.Sb,
                              s = a.S,
                              ca = a.Ca,
                              fe = a.Fe,
                              ag = a.Ag,
                              c = a.C,
                              end_date = a.END_DATE.ToShortDateString(),
                              blank = a.REESTR_VEDOMOSTEI.BLANK_ID ?? "не определено",
                              journal = a.JOURNAL1.JOURNAL_NAME ?? "не определено",
                              geologist = a.GEOLOGIST1.GEOLOGIST_NAME ?? "не определено",
                              pit = a.PIT,
                              lastUserID = "не определено",
                              lastDT = a.LastDT
                          };

                var avgVes1 = (from a in _assaysModel.Get()
                               join c in _collarModel.Get()
                               on a.BHID equals c.ID
                               where c.GORIZONT.BENCH_NAME.ToString() == bench
                                    && a.VES_SAMPLE != null
                               select (double)a.VES_SAMPLE);
                if (avgVes1.Count() != 0)
                {
                    avgVes = avgVes1.Sum() / avgVes1.Count();
                }

                var avgAu1 = (from a in _assaysModel.Get()
                              join c in _collarModel.Get()
                              on a.BHID equals c.ID
                              where c.GORIZONT.BENCH_NAME.ToString() == bench
                              && a.VES_SAMPLE != null && a.Au != null
                              group a by a into g
                              select g);
                if (avgAu1.Sum(x => x.Key.VES_SAMPLE) != 0)
                {
                    avgAu = (double)(avgAu1.Sum(x => x.Key.Au * x.Key.VES_SAMPLE) / avgAu1.Sum(x => x.Key.VES_SAMPLE));
                }

                var avgAu_cut1 = (from a in _assaysModel.Get()
                                  join c in _collarModel.Get()
                                  on a.BHID equals c.ID
                                  where c.GORIZONT.BENCH_NAME.ToString() == bench
                                  && a.VES_SAMPLE != null && a.Au != null
                                  group a by a into g
                                  select g);
                if (avgAu1.Sum(x => x.Key.VES_SAMPLE) != 0)
                {
                    avgAu_cut = (double)(avgAu1.Sum(x => x.Key.Au_cut * x.Key.VES_SAMPLE) / avgAu1.Sum(x => x.Key.VES_SAMPLE));
                }
            }

            var report = new Report();

            Assembly assem = Assembly.GetExecutingAssembly();
            Stream stream = assem.GetManifestResourceStream("GeoDB.Resources.rptDrillHoles.frx");
            report.Load(stream);
            report.RegisterData(samples, "SAMPLES");
            report.GetDataSource("SAMPLES").Enabled = true;

            FastReport.DataBand band = ((FastReport.DataBand)report.FindObject("Data1"));
            band.DataSource = report.GetDataSource("SAMPLES");

            FastReport.TextObject field;

            field = ((FastReport.TextObject)report.FindObject("Cell_avgVes"));
            if (field != null) field.Text = Math.Round(avgVes,3).ToString();
            field = ((FastReport.TextObject)report.FindObject("Cell_avgAu"));
            if (field != null) field.Text = Math.Round(avgAu,3).ToString();
            field = ((FastReport.TextObject)report.FindObject("Cell_avgAuC"));
            if (field != null) field.Text = Math.Round(avgAu_cut, 3).ToString();

            field = ((FastReport.TextObject)report.FindObject("tTittle"));
            if (field != null) field.Text = tTittleText;

            field = ((FastReport.TextObject)report.FindObject("Bhid"));
            if (field != null) field.Text = "[SAMPLES.bhid]";
            field = ((FastReport.TextObject)report.FindObject("Sample"));
            if (field != null) field.Text = "[SAMPLES.sample]";
            field = ((FastReport.TextObject)report.FindObject("sampleLength"));
            if (field != null) field.Text = "[SAMPLES.length]";
            field = ((FastReport.TextObject)report.FindObject("Zblock"));
            if (field != null) field.Text = "[SAMPLES.zblock]";
            field = ((FastReport.TextObject)report.FindObject("Rang"));
            if (field != null) field.Text = "[SAMPLES.rang]";
            field = ((FastReport.TextObject)report.FindObject("Ves"));
            if (field != null) field.Text = "[SAMPLES.ves]";
            field = ((FastReport.TextObject)report.FindObject("Au"));
            if (field != null) field.Text = "[SAMPLES.au]";
            field = ((FastReport.TextObject)report.FindObject("Au_cut"));
            if (field != null) field.Text = "[SAMPLES.au_cut]";
            field = ((FastReport.TextObject)report.FindObject("Date"));
            if (field != null) field.Text = "[SAMPLES.end_date]";
            field = ((FastReport.TextObject)report.FindObject("Blank"));
            if (field != null) field.Text = "[SAMPLES.blank]";
            field = ((FastReport.TextObject)report.FindObject("Pit"));
            if (field != null) field.Text = "[SAMPLES.pit]";

            report.Show();
        }
开发者ID:AleksanderGalkin,项目名称:GeoDb,代码行数:101,代码来源:PDrillHoles2PrintSet.cs


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