{"id":347,"date":"2022-01-07T18:27:01","date_gmt":"2022-01-07T21:27:01","guid":{"rendered":"https:\/\/gladiston.net.br\/?page_id=347"},"modified":"2024-01-03T14:48:21","modified_gmt":"2024-01-03T17:48:21","slug":"relatorios-com-fortes-report","status":"publish","type":"page","link":"https:\/\/gladiston.net.br\/en\/programacao\/lazarus-ide\/relatorios-com-fortes-report\/","title":{"rendered":"Reports with FortesReport"},"content":{"rendered":"<p>FortesReport was initially produced by a national company: Fortes Sistemas. This report generator has become so good that many have converted their reports to it and prefer to use it over other generators. His description is very complete on the website:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>FortesReport is a powerful report generator available as a packaged component for Delphi. In FortesReport, reports are composed of bands that have specific functions in the print flow. You define groupings, sublevels and totals simply by hierarchical relationship between tracks. In addition, FortesReport has a rich palette of components for text, graphics, formulas, barcodes, filters and layout.<\/p>\n<\/blockquote>\n\n\n\n<p>It has a version for the Lazarus IDE and also for the Delphi Community. Having a working version for the Delphi Community is very good since the competitor that comes with Delphi, FastReport has serious limitations. In addition, most programmers already know QuickReport, whose way of creating reports is basically the same as FortesReport, and therefore, they would not feel so much difficulty in creating reports with it.<\/p>\n\n\n\n<p>A glaring difference between Fortes-CE and FastReport(Delphi) is that in FortesReport the reports are built with components called bands that are placed on the form and so you create the layout, labels and other visual components for it to have events and you program them into events like OnPrint, OnBeforePrint, OnAferPrint, etc\u2026 so creating a report in Fortes requires some programming in Pascal. On the other hand, FastReport (analogous to LazReport for lazarus-ide) is much more visual with much less programming involved, once defining the data sources and how they intertwine (eg master\/detail) the rest is to create the report visually.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation in Delphi Community<\/h2>\n\n\n\n<p>Fortes-CE must be installed from the repositories, as it is not yet featured in the Delphi IDE&#039;s GetIt services. The repository is:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/fortesinformatica\/fortesreport-ce\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/fortesinformatica\/fortesreport-ce<\/a><\/p>\n\n\n\n<p>However it has utility support <strong>boss<\/strong> and can be installed from the command line very easily. If you are not familiar with the boss, simply follow the instructions on the site which boils down to installing the package in the IDE, something simple.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installation in Lazarus-IDE<\/h2>\n\n\n\n<p>FortesReport is already in the Online Package Manager(OPM) and its installation is therefore very smooth. There is also the option to install from the command line using the utility <strong>boss<\/strong>. <\/p>\n\n\n\n<p>Antes de prosseguir com a instala\u00e7\u00e3o, leia atentamente estes avisos importantes:<\/p>\n\n\n\n<p>Se contudo preferir a instala\u00e7\u00e3o manual, segue o link com as instru\u00e7\u00f5es:<\/p>\n\n\n\n<p><strong>Aviso #1<\/strong>: Se for instalar via OPM, n\u00e3o misture a instala\u00e7\u00e3o desse pacote com outra simult\u00e2nea, instale apenas e ele, e depois se precisar instale os demais pacotes.<\/p>\n\n\n\n<p><strong>Aviso #2<\/strong>: Se for instalar via OPM encontrar\u00e1 um pacote de nome similar intitulado &#8220;Fortes4Lazarus&#8221;. Ele \u00e9 o mesmo gerador de relat\u00f3rio, por\u00e9m \u00e9 fornecido e mantido pela comunidade do Lazarus e vem embutido na IDE, por\u00e9m n\u00e3o \u00e9 instalado por padr\u00e3o. O problema \u00e9 que pacotes como ACBr usam obrigat\u00f3riamente o \u201cFortes-CE\u201d  e n\u00e3o \u00e9 possivel at\u00e9 o momento ter os dois, isto \u00e9, &#8220;Fortes4Lazarus&#8221; e &#8220;Fortes-CE&#8221; no mesmo ambiente porque aparentemente eles tem nomes de entidades iguais internamente que confundem o compilador. Da vez que tentei, quebrei as dependencias.<\/p>\n\n\n\n<p><strong>Aviso #<\/strong>3:  Se for instalar manualmente via GIT tenha certeza de ter instalado o pacote intitulado &#8220;cairo_canvas&#8221;, se prosseguir sem ele n\u00e3o h\u00e1 tanto problema assim porque o gerenciador de pacotes notar\u00e1 que essa dependencia acompanha o Lazarus e lhe perguntar\u00e1 se que ele pr\u00f3prio resolva a quest\u00e3o e respondendo afirmativamente o programa prosseguir\u00e1 normalmente.<\/p>\n\n\n\n<p>As instru\u00e7\u00f5es para instala\u00e7\u00e3o manual via GIT est\u00e3o no link abaixo:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/fortesinformatica\/fortesreport-ce\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/fortesinformatica\/fortesreport-ce<\/a><\/p>\n\n\n\n<p>Mas popularmente as instru\u00e7\u00f5es s\u00e3o as seguintes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \\   (ou a pasta desejada)\ngit clone https:\/\/github.com\/fortesinformatica\/fortesreport-ce.git<\/code><\/pre>\n\n\n\n<p>No exemplo acima, criamos a pasta C:\\fortesreport-ce, l\u00e1 estar\u00e1 nosso(s) pacote(s) de instala\u00e7\u00e3o.<\/p>\n\n\n\n<p>V\u00e1 em Packages|Open Package(.lpk)\u2026 e na ordem fa\u00e7a a instala\u00e7\u00e3o(Use|Install) de:<\/p>\n\n\n\n<p>&#8220;C:\\fortesreport-ce\\Packages\\frce.lpk&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"487\" src=\"https:\/\/gladiston.net.br\/wp-content\/uploads\/2024\/01\/image.png\" alt=\"\" class=\"wp-image-2386\" srcset=\"https:\/\/gladiston.net.br\/wp-content\/uploads\/2024\/01\/image.png 466w, https:\/\/gladiston.net.br\/wp-content\/uploads\/2024\/01\/image-287x300.png 287w, https:\/\/gladiston.net.br\/wp-content\/uploads\/2024\/01\/image-11x12.png 11w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><figcaption class=\"wp-element-caption\">Instalando o pacote do Fortes Report-CE.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Geralmente tem muitos HowTo\u00b4s no YoutTube demonstrando sua utiliza\u00e7\u00e3o, ser\u00e1 simples o aprendizado. Se j\u00e1 tem experi\u00eancia com relat\u00f3rios usando &#8220;bandas&#8221; como o QuickReport n\u00e3o ter\u00e1 dificuldades.<\/p>\n\n\n\n<p>Se \u00e9 a primeira vez que vai utiliz\u00e1-lo \u00e9 bom saber que ele tem vazamento de mem\u00f3ria que n\u00e3o consegui identificar onde est\u00e1. Portanto, ligue seu debugger para exibir vazamentos e se conseguir localiz\u00e1-los, envie ao autor a corre\u00e7\u00e3o.<\/p>\n\n\n\n<p>Uma limita\u00e7\u00f5es neste gerador de relat\u00f3rios \u00e9 que ele carece do ambiente gr\u00e1fico, assim se estiver pensando em produzir relat\u00f3rios em PDF usando apenas interface de texto ou em forma de API(Rest) voc\u00ea n\u00e3o ir\u00e1 conseguir.<\/p>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>O FortesReport foi inicialmente produzido vejam s\u00f3, por uma empresa nacional: Fortes Sistemas. Este gerador de relat\u00f3rio ficou t\u00e3o bom que muitos converteram seus relat\u00f3rios para ele e preferem us\u00e1-lo em detrimento de outros geradores. A descri\u00e7\u00e3o dele \u00e9 bem completa no site: O FortesReport \u00e9 um poderoso gerador de relat\u00f3rios dispon\u00edvel como um pacote [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":159,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/template-full-width.php","meta":{"footnotes":""},"class_list":["post-347","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/comments?post=347"}],"version-history":[{"count":12,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/347\/revisions"}],"predecessor-version":[{"id":2396,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/347\/revisions\/2396"}],"up":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/159"}],"wp:attachment":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/media?parent=347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}