fastreport 横向布局_如何在XE7中更改fastreport布局

I want to change the Layout or band in fast report depending upon the dataset value ,how can be this done in fastreport 5.0 AND I am using delphiXE7

If it's a car ticket I want to print car and if its bike I want to print the bike details ,My data set have values of all orders in which some orders may have car and bike tickets so , When I generate the report (report is the ticket for my application) based on the data set value if its car I want to show car images and if its bike different images of bike based on data set values and different style how can this be done?

OR This can be done by changing the .fr3 file?

with frxCODOrdersDBDataset.DataSet do

begin

First;

while not Eof do

begin

if FieldByName('draw_name').AsString='CAR_TICKET' then

begin

frxCODOrdersReport.LoadFromFile(ExtractFilePath(Application.ExeName) + '\WebTicketPdf\CarTicketPdf.fr3');

frxCODOrdersReport.PrepareReport();

end

else if FieldByName('draw_name').AsString='BIkE_TICKET' then

begin

frxCODOrdersReport.LoadFromFile(ExtractFilePath(Application.ExeName) + '\WebTicketPdf\BikeTicketPdf.fr3');

end;

Next;

end;

end;

Screen.Cursor := crDefault; // Or you can restore a saved cursor.

frxCODOrdersReport.ShowReport();

But above code generates and this prints or generates only first car ticket pdf only .

解决方案var IsFirst: Boolean;

with frxCODOrdersDBDataset.DataSet do

begin

First;

IsFirst := True;

while not Eof do

begin

if FieldByName('draw_name').AsString='CAR_TICKET' then

begin

frxCODOrdersReport.LoadFromFile(ExtractFilePath(Application.ExeName) + '\WebTicketPdf\CarTicketPdf.fr3');

frxCODOrdersReport.PrepareReport(IsFirst);

end

else if FieldByName('draw_name').AsString='BIkE_TICKET' then

begin

frxCODOrdersReport.LoadFromFile(ExtractFilePath(Application.ExeName) + '\WebTicketPdf\BikeTicketPdf.fr3');

frxCODOrdersReport.PrepareReport(IsFirst);

end;

if IsFirst then IsFirst := False;

Next;

end;

end;

Screen.Cursor := crDefault; // Or you can restore a saved cursor.

frxCODOrdersReport.ShowPreparedReport();

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Version 5.1 --------------------------- - Fixed styles in Excel2007 export + Added Indy mail transport (see FR5/Source/ExportPack/frxExportMail.pas for enabling this feature) - Fixed the hyperlinks feature in PDF export + Added the transparency feature in PDF export - Fixed bug with embedding fonts on 64-bit platforms + Added Embarcadero RAD Studio XE6 support + Added OnGetCustomData/OnSaveCustomData events which allow to save custom data inside report template(look new CustomReportData demo) + Added OnLoadDetailTemplate event - used to load detail reports from other sources like data fields. + Added new multiImage mechanism in TIFF export - multiImage document is not limited with pages count + Added new property UTF8 in CSV export filter for stroing Unicode text in UTF8 encoding + Added missing RTTI information for new clases - Improved and fixed template inheritence (inherite some collections like classes and variables) - Improved checkbox control in PDF export - Fixed script inheritence - for more information see example "Report with script inheritence" - Fixed Interactive chart behaviour and added "Interactive Chart " report example - Fixed bug with shadows in pictures in PDF export - Fixed problem with multipage preview - Fixed negative number export in BIFF8 export (braket form) - Fixed pictures in PowerPoint export - Fixed bug with Excel export in Enterprise edition - Fixed frames in RTF export - Fixed gradient fill in exports version 5.0 initial release ---------------------------- Classes: - New fill types available in the Memo object: gradient and glass. - Memo object can have several highlight conditions. The highlight condition now includes the following style settings: frame, font, fill and an object visibility. You may turn on and off each setting. - Memo object can have several format settings. When a Memo object contains multiple expressions in a text, you may specify a format for each expression. - Added Filter property to data bands. You may filter out data rows without using a script. - Changes in the report file format: collections like datasets, variables, formats, highlights are written as nested properties for better readability. Old files (FR VCL 3 and 4) are fully supported. - Added MouseEnter, MouseLeave events to report objects. - Added Visibility property (set of flags - vsPreview, vsPrint, vsExport). New objects: - New 2D barcodes - PDF417, DataMatrix, QR Code. - New barcodes - Code128, EAN128 with auto encoding. Interactivity: - New interactive report types: detail report and detail page. When you click an interactive object, a new report is built and displayed in a separate tab in the preview window. - Added interactivity in the Chart object. Clicking on a chart element, you may build a detail report. Exports: - New exports: HTML5 (div), DOCX, XLSX, PPTX. - Improvements in RTF, XLS, XML, HTML, ODF exports: support of different frame lines in a single Memo object. - Improved font embedding in the PDF export: font subset is embedded instead of a whole font. This will significantly reduce a file size. GUI: - New icons in the designer and preview windows. - Improved appearance of the Data tree: new icons for different field types. - New/improved dialogs: highlight, frame, fill, hyperlink, databand editors. Client/Server: - New navigation toolbar with touch support - Works via AJAX technology - Optimized exchange protocols - Reduced response time

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值