Fast Report - Shift Relative To Simulator: Difference between revisions

From eStream Software
Line 33: Line 33:
:10. Save the Report.
:10. Save the Report.


:::----------------------------------------------------------------------------------------------------------------------------------------------------
{| style="margin: 1em auto 1em auto;"
::::{|
|-
|
----------------------------------------------------------------------------------------------------------------------------------------------------
{|
|-
|-
| [[File:Template.Tips-01.jpg|60px]]|| Note: Fastest way to do (For Version 721 & above Only)
| [[File:Template.Tips-01.jpg|60px]]|| Note: Fastest way to do (For Version 721 & above Only)
Line 41: Line 44:
03. Direct jump to '''Step 7''' <br />
03. Direct jump to '''Step 7''' <br />
|}
|}
:::----------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------
|}


==Video==
==Video==

Revision as of 06:10, 18 July 2016

Introduction

In Fast Report there is no such function call Shit Relative To. This only available in Report Builder. So to simulate this function we had created the below script.

Requirement

  • Fast Report
  • SQL Accounting Version 721 & above

Steps

Below is example using Sales Invoice

01. Place all the component (eg TfrxMemoView or TfrxRichView) as following
FastReport-01.jpg
02. Only TfrxMemoView component need to select Dataset & DataField
FastReport-03.jpg
03. For TfrxRichView component must leave it empty for Dataset & DataField
FastReport-04.jpg
04. For TfrxRichView double click & select the ABC icon & select the Data Field
FastReport-05.jpg
05. Click Tick icon after select the Field
06. On each component(i.e. MmDesc, RichDesc3 & RichSN) set all the GapY to 0
FastReport-06.jpg
07. Click on the Empty place (see icon 1 below)
FastReport-07.jpg
08. Double click OnBeforePrint (see icon 2 above)
09. Enter below script
procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
  //For Version 721 & above 
  ShiftRelative([MmDesc, RichDesc3, RichSN]); // ShiftRelative([ComponentName1, ComponentName2, ComponentName3]) // For DetailData1
  ShiftRelative([MmDescM, RichDesc3M]); // For DetailData2
end;
10. Save the Report.

Template.Tips-01.jpg Note: Fastest way to do (For Version 721 & above Only)

01. Copy from the build in report (Sales Invoice 7 (GST 1))
02. Paste to your report
03. Direct jump to Step 7


Video

FAQ

01. Why it overlap when preview even at design time no overlap?

If preview shown something like below, try adjust the component to by add 0.01 for Top field
FastReport-02.jpg

02. Why it still same even after all the step above had follow & all scripts had copy?

Make sure the compoents width not overlap to next field
FastReport-08.jpg

03. Can my 2nd & 3rd field longer then 1st field?

Yes just tick the Shift When Overlapped option in right click for both 2nd & 3rd compoent
FastReport-09.jpg

See also