{"id":23128024,"url":"https://github.com/antoniojmsjr/fastreportprinter","last_synced_at":"2025-04-04T05:43:36.059Z","repository":{"id":51794369,"uuid":"520608571","full_name":"antoniojmsjr/FastReportPrinter","owner":"antoniojmsjr","description":"⚡ Biblioteca de impressão de relatórios utilizando Fast Report em ambientes multithreading e não GUI(Graphical User Interface) usando spooler de impressão.","archived":false,"fork":false,"pushed_at":"2022-08-08T19:57:50.000Z","size":1057,"stargazers_count":25,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-09T17:15:51.145Z","etag":null,"topics":["delphi","fastreport","multithreading","print","report"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/antoniojmsjr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-02T18:29:14.000Z","updated_at":"2024-11-27T16:34:54.000Z","dependencies_parsed_at":"2022-09-23T05:20:34.357Z","dependency_job_id":null,"html_url":"https://github.com/antoniojmsjr/FastReportPrinter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FFastReportPrinter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FFastReportPrinter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FFastReportPrinter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antoniojmsjr%2FFastReportPrinter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antoniojmsjr","download_url":"https://codeload.github.com/antoniojmsjr/FastReportPrinter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128739,"owners_count":20888234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["delphi","fastreport","multithreading","print","report"],"created_at":"2024-12-17T09:16:57.075Z","updated_at":"2025-04-04T05:43:36.040Z","avatar_url":"https://github.com/antoniojmsjr.png","language":"Pascal","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Maintained YES](https://img.shields.io/badge/Maintained%3F-yes-green.svg?style=flat-square\u0026color=important)\n![Memory Leak Verified YES](https://img.shields.io/badge/Memory%20Leak%20Verified%3F-yes-green.svg?style=flat-square\u0026color=important)\n![Release](https://img.shields.io/github/v/release/antoniojmsjr/FastReportPrinter?label=Latest%20release\u0026style=flat-square\u0026color=important)\n![Stars](https://img.shields.io/github/stars/antoniojmsjr/FastReportPrinter.svg?style=flat-square)\n![Forks](https://img.shields.io/github/forks/antoniojmsjr/FastReportPrinter.svg?style=flat-square)\n![Issues](https://img.shields.io/github/issues/antoniojmsjr/FastReportPrinter.svg?style=flat-square\u0026color=blue)\u003c/br\u003e\n![Compatibility](https://img.shields.io/badge/Compatibility-VCL,%20Firemonkey,%20DataSnap,%20Horse,%20RDW,%20RADServer-3db36a?style=flat-square)\n![Delphi Supported Versions](https://img.shields.io/badge/Delphi%20Supported%20Versions-XE7%20and%20above-3db36a?style=flat-square)\n![FastReport Supported Versions](https://img.shields.io/badge/Fast%20Report%20Supported%20Versions-5.1.5%20and%20above-3db36a?style=flat-square)\n\n# FastReportPrinter\n\n**FastReportPrinter** é uma biblioteca de impressão de relatórios com [Fast Report](https://www.fast-report.com) para ambientes **multithreading** e não **GUI(Graphical User Interface)**.\n\nImplementado na linguagem Delphi, utiliza o conceito de [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) para guiar no uso da biblioteca, desenvolvido para impressão de relatórios em ambientes não GUI(Graphical User Interface) usando spooler de impressão.\n\n**Ambientes**\n\n* Windows Forms\n* Windows Console\n* Windows Service *\n* IIS ISAPI[(Horse)](https://github.com/HashLoad/horse) *\n* IIS CGI[(Horse)](https://github.com/HashLoad/horse) *\n\n## ⭕ Pré-requisito\n\nPara utilizar o **FastReportPrinter** é necessário a instalação do componente [Fast Report](https://www.fast-report.com).\n\n## ⚙️ Instalação Automatizada\n\nUtilizando o [**Boss**](https://github.com/HashLoad/boss/releases/latest) (Dependency manager for Delphi) é possível instalar a biblioteca de forma automática.\n\n```\nboss install github.com/antoniojmsjr/FastReportPrinter\n```\n\n## ⚙️ Instalação Manual\n\nSe você optar por instalar manualmente, basta adicionar as seguintes pastas ao seu projeto, em *Project \u003e Options \u003e Delphi Compiler \u003e Target \u003e All Configurations \u003e Search path*\n\n```\n..\\FastReportPrinter\\Source\n```\n\n## 🧬 DataSet de Exportação\n\n**DataSets** é uma interface utilizada pela biblioteca para comunicação com o banco de dados através dos componentes:\n\n| Classe | Componente |\n|---|---|\n| TDataSet | Nativo |\n| TfrxDBDataset | Fast Report |\n\n## ⚡️ Uso da biblioteca\n\nPara exemplificar o uso do biblioteca foi utilizado os dados da **[API de localidades do IBGE](https://servicodados.ibge.gov.br/api/docs/localidades)** para geração e impressão do relatório.\n\nArquivo de exemplo de impressão: [LocalidadesIBGE.pdf](https://github.com/antoniojmsjr/FastReportPrinter/files/9245473/LocalidadesIBGE.pdf)\n\nOs exemplos estão disponíveis na pasta do projeto:\n\n```\n..\\FastReportPrinter\\Samples\n```\n\n**Banco de dados de exemplo**\n\n* Firebird: 2.5.7 [Donwload](http://sourceforge.net/projects/firebird/files/firebird-win32/2.5.7-Release/Firebird-2.5.7.27050_0_Win32.exe/download)\n* Arquivo BD:\n```\n..\\FastReportPrinter\\Samples\\DB\n```\n\n**Relatório de exemplo**\n\n```\n..\\FastReportPrinter\\Samples\\Report\n```\n**Exemplo**\n\n```delphi\nuses FRPrinter, FRPrinter.Types;\n```\n```delphi\nvar\n  lPrinted: Boolean;\nbegin\n\n  //CLASSE DE IMPRESSÃO\n  try\n    lPrinted := TFRPrinter.New.\n      DataSets.\n        SetDataSet(qryEstadosBrasil, 'EstadosBrasil').\n        SetDataSet(frxdbMunicipioEstado).\n        SetDataSet(frxdbMunicipioRegiao).\n        SetDataSet(qryEstadoRegiao, 'EstadoRegiao').\n        SetDataSet(qryMunicipios, 'Municipios').\n      \u0026End.\n      Print.\n        SetPrinter('Microsoft Print to PDF'). //QUANDO NÃO INFORMADO UTILIZA A IMPRESSORA CONFIGURADA NO RELATÓRIO *.fr3\n        SetFileReport(TUtils.PathAppFileReport). //LOCAL DO RELATÓRIO *.fr3\n        Report(procedure(pfrxReport: TfrxReport) //CONFIGURAÇÃO DO COMPONENTE DE RELATÓRIO DO FAST REPORT\n        var\n          lfrxComponent: TfrxComponent;\n          lfrxMemoView: TfrxMemoView absolute lfrxComponent;\n        begin\n          //CONFIGURAÇÃO DO COMPONENTE\n\n          pfrxReport.ReportOptions.Name := 'API de localidades IBGE'; //NOME PARA IDENTIFICAÇÃO NA IMPRESSÃO DO RELATÓRIO\n          pfrxReport.ReportOptions.Author := 'Antônio José Medeiros Schneider';\n\n          //PASSAGEM DE PARÂMETRO PARA O RELATÓRIO\n          lfrxComponent := pfrxReport.FindObject('mmoProcess');\n          if Assigned(lfrxComponent) then\n          begin\n            lfrxMemoView.Memo.Clear;\n            lfrxMemoView.Memo.Text := Format('Aplicativo de Exemplo: %s', ['VCL']);\n          end;\n        end).\n        Execute; //PROCESSAMENTO DO RELATÓRIO/IMPRESSÃO\n  except\n    on E: Exception do\n    begin\n      if E is EFRPrinter then\n        ShowMessage('Erro de impressão: ' + E.ToString)\n      else\n        ShowMessage('Erro de impressão: ' + E.Message);\n      Exit;\n    end;\n  end;\n\n  if lPrinted then\n    ShowMessage('Impresso')\n  else\n    ShowMessage('Falha de impressão');\n\nend;\n```\n\n**Observação**\n\n* Falta de memória pode gerar falha de impressão.\n* Impressão de documento grande pode ter demora na resposta de sucesso da impressão.\n* Windows Service Application é necessário configurar \"logon\" usando uma conta administrativa ou NT AUTHORITY\\LocalService e ou NT AUTHORITY\\NetworkService para uma impressão com sucesso.\n* IIS(ISAPI/CGI) devido a um [bug](https://blogs.stonesteps.ca/1/p/44) quando app 32 bits e Windows 64 bits não é possível imprimir, solução, compilar app 64 bits e com permissão usando uma conta NT AUTHORITY\\LocalService e ou NT AUTHORITY\\NetworkService.\n\n**Exemplo compilado**\n\n* VCL\n* VCL [(Horse)](https://github.com/HashLoad/horse)\n\nDownload: [Demo.zip](https://github.com/antoniojmsjr/FastReportPrinter/files/9245293/Demo.zip)\n\n\n\nhttps://user-images.githubusercontent.com/20980984/183212903-ec64169a-f1f5-4c21-8c46-bc3e5a8c8078.mp4\n\n\n\nhttps://user-images.githubusercontent.com/20980984/183213069-68c4ca35-4804-481e-854e-e7d1ae303686.mp4\n\n\n\n**Teste de desempenho para aplicações web usando [JMeter](https://jmeter.apache.org/):**\n\n```\n..\\FastReportPrinter\\Samples\\JMeter\n```\n\n\n## ⚠️ Licença\n`FastReportPrinter` is free and open-source software licensed under the [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://github.com/antoniojmsjr/FastReportPrinter/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniojmsjr%2Ffastreportprinter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniojmsjr%2Ffastreportprinter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniojmsjr%2Ffastreportprinter/lists"}