FastReport在30號宣佈最新的FastReport Desktop Green Edition會有禁用的列印選項。
你不用再預熱印表機、處理空紙夾、購買碎紙機~一整個感覺像舖April Fool ‘s Day的梗XDDD
大型網站架構..net 架構師.rabbitMQ.redis.行動開發.APP開發教學.PHP Laravel開發..net core C# 開發.架構師之路.Delphi開發.資料庫程式.進銷存.餐飲POS系統
FastReport在30號宣佈最新的FastReport Desktop Green Edition會有禁用的列印選項。
你不用再預熱印表機、處理空紙夾、購買碎紙機~一整個感覺像舖April Fool ‘s Day的梗XDDD
FastReport也宣佈新版的5.6支援RAD Studio 10.2 Tokyo的Win32/Win64平台了!
Version 5.6
—————————
+ Added Embarcadero RAD Studio 10.2 Tokyo support for x32 and x64 windows platforms
+ Added Sup, Sub tag support for TfrxHTMLExport
+ Added TfrxPDFExport.SaveOriginalImages property. True by default
+ Added GS1 support for Code128C, EAN128C barcodes
+ Added sorting of printers by name in the printer’s list
+ Added Norwegian resources
+ Added TfrxFDTable support in the frxFDRTTI
+ Added #0..#31 chars support in the Code128A
+ Added TfrxBarcodeView.TestLine property
+ Added TfrxRichEditor form state storing
+ [Lazarus] Added support of GTK widget
– Fixed frx2xto30.pas for XE2 and later
– Increased PaperSizes count limit to 512
– [Lazarus] Fixed scrolling in designer
– Fixed smMaxHeight in TfrxRichView
– Fixed TfrxXLSXExport for file with 1000 worksheets
– Fixed TfrxPreviewPages.ClearPageCache
– Fixed TfrxIBXQuery.ExecSQL
– Fixed new event insert if main procedure of the script have line with “// begin”
– Fixed component’s name after Drag&Drop from Data Tree for fields with Unicode characters
– Fixed TfrxBarcodeView baCenter, baRight align
– Fixed reprint on new page and group keeping bug
– Fixed update parameters after loading for TfrxADOQuery
– Fixed preview’s toolbar for RAD Studio Berlin 10.1 Update 2 when VCL styles applied
– Fixed TfrxReport.PrintOptions.Duplex usage
– Fixed printing of PNG images
– Fixed TfrxReport.ReportOptions.Author in the DOCX, PPTX and XLSX exports
– Fixed vsExport usage for export filters
– Fixed export of non-alphanumeric chars (<, >, &) inside HTMLTags in the ODF export
– [FastScript] Fixed Format function
– Fixed HTMLTags in the TfrxMemoView
– Fixed calculation of hyperlink expressions
– Fixed image size in the DOCX export
– Fixed MSI barcode
– Fixed exporting of objects’ hyperlinks to encrypted PDF
– Fixed export to continuous XLSX for reports with many pictures
– Fixed export of frames with width < 1 to HTML
– Fixed export of empty pages to XLSX
– Fixed band’s with barcodes stretching
– Fixed KeepChild behavior for TfrxReportTitle child bands
– Fixed custom number format in the ODF export
– [Lazarus] Fixed printer selection in the print dialog
– Fixed export of hyperlinks with hkPageNumber kind when page number greater than pages count
– Fixed component’s name after Drag&Drop from Data Tree for some cases
– Fixed “Divizion by zero” error with pmSplit print mode
– Fixed PrintOnSheeet in the Print Dialog for some cases
– [Lazarus] Fixed default printer in the print dialog
– Fixed export images to BIFF8 for x64
– [Lazarus] Fixed printer selection before print properties dialog
– Fixed RAD Studio 10.1 Berlin size of dialog page issue in the designer
– Fixed exporting of numbers with ‘%’ in the format string (like #,##0.###%) in the BIFF8 export
– [Enterprse] Fixed “Report not found” error message
– Fixed “Print to file” option for GDI reports
– Fixed export to PDF with embedded fonts and empty memos
– Fixed export to PDF for HAlign = haBlock (GapX used now)
– Fixed font’s embedding for protected PDF if EmbedFontsIfProtected = False and EmbeddedFonts = True
– Fixed exporting of TfrxShapeView to XLSX and DOCX exports
– Fixed exporting of Unicode characters in the memos with HTML tags to DOCX for non-Unicode IDE
– Fixed TfrxPreviewButtons in the frxClassRTTI
– Fixed parent for objects for some cases
– Fixed font’s name in the ODF export
[C#]
DataSet FDataSet;
// 建立資料集
FDataSet = new DataSet();
DataTable table = new DataTable();
table.TableName = “Employees”;
FDataSet.Tables.Add(table);
table.Columns.Add(“ID”, typeof(int));
table.Columns.Add(“Name”, typeof(string));
table.Rows.Add(1, “Andrew Fuller”);
table.Rows.Add(2, “Nancy Davolio”);
table.Rows.Add(3, “Margaret Peacock”);
// 建立報表
Report report = new Report();
// 載入報表
report.Load(@”..\..\report.frx”);
// 註冊資料集
report.RegisterData(FDataSet);
report.GetDataSource(“Employees”).Enabled = true;
// 1 進入設計模式
report.Design();
// 2 顯示報表
report.Show();
// 3 匯出成pdf
report.Prepare();
PDFExport export = new PDFExport();
report.Export(export, “result.pdf”);
report.Dispose();
[/c#]
一直陪著Delphi 成長的老字號報表工具FastReport 也支援了Delphi 10.1 Berlinhttps://www.fast-report.com/en/news/373/
FastReport欄位判斷
[IIF(
Band顯示
procedure MasterData1OnBeforePrint(Sender: TfrxComponent);
begin
memo2.text := ‘1234’;
If
masterdata1.visible := True;
Memo2.Color := clblue;
Memo2.text := ‘OK’;
end else begin
masterdata1.visible := False;
Memo2.Color := clred;
Memo2.text := ‘Not OK’;
end;
end;
在Delphi下如何取得fastreport的元件及做值的修改?
[pascal]
var i:integer;
begin
frxreport1.LoadFromFile(‘test.fr3’);
frxreport1.Report.PrintOptions.Printer := ‘Adobe PDF’;
for i:=0 to frxreport1.ComponentCount -1 do begin //取得報表內所有物件
if frxreport1.Components[i].ClassName = ‘TfrxMemoView’ then begin // 找到TfrxMemoView
//ExtractFileName(frxreport1.FileName); 取得目前報表名稱
//frxreport1.Components[i].Name; 取得元件名稱
Tfrxmemoview(frxreport1.Components[i]).Text := ‘hello world’;
end;
end;
frxreport1.Report.PrintOptions.ShowDialog := false; // 不顯示對話框
frxreport1.Report.ShowProgress := False; // 不顯示列印進度
frxReport1.PrintOptions.Copies:=3; // 列印份數
frxreport1.Report.PrepareReport(true);
frxreport1.Print;
// 線上編輯報表
// frxreport1.DesignReport;
end;
[/pascal]