Fastreportprinter es una biblioteca de impresión de informe rápido para entornos de múltiples lecturas y no GUI (interfaz gráfica de usuario) .
Implementado en el lenguaje Delphi, utiliza el concepto de interfaz Fluent para guiar el uso de la biblioteca, diseñado para imprimir informes en la interfaz gráfica de usuario utilizando la columna de impresión.
Entornos
Para usar Fastreportprinter , debe instalar el componente de informe rápido.
Usando el jefe (Manager de dependencia para Delphi) es posible instalar la biblioteca automáticamente.
boss install github.com/antoniojmsjr/FastReportPrinter
Si elige instalar manualmente, simplemente agregue las siguientes carpetas a su proyecto, en Proyecto> Opciones> Compilador Delphi> Target> Todas las configuraciones> Ruta de búsqueda
..FastReportPrinterSource
DataSets es una interfaz utilizada por la biblioteca para comunicarse con la base de datos a través de los componentes:
| Clase | Componente |
|---|---|
| Vale | Nativo |
| Tfrxdbdataset | Informe rápido |
Para ejemplificar el uso de la biblioteca , los datos de API de IBGE se usaron para informar e imprimir el informe.
Impresión de archivo de ejemplo: ubicaciones deBGe.pdf
Hay ejemplos disponibles en la carpeta del proyecto:
..FastReportPrinterSamples
Base de datos de ejemplo
..FastReportPrinterSamplesDB
Informe de ejemplo
..FastReportPrinterSamplesReport
Ejemplo
uses FRPrinter, FRPrinter.Types; var
lPrinted: Boolean;
begin
// CLASSE DE IMPRESSÃO
try
lPrinted := TFRPrinter.New.
DataSets.
SetDataSet(qryEstadosBrasil, ' EstadosBrasil ' ).
SetDataSet(frxdbMunicipioEstado).
SetDataSet(frxdbMunicipioRegiao).
SetDataSet(qryEstadoRegiao, ' EstadoRegiao ' ).
SetDataSet(qryMunicipios, ' Municipios ' ).
& End .
Print.
SetPrinter( ' Microsoft Print to PDF ' ). // QUANDO NÃO INFORMADO UTILIZA A IMPRESSORA CONFIGURADA NO RELATÓRIO *.fr3
SetFileReport(TUtils.PathAppFileReport). // LOCAL DO RELATÓRIO *.fr3
Report(procedure(pfrxReport: TfrxReport) // CONFIGURAÇÃO DO COMPONENTE DE RELATÓRIO DO FAST REPORT
var
lfrxComponent: TfrxComponent;
lfrxMemoView: TfrxMemoView absolute lfrxComponent;
begin
// CONFIGURAÇÃO DO COMPONENTE
pfrxReport.ReportOptions. Name := ' API de localidades IBGE ' ; // NOME PARA IDENTIFICAÇÃO NA IMPRESSÃO DO RELATÓRIO
pfrxReport.ReportOptions.Author := ' Antônio José Medeiros Schneider ' ;
// PASSAGEM DE PARÂMETRO PARA O RELATÓRIO
lfrxComponent := pfrxReport.FindObject( ' mmoProcess ' );
if Assigned(lfrxComponent) then
begin
lfrxMemoView.Memo.Clear;
lfrxMemoView.Memo.Text := Format( ' Aplicativo de Exemplo: %s ' , [ ' VCL ' ]);
end ;
end ).
Execute; // PROCESSAMENTO DO RELATÓRIO/IMPRESSÃO
except
on E: Exception do
begin
if E is EFRPrinter then
ShowMessage( ' Erro de impressão: ' + E.ToString)
else
ShowMessage( ' Erro de impressão: ' + E.Message);
Exit;
end ;
end ;
if lPrinted then
ShowMessage( ' Impresso ' )
else
ShowMessage( ' Falha de impressão ' );
end ;Observación
Ejemplo compilado
Descargar: demo.zip
Prueba de rendimiento para aplicaciones web utilizando JMeter:
..FastReportPrinterSamplesJMeter
FastReportPrinter es un software gratuito y de código abierto con licencia bajo el