Transferred from: http://guohongjian81.blog.163.com/blog/static/34535941201011109592160/
1. There is more than one row of data in the document, but only part of the preview is displayed, or there is a gap between the printed content line and the row
Fastrepor attribute: Set rowcount=0,Start New Page is False; stretched to be True.
Description
RowCount: Control print a few lines in total;rowcount=0 is print all;
Start New page: skip the page before printing, and print one line per page;
Stretch: The table body automatically scales according to the body contents;
2. Set 0 value in print blank when printing
Set the column to display as the specified value in Fastreport, where the column has a hidezeros set to trueWhen this column value is 0 , print out after the blank, avoid a lot of 0 look dizzy ;
3. Set the amount or number of decimal digits in the print
Fastrepor attribute: Use displayformat(Data display format)-- digital --1234.50
%2.0f: Displayed in integer form;
%2.2f: Displays two decimal places;
%2.3f: Displays three decimal digits, which can be adjusted as appropriate.
4. Format Date / time in print
Fastrepor attribute: Use displayformat(Data display format)-- date / time --11.28.2002
MM.DD.YYYY: Displays the month . Day . years
MM.DD: Displays the month . Day
MM: Display two-bit month
5. When the value of the field is zero, the display is empty
Fastrepor Property: Set hidezeros(0 before the number is displayed) is True
6. Wrap Line
1) Select the data unit for the group;
2)stretchmode for smmaxhtight;wordwrap for True ; stretched to be True.
Description
Stretchmode: The behavior of object scaling;
WordWrap: text is automatically wrapped;
7. Total
[SUM (< enter / pin / rewind / Fold the body document .) Amtn_net ">,masterdata2)]
8. Total per page
Place the defined aggregate function at the end of the column .
9. Full table Totals
Place the defined aggregate function in the ' report totals ' .
10. Amount capitalized
Using functions in Report design:Conbertnumtochinese ()
Total amount capitalized:[Convertnumtochinese (SUM (< in / pin / rewind / Folding table Body file ." Amtn_net ">,masterdata2))]
Negative total amount Uppercase:[Convertnumtochinese (SUM (< in / pin / back / Fold the table body . " Amtn_net ">,masterdata2 )))]
11. Number of rows printed in the report
Using variables in report design- - system variable line#
12. Even dozen
1) documents -- quick Check, find out the documents to be printed;
2) Print -- query data - - preview -- Print, select multiple documents to connect.
13. Even hit the same page.
Print -- design -- Page Setup -- tick " Print to previous page ", " stretch to print area "
14. Print a fixed number of lines, insufficient padding blank line code (language:pascalscript)
Var
Pageline:integer;
pagemaxrow:integer=5; number of lines printed per page
Procedure Footer1onbeforeprint (sender:tfrxcomponent);
Var
I:integer;
Begin
I: = IIf (Pageline=0, Pagemaxrow, pageline);
While I < pagemaxrow do begin
I: = i + 1;
Engine.showband (CHILD1); Print blank Form
End
End
Procedure Masterdata2onbeforeprint (sender:tfrxcomponent);
Begin
Pageline: = <line> mod pagemaxrow;
if (Pageline = 1) and (<line> > 1) Then
Engine.newpage;
End
Begin
End.
Electronic Signature Code (language:basicscript)
Sub Masterdata2onbeforeprint (Sender)
If Length (< in the sales table header .) Chk_man ">) >0 then Picture2.visible=true
End Sub
"Go" fastreport common print settings