<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>FastScript — FastReport Forum</title>
        <link>https://forum.fast-report.com/en/</link>
        <pubDate>Thu, 14 May 2026 17:14:56 +0000</pubDate>
        <language>en</language>
            <description>FastScript — FastReport Forum</description>
    <atom:link href="https://forum.fast-report.com/en/categories/fastscript/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Call stack of the script execution</title>
        <link>https://forum.fast-report.com/en/discussion/19180/call-stack-of-the-script-execution</link>
        <pubDate>Wed, 25 Jun 2025 14:18:59 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Peta</dc:creator>
        <guid isPermaLink="false">19180@/en/discussions</guid>
        <description><![CDATA[<p>When debuging or when running, it is posible to generate a call-stack?</p>]]>
        </description>
    </item>
    <item>
        <title>How do I pass an object as a parameter from Delphi code to a Fastscript function?</title>
        <link>https://forum.fast-report.com/en/discussion/19171/how-do-i-pass-an-object-as-a-parameter-from-delphi-code-to-a-fastscript-function</link>
        <pubDate>Thu, 05 Jun 2025 08:11:03 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>dummzeuch</dc:creator>
        <guid isPermaLink="false">19171@/en/discussions</guid>
        <description><![CDATA[<p>Given a Fastscript function like this:</p><p><code spellcheck="false">function IsObjValid(obj: TSomeObject): boolean;</code></p><p><code spellcheck="false">begin</code></p><p><code spellcheck="false">&nbsp; Result := (obj.GetValue &lt;&gt; 0);</code></p><p><code spellcheck="false">end</code>;</p><p>I want to call this function from my Delphi code passing a TSomeObject instance. Therefore I register the TSomeObject class like this:</p><p><code spellcheck="false">type</code></p><p><code spellcheck="false">&nbsp; TSomeObject = class end;</code></p><p><code spellcheck="false">// ...</code></p><p><code spellcheck="false">&nbsp;cl := FScript.AddClass(TSomeObject, &#39;TObject&#39;);</code></p><p><code spellcheck="false">&nbsp;&nbsp;cl.AddMethod(&#39;function GetValue: integer&#39;, MethodSomeObjectGetValue);</code></p><p>... and call it like this:</p><p><code spellcheck="false">&nbsp; FCurrentObj := TStringList.Create;</code></p><p><code spellcheck="false">&nbsp; res := FScript.CallFunction(&#39;CheckInstance&#39;, Integer(FCurrentObj));</code></p><p>In MethodSomeObjectGetValue I expect <strong>Instance</strong> to be the value I passed as parameter above:</p><p><code spellcheck="false">function TMyStript.MethodSomeObjectGetValue(<em>Instance: TObject; </em>ClassType: TClass;</code></p><p><code spellcheck="false">const _<em>MethodName: string; C</em>aller: TfsMethodHelper): Variant;</code></p><p><code spellcheck="false">begin</code></p><p><code spellcheck="false">// function GetValue: integer</code></p><p><code spellcheck="false">&nbsp;&nbsp;Assert(Integer(_Instance) = Integer(FCurrentObj), &#39;invalid Instance value&#39;);</code></p><p><code spellcheck="false">// .... more code</code></p><p><code spellcheck="false">end;</code></p><p>But it is always NIL, so I must be doing something wrong, but what?</p>]]>
        </description>
    </item>
    <item>
        <title>TSyntaxType not found in new fast script version</title>
        <link>https://forum.fast-report.com/en/discussion/19136/tsyntaxtype-not-found-in-new-fast-script-version</link>
        <pubDate>Tue, 18 Feb 2025 11:55:30 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>bali</dc:creator>
        <guid isPermaLink="false">19136@/en/discussions</guid>
        <description><![CDATA[<p>unit CEIRADTool.Types;</p><p><br /></p><p>interface</p><p><br /></p><p>uses</p><p>&nbsp;{FastScript}</p><p>&nbsp;fs_SynMemo;</p><p><br /></p><p>type</p><p>&nbsp;TScriptType = record</p><p>&nbsp;&nbsp;DefaultExtension: string;</p><p>&nbsp;&nbsp;DisplayName: string;</p><p>&nbsp;&nbsp;FileMask: string;</p><p>&nbsp;&nbsp;FastScriptLanguageName: string;</p><p>&nbsp;&nbsp;SyntaxType: TSyntaxType;</p><p>&nbsp;end;</p><p><br /></p><p>const</p><p>&nbsp;cFastScriptLanguageName_PascalScript = &#39;PascalScript&#39;;</p><p><br /></p><p>const</p><p>&nbsp;cFileMask_AllFiles = &#39;*.*&#39;;</p><p>&nbsp;cFileMask_CPPScript = &#39;*.cpp&#39;;</p><p>&nbsp;cFileMask_JScript = &#39;*.js&#39;;</p><p>&nbsp;cFileMask_PascalScript = &#39;*.pas&#39;;</p><p>&nbsp;cFileMask_VBScript = &#39;*.vb&#39;;</p><p><br /></p><p>const</p><p>&nbsp;cScriptTypes: array [0..4] of TScriptType = (</p><p>&nbsp;&nbsp;(DefaultExtension: &#39;vb&#39;; DisplayName: &#39;Visual Basic Script Files&#39;; FileMask: cFileMask_VBScript; FastScriptLanguageName: &#39;BasicScript&#39;; SyntaxType: stVB),</p><p>&nbsp;&nbsp;(DefaultExtension: &#39;cpp&#39;; DisplayName: &#39;C++ Script Files&#39;; FileMask: cFileMask_CPPScript; FastScriptLanguageName: &#39;C++Script&#39;; SyntaxType: stCpp),</p><p>&nbsp;&nbsp;(DefaultExtension: &#39;js&#39;; DisplayName: &#39;JScript Files&#39;; FileMask: cFileMask_JScript; FastScriptLanguageName: &#39;JScript&#39;; SyntaxType: stJs),</p><p>&nbsp;&nbsp;(DefaultExtension: &#39;pas&#39;; DisplayName: &#39;Pascal Script Files&#39;; FileMask: cFileMask_PascalScript; FastScriptLanguageName: cFastScriptLanguageName_PascalScript; SyntaxType: stPascal),</p><p>&nbsp;&nbsp;(DefaultExtension: &#39;N/A&#39;; DisplayName: &#39;All Files&#39;; FileMask: cFileMask_AllFiles; FastScriptLanguageName: &#39;N/A&#39;; SyntaxType: stText)</p><p>&nbsp;&nbsp;);</p><p><br /></p><p>function StringToSyntaxType(const AString: string): TSyntaxType;</p><p><br /></p><p>implementation</p><p><br /></p><p>uses</p><p>&nbsp;{Delphi}</p><p>&nbsp;System.SysUtils,</p><p>&nbsp;{CEI}</p><p>&nbsp;CEI.Exceptions;</p><p><br /></p><p>function StringToSyntaxType(const AString: string): TSyntaxType;</p><p>var</p><p>&nbsp;AScriptType: TScriptType;</p><p>begin</p><p>&nbsp;for AScriptType in cScriptTypes do</p><p>&nbsp;&nbsp;if SameText(AString, AScriptType.FastScriptLanguageName) then</p><p>&nbsp;&nbsp;&nbsp;Exit(AScriptType.SyntaxType);</p><p>&nbsp;raise ECEIException.CreateFmt(&#39;Unexpected FastScript language name: &quot;%s&quot;&#39;, [AString]);&nbsp;//Do Not Localize</p><p>end;</p><p><br /></p><p>end.</p><p><br /></p><p><br /></p><p>getting error in new fastscript version </p><p>[dcc32 Error] CEIRADTool.Types.pas(15): E2003 Undeclared identifier: &#39;TSyntaxType&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(30): E2003 Undeclared identifier: &#39;stVB&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(31): E2003 Undeclared identifier: &#39;stCpp&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(32): E2003 Undeclared identifier: &#39;stJs&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(33): E2003 Undeclared identifier: &#39;stPascal&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(34): E2003 Undeclared identifier: &#39;stText&#39;</p><p>[dcc32 Error] CEIRADTool.Types.pas(37): E2005 &#39;TSyntaxType&#39; is not a type identifier</p><p>[dcc32 Error] CEIRADTool.Types.pas(47): E2005 &#39;TSyntaxType&#39; is not a type identifier</p><p>[dcc32 Fatal Error] CEIRADTool.UI.SearchPath.pas(140): F2063 Could not compile used unit &#39;CEIRADTool.Types.pas&#39;</p><p>my control penal version for fast report is in SS</p><div><div>
    <div>
        <a href="https://forum.fast-report.com/en/uploads/954/KYOMQ1THXKV4.png" rel="nofollow noopener" target="_blank">
            <img src="https://forum.fast-report.com/en/uploads/954/KYOMQ1THXKV4.png" alt="image" />
        </a>
    </div>
</div></div><p><br /></p>]]>
        </description>
    </item>
    <item>
        <title>How to call Memo.clear</title>
        <link>https://forum.fast-report.com/en/discussion/6147/how-to-call-memo-clear</link>
        <pubDate>Fri, 06 Nov 2009 11:13:25 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>viper</dc:creator>
        <guid isPermaLink="false">6147@/en/discussions</guid>
        <description><![CDATA[Hi all!<br />
Could anyone tell me how to call memo1.clear from my script?<br />
<br />
I have a Memo1:TMemo and Script:TfsScript...
<pre><code>Script := TfsScript.Create(Self);
  Script.SyntaxType := 'PascalScript';
  Script.Parent := fsGlobalUnit;
  Script.AddObject(Memo1.Name,Memo1);
  Script.AddClass(TMemo,TMemo.ClassParent.ClassName);
</code></pre>
<br />
I have the codeline &quot;Memo1.Clear;&quot; in my script.<br />
I get &quot;undeclared identifier&quot; on &quot;Clear&quot;..<br />
<br />
Is there any way to call Clear method 	directly without using TfsScript.AddMethod with a procedure like MemClear();?
<pre><code>procedure MemClear;
begin
  Form1.Memo1.Clear;
end;
</code></pre>
<br />
Regards]]>
        </description>
    </item>
    <item>
        <title>Dinamic height of MasterData</title>
        <link>https://forum.fast-report.com/en/discussion/17388/dinamic-height-of-masterdata</link>
        <pubDate>Thu, 03 Mar 2022 08:14:23 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>enkiduca</dc:creator>
        <guid isPermaLink="false">17388@/en/discussions</guid>
        <description><![CDATA[<p>MasterData elements each element has no value to display in the dataset. In this case, I set the item&#39;s visible state to False, so that line doesn&#39;t appear. How to adjust the height of MasterData dynamically knowing the rows that can be displayed?</p>]]>
        </description>
    </item>
    <item>
        <title>How to create or read JsonObject, JSonArray, JSonValue in FastScript</title>
        <link>https://forum.fast-report.com/en/discussion/17289/how-to-create-or-read-jsonobject-jsonarray-jsonvalue-in-fastscript</link>
        <pubDate>Fri, 10 Dec 2021 11:59:55 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>BorisL</dc:creator>
        <guid isPermaLink="false">17289@/en/discussions</guid>
        <description><![CDATA[<p>Hi,</p><p>I need to create a JSon structure in a script and return the JSon structure to my main program.</p><p>Thanks in advance.</p><p>Regards,</p>]]>
        </description>
    </item>
    <item>
        <title>How to access a object property of type TList&lt;&gt; (generic collection)?</title>
        <link>https://forum.fast-report.com/en/discussion/17249/how-to-access-a-object-property-of-type-tlist-generic-collection</link>
        <pubDate>Mon, 01 Nov 2021 19:37:09 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>dsonda</dc:creator>
        <guid isPermaLink="false">17249@/en/discussions</guid>
        <description><![CDATA[<p>I have some classes like this:</p><p>TClassA = class</p><p>end;</p><p>TClassB = class</p><p>  property Items: TList&lt;TClassA&gt; read FItems;</p><p>end;</p><p>I added an instance of TClassB to the script, but I can&#39;t use properties like Count or Items[index] to implement a loop.</p>]]>
        </description>
    </item>
    <item>
        <title>Support for Delphi 10.1 Berlin</title>
        <link>https://forum.fast-report.com/en/discussion/16628/support-for-delphi-10-1-berlin</link>
        <pubDate>Mon, 15 Mar 2021 19:23:00 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>jorgerh</dc:creator>
        <guid isPermaLink="false">16628@/en/discussions</guid>
        <description><![CDATA[<p>Hello,</p><p>I&#39;m creating a PDF file from a template with an OnBeforePrint event. The report script works fine in FR 4 in Delphi 2010,  but doesn&#39;t run in Delphi 10.1 Berlin with FastReport 5.</p><p>The code example is the following:</p><pre spellcheck="false">oExportFilter := TfrxExportPDF.Create(nil);
try
  if FReport.PrepareReport then //script runs in PrepareScript function inside for version 4
  begin
    //export FReport to PDF 
  end;
finally
  oExportFilter.Free;
end;
</pre><p><br /></p><p>I try this code with the same result:</p><pre spellcheck="false">with FReport do begin
Freport.ScriptText.Clear; //clear script text
Freport.ScriptText.Add(&#39;procedure PageFooter1OnBeforePrint(Sender: TfrxComponent);&#39;);
Freport.ScriptText.Add(&#39;Begin&#39;);
Freport.ScriptText.Add(&#39;Memotest.Color := $00FF0000;&#39;);
Freport.ScriptText.Add(&#39;end;&#39;);
Freport.ScriptText.Add(&#39;Begin&#39;);
Freport.ScriptText.Add(&#39;PageFooter1.OnbeforePrint :=&#39;+&#39;&#39;&#39;&#39;+&#39;PageFooter1OnBeforePrint&#39;+&#39;&#39;&#39;&#39;+&#39;;&#39;);
Freport.ScriptText.Add(&#39;end.&#39;);
FReport.ShowReport;
end;
</pre><p><br /></p><p>The only problem is the report script. Has Embarcadero Rad Studio 10.1 Berlin support for FastScript? How to validate it?</p><p>Thanks in advance.</p>]]>
        </description>
    </item>
    <item>
        <title>Method Pointer Types in FastScript</title>
        <link>https://forum.fast-report.com/en/discussion/16180/method-pointer-types-in-fastscript</link>
        <pubDate>Tue, 07 Jul 2020 10:44:37 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>thelvaci</dc:creator>
        <guid isPermaLink="false">16180@/en/discussions</guid>
        <description><![CDATA[<p>How to declare a new method pointer type in FastScript ? For example:</p><p><br /></p><p>type</p><p>   TMyProc = procedure(const AValue : String);</p><p>   TMyFunc = function : Boolean;</p><p><br /></p><p>I want to add TMyProc and TMyFunc types and use them in script. </p><p><br /></p><p>Is it possible ? If yes, how ?</p>]]>
        </description>
    </item>
    <item>
        <title>problem with fscript and fastreport</title>
        <link>https://forum.fast-report.com/en/discussion/15157/problem-with-fscript-and-fastreport</link>
        <pubDate>Tue, 15 Jan 2019 20:20:22 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>jugador1820</dc:creator>
        <guid isPermaLink="false">15157@/en/discussions</guid>
        <description><![CDATA[Hello:<br />
I get in touch with you because I have a problem with fasreport and fascript, to see if they can help me. I have some script written in my fastreport, which are well written, because clicking on execute script works, but when making the call from c ++ builder, it does not execute the script, it is skipped. I do not know if this query is well located here, so I apologize if it is not this area, and if it is here, which option I have to use for the script to work, because I've even tried with this code and it still does not work:<br />
frxReport1-&gt; EngineOptions-&gt; DestroyForms = false<br />
Thanks for everything<br />
a greeting]]>
        </description>
    </item>
    <item>
        <title>Implement an event in FS1.9 (parameter is interface)</title>
        <link>https://forum.fast-report.com/en/discussion/15123/implement-an-event-in-fs1-9-parameter-is-interface</link>
        <pubDate>Thu, 20 Dec 2018 13:29:24 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Roman_fs</dc:creator>
        <guid isPermaLink="false">15123@/en/discussions</guid>
        <description><![CDATA[How do I implement the ADOQuery.OnFetchComplete event when an Error type is defined as an interface in an ADODB unit?<br />
<br />
Regards<br />
<br />
Rumisek]]>
        </description>
    </item>
    <item>
        <title>Problem using IIF</title>
        <link>https://forum.fast-report.com/en/discussion/15051/problem-using-iif</link>
        <pubDate>Mon, 12 Nov 2018 09:18:17 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>lorenzob</dc:creator>
        <guid isPermaLink="false">15051@/en/discussions</guid>
        <description><![CDATA[Working on fastreport 6.2, I have to use fastscript within one of my projects.<br />
I then created a runtime instance and started everything as you see in this example:<br />
<br />
FScript:=TfsScript.create(nil);<br />
FScript.SyntaxType:='PascalScript';<br />
FScript.AddRTTI;<br />
<br />
<br />
It happens that when I go to do the evaluation of an expression that contains the IIF function, this always returns to me zero.<br />
For example, if I write:<br />
<br />
FScript.Evaluate(IIF(1&gt;0,1,2))<br />
<br />
This return always 0, and if I insert this:<br />
<br />
FScript.Evaluate(IIF(1&gt;0,1,2)+5)<br />
<br />
The result is 5.<br />
It seems that the IIF function is never resolved and always returns 0.<br />
I also tried to insert everything into a script so I can compile and execute it but the result is the same, the IIF function always returns 0.<br />
At the moment to solve this I simply created a new function that does the same thing as the IIF and for the moment it works, I wanted to understand why this happens, because using IIF in a Fastreport document, this works perfectly so I'm afraid the problem depends on how I use the Fastscript object!]]>
        </description>
    </item>
    <item>
        <title>variables in script</title>
        <link>https://forum.fast-report.com/en/discussion/14699/variables-in-script</link>
        <pubDate>Fri, 20 Apr 2018 21:01:10 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>gpiriou</dc:creator>
        <guid isPermaLink="false">14699@/en/discussions</guid>
        <description><![CDATA[Hello everyone, in my code delphi I write:
<pre><code>Â Â Â Â Â Â ....
Â Â Â Â Â Â MyReport.Script.Variables['GScriptKLE'] := 'true';
Â Â Â Â Â Â ....
</code></pre>
I now want to find th<br />
I create a variable in my report named &quot;'GScriptKLE'&quot;is variable in my report script:<br />
example:
<pre><code>Â Â Â Â Â Â ShowMessage('&lt;GScriptKLE&gt;');
</code></pre>
But it does not work<br />
<br />
question: how to pass a variable in delphi to test it in the script of a report.<br />
thanks.]]>
        </description>
    </item>
    <item>
        <title>Calling script functions</title>
        <link>https://forum.fast-report.com/en/discussion/14685/calling-script-functions</link>
        <pubDate>Tue, 17 Apr 2018 10:06:11 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Zaxomatic</dc:creator>
        <guid isPermaLink="false">14685@/en/discussions</guid>
        <description><![CDATA[Dear all,<br />
<br />
on TMSscripter, you can call a script functon using this sample syntax:<br />

<pre><code>ynAbort := myScript.ExecuteSubroutine('zBeforeDelete', [dmMain.DBConnection1, DataSet]);
</code></pre>
<br />
on FastScript, I can use CallFunction, but only with an array of variants as parameter.<br />
Is it possible to call a function passing a DataSet as parameter?<br />
<br />
Thanks in advance.<br />
<br />
<br />
Sergio]]>
        </description>
    </item>
    <item>
        <title>FastScript for Basic ARRAY</title>
        <link>https://forum.fast-report.com/en/discussion/14631/fastscript-for-basic-array</link>
        <pubDate>Thu, 22 Mar 2018 16:49:55 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Batchman</dc:creator>
        <guid isPermaLink="false">14631@/en/discussions</guid>
        <description><![CDATA[Hi<br />
<br />
I am porting my C++ script to Basic for an Android project.<br />
<br />
All is working 100% except the arrays.<br />
<br />
I need to create a few single dimension arrays in the script but they do not work.<br />
<br />
Dim dAGR_T = [0,1,2,3,4,5]<br />
Dim dAGR_A[6] As Int<br />
Dim oAGR(6) As Boolean<br />
<br />
none of the above work.  Either do not compile, think the oAGR(6) is a function etc etc.<br />
<br />
Basically I will have the arrays in the C++ part of the app.  Post the array data to the script end then execute the 'main' function in the script.  Once done I must copy the data back from the Script to the C++ app.<br />
<br />
Adie]]>
        </description>
    </item>
    <item>
        <title>CallMethod, AddMethod C++ Builder</title>
        <link>https://forum.fast-report.com/en/discussion/14142/callmethod-addmethod-c-builder</link>
        <pubDate>Sun, 30 Apr 2017 11:33:16 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>vesko_hard</dc:creator>
        <guid isPermaLink="false">14142@/en/discussions</guid>
        <description><![CDATA[Hi,<br />
<br />
I need any working example to use AddMethod,CalMethod<br />
<br />
need to write in main form memo from script, i''m confused with using methods...<br />
<br />
<br />
in sript i need to use simple print to memo like: memo(&quot;this is a test&quot;);<br />
<br />
<br />
in main unit i have:<br />
<br />
void __fastcall TForm1::memo(String s) {<br />
mmo1-&gt;Lines-&gt;Add(s);<br />
}<br />
<br />
<br />
any help(example) will be helpfull.<br />
<br />
Thanks in advance.]]>
        </description>
    </item>
    <item>
        <title>TChart Tool-Properties</title>
        <link>https://forum.fast-report.com/en/discussion/13985/tchart-tool-properties</link>
        <pubDate>Thu, 26 Jan 2017 10:40:37 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>fs1967</dc:creator>
        <guid isPermaLink="false">13985@/en/discussions</guid>
        <description><![CDATA[Hello,<br />
<br />
I want change some properties of a TChart/TfrxChartView object in the code section of the report: here properties of the section 'tools'...<br />
<br />
In the charteditor I can change/add/delete 'tools'-objects like the 'colorband'-tool..., but I want to change it in the code section and don't know the right property names.<br />
<br />
I can do it, if I use (in Delphi) a TeeChart component like this
<pre><code>type
Â Â TForm1 = class(TForm)
Â Â Â Â Chart1: TChart;
Â Â Â Â Series1: TBarSeries;
Â Â Â Â ChartTool1: TColorBandTool;
Â Â Â Â TrackBar1: TTrackBar;
Â Â Â Â procedure FormShow(Sender: TObject);
Â Â Â Â procedure TrackBar1Change(Sender: TObject);
Â Â private
Â Â public
Â Â end;

...

procedure TForm1.TrackBar1Change(Sender: TObject);
begin
Â Â ChartTool1.Gradient.Colors.Item[0].Offset:=0;
Â Â ChartTool1.Gradient.Colors.Item[1].Offset:=TrackBar1.Position / 100;
Â Â ChartTool1.Gradient.Colors.Item[2].Offset:=1;

Â Â ChartTool1.Gradient.StartColor:=clGreen;
Â Â ChartTool1.Gradient.MidColor:=clYellow;
Â Â ChartTool1.Gradient.EndColor:=clRed;
end;
</code></pre>
<br />
How can I do this in the code section?
<pre><code>procedure Page1OnBeforePrint(Sender: TfrxComponent);
begin
Â Â Chart1.ChartTool1...???
end;
</code></pre>
<br />
Thanks]]>
        </description>
    </item>
    <item>
        <title>use ODAC connect with embedded</title>
        <link>https://forum.fast-report.com/en/discussion/13970/use-odac-connect-with-embedded</link>
        <pubDate>Fri, 20 Jan 2017 02:46:48 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>ponghyper</dc:creator>
        <guid isPermaLink="false">13970@/en/discussions</guid>
        <description><![CDATA[Hi all<br />
How use ODAC Component (third party) embed connect to oracle db.<br />
I want to coding in design mode report.  <img src="style_emoticons/&lt;#EMO_DIR#&gt;/ph34r.gif&quot; style=&quot;vertical-align:middle&quot; emoid=&quot;:ph34r:&quot; border=&quot;0&quot; alt=&quot;ph34r.gif&quot; /&gt;" alt="&gt;" />]]>
        </description>
    </item>
    <item>
        <title>How to gaing access to a Property of an object in a TObjectList.</title>
        <link>https://forum.fast-report.com/en/discussion/13598/how-to-gaing-access-to-a-property-of-an-object-in-a-tobjectlist</link>
        <pubDate>Thu, 21 Jul 2016 19:47:17 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Juan C.Cilleruelo</dc:creator>
        <guid isPermaLink="false">13598@/en/discussions</guid>
        <description><![CDATA[I have the next classes into a File:<br />
<br />
TConfigCompProps = class(TObject)<br />
FCD_COMPONENT :string;<br />
FDS_COMPONENT :string;<br />
FQTY_QUANTITY :Double;<br />
FFRONT        :Integer;<br />
FDEPTH        :Integer;<br />
FTHICK        :Integer;<br />
FCD_COLOR     :string;<br />
FPACKAGE      :Integer;<br />
FPROGRAM_ID   :String;<br />
FPRI_UNIT     :Double;<br />
FEXPLANATION  :string;<br />
published<br />
property CD_COMPONENT :string  read FCD_COMPONENT write FCD_COMPONENT;<br />
property DS_COMPONENT :string  read FDS_COMPONENT write FDS_COMPONENT;<br />
property QTY_QUANTITY :Double  read FQTY_QUANTITY write FQTY_QUANTITY;<br />
property FRONT        :Integer read FFRONT        write FFRONT       ;<br />
property DEPTH        :Integer read FDEPTH        write FDEPTH       ;<br />
property THICK        :Integer read FTHICK        write FTHICK       ;<br />
property CD_COLOR     :string  read FCD_COLOR     write FCD_COLOR    ;<br />
property PACKAGE      :Integer read FPACKAGE      write FPACKAGE     ;<br />
property PROGRAM_ID   :String  read FPROGRAM_ID   write FPROGRAM_ID  ;<br />
property PRI_UNIT     :Double  read FPRI_UNIT     write FPRI_UNIT    ;<br />
property EXPLANATION  :string  read FEXPLANATION  write FEXPLANATION ;<br />
end;<br />
<br />
TConfigCompList = class(TObjectList)<br />
private<br />
protected<br />
procedure SetComponent(Index :Integer; Item: TConfigCompProps);<br />
function  GetComponent(Index :Integer):TConfigCompProps;<br />
public<br />
property Components[Index :Integer]:TConfigCompProps read GetComponent write SetComponent; default;<br />
published<br />
constructor Create; overload;<br />
function  Add(Obj :TConfigCompProps):Integer; overload;<br />
procedure Insert(Index :Integer; Obj :TConfigCompProps);<br />
end;<br />
<br />
<br />
In the Object from which I create the script I have the next declaration:<br />
<br />
FComponents    :TConfigCompList;<br />
property Component :TConf......<br />
<br />
I have a method in which I feed with data this structure:<br />
<br />
procedure TConfigCompOrm.FeedScriptObject;<br />
var Component  :TConfigCompOrm;<br />
ConfigComp :TConfigCompProps;<br />
begin<br />
FComponents := TConfigCompList.Create;<br />
for Component in FConfiguration do begin<br />
ConfigComp := TConfigCompProps.Create;<br />
ConfigComp.CD_COMPONENT := Component.CD_COMPONENT.AsString  ;<br />
ConfigComp.DS_COMPONENT := Component.DS_COMPONENT.AsString  ;<br />
ConfigComp.QTY_QUANTITY := Component.QTY_QUANTITY.AsExtended;<br />
ConfigComp.FRONT        := Component.FRONT.AsInteger        ;<br />
ConfigComp.DEPTH        := Component.DEPTH.AsInteger        ;<br />
ConfigComp.THICK        := Component.THICK.AsInteger        ;<br />
ConfigComp.CD_COLOR     := Component.CD_COLOR.AsString      ;<br />
ConfigComp.PACKAGE      := Component.PACKAGE.AsInteger      ;<br />
ConfigComp.PROGRAM_ID   := Component.PROGRAM_ID.AsString    ;<br />
ConfigComp.PRI_UNIT     := Component.PRI_UNIT.AsExtended    ;<br />
ConfigComp.EXPLANATION  := Component.EXPLANATION.AsString   ;<br />
FComponents.Add(Component);<br />
end;<br />
end;<br />
<br />
<br />
<br />
Before execute the Script I have the next adds....<br />
<br />
FeedScriptObject;<br />
{ add new class inherited from TObject }<br />
with Script.AddClass(TConfigCompProps, 'TObject') do begin<br />
{ Don't has public methods }<br />
end;<br />
<br />
with Script.AddClass(TConfigCompList, 'TObjectList') do begin<br />
{ add public methods }<br />
AddProperty('Count', 'Integer', GetProp, nil);<br />
{ Add Index property Components[Index :Integer]:TConfigCompProps }<br />
AddIndexProperty  ('Components', 'Integer', 'TConfigCompProps', CallMethod);<br />
AddDefaultProperty('Components', 'Integer', 'TConfigCompProps', CallMethod);<br />
end;<br />
<br />
Script.AddObject('Components', FComponents);<br />
<br />
<br />
and for the CallMethod I have the next :<br />
<br />
if      MethodName = 'COMPONENTS.GET' then Result := Integer(TConfigCompList(Instance).Components[Params[0]])<br />
else if MethodName = 'COMPONENTS.SET' then TStrings(Instance).Objects[Params[0]] := TConfigCompList(Integer(Params[1]))<br />
else if MethodName = 'STRINGS.GET'    then Result := TStrings(Instance).Strings[Params[0]]<br />
else if MethodName = 'STRINGS.SET'    then TStrings(Instance).Strings[Params[0]] := Params[1];<br />
<br />
The first Line is the important one.<br />
<br />
I use the next SCRIPT :<br />
<br />
begin<br />
ResultValue := Components[0].CD_COLOR;<br />
end.<br />
<br />
but when interpret this script I get and exception: &quot;Invalid Class typecast&quot;.<br />
<br />
Any one can help me about how should I declare the CallMethod for gain access to the Properties of the TConfigCompProps class?<br />
<br />
Thank you in advance!<br />
<br />
<br />
]]>
        </description>
    </item>
    <item>
        <title>Enter column of DetailData-band via script</title>
        <link>https://forum.fast-report.com/en/discussion/13080/enter-column-of-detaildata-band-via-script</link>
        <pubDate>Mon, 26 Oct 2015 16:16:22 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>BSchmidt</dc:creator>
        <guid isPermaLink="false">13080@/en/discussions</guid>
        <description><![CDATA[<br />
Hello from Germany,<br />
<br />
I try to create an organization-chart with fastreport 5. In some cases there are too much entries for a sub-organization. So I want to try to display them in two columns of a DetailData-band. The properties of the band are: ColumnGap 0,30, Columns 2 and ColumnWidth 10. The following code is used but only the first column of the band is used.<br />
<br />
Druckdaten1.First;<br />
Spalte := 1;<br />
while not Druckdaten1.Eof do<br />
begin<br />
if (&lt;Druckdaten1.&quot;Ebene1&quot;&gt; = 2) and (&lt;Druckdaten1.&quot;Ebene2&quot;&gt; = I) and (&lt;Druckdaten1.&quot;Ebene3&quot;&gt; &gt; 0)then<br />
if Spalte=1 then<br />
begin<br />
Engine.ShowBand(DetailData7);<br />
Inc(Spalte);<br />
end else<br />
begin<br />
Engine.NewColumn;<br />
Dec(Spalte);<br />
end;<br />
Druckdaten1.Next;<br />
end;<br />
<br />
Any help is welcome  [img]style_emoticons/&lt;#EMO_DIR#&gt;/rolleyes.gif&quot; style=&quot;vertical-align:middle&quot; emoid=&quot;:rolleyes:&quot; border=&quot;0&quot; alt=&quot;rolleyes.gif&quot; /&gt;

Best regards
Bernard[/img]]]>
        </description>
    </item>
    <item>
        <title>Accessing to variable</title>
        <link>https://forum.fast-report.com/en/discussion/12774/accessing-to-variable</link>
        <pubDate>Mon, 04 May 2015 11:42:48 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>emmanuele80</dc:creator>
        <guid isPermaLink="false">12774@/en/discussions</guid>
        <description><![CDATA[Hi to all, I'm creating a my own debugger using Delphi XE7 and Fast Script 1.9 and I need to be able to access the variables declared within procedures<br />
in the script.<br />
<br />
Below the example<br />
<br />
unit Unit1;<br />
<br />
interface<br />
<br />
uses<br />
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,<br />
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.fs_synmemo,<br />
FMX.fs_iinirtti, FMX.fs_imenusrtti, FMX.fs_idialogsrtti, FMX.fs_iextctrlsrtti,<br />
FMX.fs_iformsrtti, FMX.fs_igraphicsrtti, FMX.fs_iclassesrtti,<br />
FMX.fs_iinterpreter, FMX.StdCtrls, FMX.Layouts, FMX.Memo, FMX.fs_ipascal,<br />
FMX.Edit, FMX.ComboEdit, FMX.Controls.Presentation;<br />
<br />
type<br />
TmyMath = class(TObject)<br />
constructor create;<br />
function  oper1(x,y:Integer):integer;<br />
procedure oper2(x,y:Integer);<br />
public<br />
xx,yy:integer;<br />
end;<br />
TForm1 = class(TForm)<br />
fsScript1: TfsScript;<br />
fsClassesRTTI1: TfsClassesRTTI;<br />
fsGraphicsRTTI1: TfsGraphicsRTTI;<br />
fsFormsRTTI1: TfsFormsRTTI;<br />
fsExtCtrlsRTTI1: TfsExtCtrlsRTTI;<br />
fsDialogsRTTI1: TfsDialogsRTTI;<br />
fsMenusRTTI1: TfsMenusRTTI;<br />
fsIniRTTI1: TfsIniRTTI;<br />
fsSyntaxMemo1: TfsSyntaxMemo;<br />
Layout1: TLayout;<br />
Button1: TButton;<br />
Button2: TButton;<br />
Button3: TButton;<br />
Layout2: TLayout;<br />
Button4: TButton;<br />
Memo1: TMemo;<br />
fsPascal1: TfsPascal;<br />
GetVars: TGroupBox;<br />
ComboEdit1: TComboEdit;<br />
Edit1: TEdit;<br />
Button5: TButton;<br />
Button7: TButton;<br />
Label1: TLabel;<br />
Button6: TButton;<br />
procedure Button4Click(Sender: TObject);<br />
procedure fsSyntaxMemo1KeyDown(Sender: TObject; var Key: Word;<br />
var KeyChar: Char; Shift: TShiftState);<br />
procedure Button5Click(Sender: TObject);<br />
procedure FormCreate(Sender: TObject);<br />
procedure Button7Click(Sender: TObject);<br />
private<br />
{ Private declarations }<br />
public<br />
{ Public declarations }<br />
ApplicationInTerminate:Boolean;<br />
Function  GetProp(Instance: TObject; ClassType: TClass; const PropName: String): Variant;<br />
procedure SetProp(Instance: TObject; ClassType: TClass; const PropName: String; Value: Variant);<br />
Function  CallMethod(Instance: TObject; ClassType: TClass; const MethodName: String; var Params: Variant): Variant;<br />
end;<br />
<br />
var<br />
Form1: TForm1;<br />
<br />
implementation<br />
<br />
{$R *.fmx}<br />
<br />
//TmyMath
<hr />
constructor TmyMath.create;<br />
Begin<br />
xx:=0;<br />
yy:=0;<br />
End;<br />
<br />
function  TmyMath.oper1(x,y:Integer):integer;<br />
begin<br />
result:=x+y+xx+yy;<br />
end;<br />
<br />
procedure TmyMath.oper2(x,y:Integer);<br />
begin<br />
XX:=XX+2; YY:=YY+2;<br />
end;<br />
<br />
//Script functions and CallMethod
<hr />
Function TForm1.GetProp(Instance: TObject; ClassType: TClass; const PropName: String): Variant;<br />
Var PropertyName:String;<br />
begin<br />
Result := 0;<br />
PropertyName:=LowerCase(PropName);<br />
if (ClassType=TmyMath) and (PropertyName='xx') then<br />
Result := TmyMath(Instance).xx<br />
else  if (ClassType=TmyMath) and (PropertyName='yy') then<br />
Result := TmyMath(Instance).yy<br />
end;<br />
<br />
procedure TForm1.SetProp(Instance: TObject; ClassType: TClass; const PropName: String; Value: Variant);<br />
Var PropertyName:String;<br />
begin<br />
PropertyName:=LowerCase(PropName);<br />
if (ClassType=TmyMath) and (PropertyName='xx') then<br />
TmyMath(Instance).xx:=Value<br />
else  if (ClassType=TmyMath) and (PropertyName='yy') then<br />
TmyMath(Instance).yy:=Value;<br />
end;<br />
<br />
procedure TForm1.Button5Click(Sender: TObject);<br />
begin<br />
Try<br />
Edit1.Text:=fsScript1.Variables[ComboEdit1.Text];<br />
except<br />
End;<br />
end;<br />
<br />
procedure TForm1.Button7Click(Sender: TObject);<br />
begin<br />
ApplicationInTerminate:=True;<br />
Close;<br />
end;<br />
<br />
Function TForm1.CallMethod(Instance: TObject; ClassType: TClass; const MethodName: String; var Params: Variant): Variant;<br />
Var lowMethodName:String;<br />
begin<br />
Result:=0;<br />
lowMethodname:=lowerCase(MethodName);<br />
if ClassType=TmyMath then<br />
Begin<br />
if lowMethodName='oper1' then result:=TmyMath(Instance).oper1(Params[0],Params[1])<br />
else if lowMethodName='oper2' then TmyMath(Instance).oper2(Params[0],Params[1])<br />
End;<br />
if lowMethodName='applicationclosed' then   Result:=Application.Terminated or ApplicationInTerminate;<br />
End;<br />
<br />
procedure TForm1.FormCreate(Sender: TObject);<br />
begin<br />
ApplicationInTerminate:=False;<br />
end;<br />
<br />
procedure TForm1.fsSyntaxMemo1KeyDown(Sender: TObject; var Key: Word;<br />
var KeyChar: Char; Shift: TShiftState);<br />
begin<br />
fsSyntaxMemo1.Repaint<br />
end;<br />
<br />
//
<hr />
procedure TForm1.Button4Click(Sender: TObject);<br />
Var S:String; Y:Integer;<br />
begin<br />
if Button4.Text='STOP' then<br />
Begin<br />
fsScript1.Terminate;<br />
Button4.Text:='RUN';<br />
fsSyntaxMemo1.ReadOnly:=True;<br />
Memo1.Lines.Add('Stopped.');<br />
Exit;<br />
End;<br />
fsScript1.Clear;<br />
fsScript1.ClearRTTI;<br />
fsScript1.AddRTTI;<br />
fsScript1.AddClass(TForm, 'TForm');<br />
fsScript1.AddClass(TApplication, 'TApplication');<br />
fsScript1.AddObject('Self',Self);<br />
fsScript1.AddObject('Application',Application);<br />
fsScript1.AddObject('Form1', Form1);<br />
fsScript1.AddClass(TPosition,'TPersistent');<br />
with fsScript1.AddClass(TmyMath,'TObject') do<br />
Begin<br />
AddMethod('function oper1(x,y:Integer):integer', CallMethod);<br />
AddMethod('procedure oper2(x,y:Integer)', CallMethod);<br />
AddProperty('xx', 'integer', GetProp, SetProp);<br />
AddProperty('yy', 'integer', GetProp, SetProp);<br />
End;<br />
fsScript1.AddObject('Button1', Button1);<br />
fsScript1.AddObject('Button2', Button2);<br />
fsScript1.AddObject('Button3', Button3);<br />
fsScript1.AddObject('Button6', Button6);<br />
fsScript1.AddObject('Label1', Label1);<br />
fsScript1.AddMethod('function ApplicationClosed:Boolean;', CallMethod);<br />
fsScript1.Lines.Text:=fsSyntaxMemo1.Lines.Text;<br />
Memo1.Lines.Clear;<br />
if fsScript1.Compile then<br />
Begin<br />
fsSyntaxMemo1.ReadOnly:=True;<br />
fsScript1.Execute;<br />
Button4.Text:='STOP';<br />
Memo1.Lines.Add('Compile OK - running ...');<br />
End<br />
else<br />
Begin<br />
Button4.Text:='RUN';<br />
fsSyntaxMemo1.ReadOnly:=False;<br />
Memo1.Lines.Add(fsScript1.ErrorPos+' : '+fsScript1.ErrorMsg);<br />
Y:=StrToInt(Copy(fsScript1.ErrorPos,1,Pos(':',fsScript1.ErrorPos)-1))-1;<br />
fsSyntaxMemo1.BeginUpdate;<br />
fsSyntaxMemo1.SetPos(1,Y);<br />
fsSyntaxMemo1.Repaint;<br />
fsSyntaxMemo1.EndUpdate;<br />
fsScript1.Terminate;<br />
End;<br />
end;<br />
<br />
end.<br />
<br />
<br />
<br />
<br />
object Form1: TForm1<br />
Left = 0<br />
Top = 0<br />
Caption = 'Form1'<br />
ClientHeight = 667<br />
ClientWidth = 640<br />
FormFactor.Width = 320<br />
FormFactor.Height = 480<br />
FormFactor.Devices = [Desktop]<br />
OnCreate = FormCreate<br />
DesignerMasterStyle = 0<br />
object fsSyntaxMemo1: TfsSyntaxMemo<br />
Align = Client<br />
ShowHint = True<br />
TabOrder = 16<br />
Cursor = crIBeam<br />
BlockColor = claBlue<br />
BlockFontColor = claWhite<br />
CommentAttr.Fill.Color = claGreen<br />
CommentAttr.Font.Family = 'Courier New'<br />
CommentAttr.Font.Size = 14.000000000000000000<br />
CommentAttr.Font.Style = [fsItalic]<br />
KeywordAttr.Fill.Color = claNavy<br />
KeywordAttr.Font.Family = 'Courier New'<br />
KeywordAttr.Font.Size = 14.000000000000000000<br />
KeywordAttr.Font.Style = [fsBold]<br />
StringAttr.Fill.Color = claNavy<br />
StringAttr.Font.Family = 'Courier New'<br />
StringAttr.Font.Size = 14.000000000000000000<br />
TextAttr.Font.Family = 'Courier New'<br />
TextAttr.Font.Size = 14.000000000000000000<br />
Border.Width = 1<br />
FontSettings.Font.Family = 'Courier New'<br />
FontSettings.Font.Size = 14.000000000000000000<br />
GutterFill.Color = xFFEEC7C7<br />
Lines.Strings = (<br />
'Program Prova;'<br />
'var I:Integer;'<br />
'    S:String;'<br />
'    my:TmyMath;'<br />
''<br />
'procedure Button2Click(Sender: TObject);'<br />
'begin'<br />
' Button1.Position.X:=Button1.Position.X-1;'<br />
'end;'<br />
''<br />
'procedure Button3Click(Sender: TObject);'<br />
'begin'<br />
' Button1.Position.X:=Button1.Position.X+1;'<br />
'end;'<br />
''<br />
'procedure Button6Click(Sender: TObject);'<br />
'Var X,Y:Integer;'<br />
'begin'<br />
' X:=0;'<br />
' Y:=0;'<br />
' While ApplicationClosed=False do'<br />
'  Begin'<br />
'   if X mod 100=0 then'<br />
'    Application.ProcessMessages;'<br />
'   I:=I+1;'<br />
'   Y:=Y+my.oper1(1,2);'<br />
'   Label1.Text:=IntToStr(I)+'#39' - '#39'+IntToStr(Y);'<br />
'  End;'<br />
'end;'<br />
''<br />
'Begin'<br />
' S:='#39'Init...'#39';'<br />
' my:=TmyMath.Create;'<br />
' my.oper1(1,2);'<br />
' my.oper2(3,3);'<br />
' I:=my.xx;'<br />
' my.xx:=my.xx*3;'<br />
' I:=my.xx;'<br />
' Button1.Text:='#39'Prova'#39';'<br />
' Button2.OnClick:=<a href="https://forum.fast-report.com/en/profile/Button2Click" rel="nofollow">@Button2Click</a>;'<br />
' Button3.OnClick:=<a href="https://forum.fast-report.com/en/profile/Button3Click" rel="nofollow">@Button3Click</a>;'<br />
' Button6.OnClick:=<a href="https://forum.fast-report.com/en/profile/Button6Click" rel="nofollow">@Button6Click</a>;'<br />
'End.')<br />
ReadOnly = False<br />
SyntaxType = stPascal<br />
ShowFooter = True<br />
ShowGutter = True<br />
OnKeyDown = fsSyntaxMemo1KeyDown<br />
end<br />
object Layout1: TLayout<br />
Align = Top<br />
Size.Width = 640.000000000000000000<br />
Size.Height = 65.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 17<br />
object Button1: TButton<br />
Position.X = 8.000000000000000000<br />
Position.Y = 8.000000000000000000<br />
TabOrder = 0<br />
Text = 'Button1'<br />
end<br />
object Button2: TButton<br />
Position.X = 8.000000000000000000<br />
Position.Y = 32.000000000000000000<br />
Size.Width = 33.000000000000000000<br />
Size.Height = 22.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 1<br />
Text = '&lt;'<br />
end<br />
object Button3: TButton<br />
Position.X = 56.000000000000000000<br />
Position.Y = 32.000000000000000000<br />
Size.Width = 33.000000000000000000<br />
Size.Height = 22.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 2<br />
Text = '&gt;'<br />
end<br />
object Button7: TButton<br />
Position.X = 573.000000000000000000<br />
Position.Y = 3.000000000000000000<br />
Size.Width = 64.000000000000000000<br />
Size.Height = 30.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 3<br />
Text = 'Close'<br />
OnClick = Button7Click<br />
end<br />
object Label1: TLabel<br />
Position.X = 189.000000000000000000<br />
Position.Y = 11.000000000000000000<br />
Text = 'Label1'<br />
end<br />
end<br />
object Layout2: TLayout<br />
Align = Bottom<br />
Position.Y = 504.000000000000000000<br />
Size.Width = 640.000000000000000000<br />
Size.Height = 163.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 18<br />
object Button4: TButton<br />
Position.X = 8.000000000000000000<br />
Position.Y = 8.000000000000000000<br />
TabOrder = 0<br />
Text = 'RUN'<br />
OnClick = Button4Click<br />
end<br />
object Memo1: TMemo<br />
Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]<br />
Position.X = 9.000000000000000000<br />
Position.Y = 36.000000000000000000<br />
Size.Width = 328.000000000000000000<br />
Size.Height = 125.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 1<br />
end<br />
object GetVars: TGroupBox<br />
Position.X = 343.000000000000000000<br />
Position.Y = 8.000000000000000000<br />
Size.Width = 265.000000000000000000<br />
Size.Height = 73.000000000000000000<br />
Size.PlatformDefault = False<br />
Text = 'GetVars'<br />
TabOrder = 2<br />
object ComboEdit1: TComboEdit<br />
Touch.InteractiveGestures = [LongTap, DoubleTap]<br />
TabOrder = 1<br />
ItemHeight = 19.000000000000000000<br />
Items.Strings = (<br />
'I'<br />
'S'<br />
'my'<br />
'my.xx'<br />
'X'<br />
'Button6Click.X'<br />
'Y')<br />
ItemIndex = 0<br />
Text = 'I'<br />
Position.X = 64.000000000000000000<br />
Position.Y = 18.000000000000000000<br />
Size.Width = 193.000000000000000000<br />
Size.Height = 22.000000000000000000<br />
Size.PlatformDefault = False<br />
end<br />
object Edit1: TEdit<br />
Touch.InteractiveGestures = [LongTap, DoubleTap]<br />
TabOrder = 2<br />
Position.X = 64.000000000000000000<br />
Position.Y = 44.000000000000000000<br />
Size.Width = 193.000000000000000000<br />
Size.Height = 22.000000000000000000<br />
Size.PlatformDefault = False<br />
end<br />
object Button5: TButton<br />
Position.X = 8.000000000000000000<br />
Position.Y = 18.000000000000000000<br />
Size.Width = 49.000000000000000000<br />
Size.Height = 48.000000000000000000<br />
Size.PlatformDefault = False<br />
TabOrder = 3<br />
Text = 'Get?'<br />
OnClick = Button5Click<br />
end<br />
end<br />
object Button6: TButton<br />
Position.X = 104.000000000000000000<br />
Position.Y = 8.000000000000000000<br />
TabOrder = 3<br />
Text = 'Loop'<br />
end<br />
end<br />
object fsScript1: TfsScript<br />
SyntaxType = 'PascalScript'<br />
Left = 536<br />
Top = 16<br />
end<br />
object fsClassesRTTI1: TfsClassesRTTI<br />
Left = 304<br />
Top = 216<br />
end<br />
object fsGraphicsRTTI1: TfsGraphicsRTTI<br />
Left = 312<br />
Top = 224<br />
end<br />
object fsFormsRTTI1: TfsFormsRTTI<br />
Left = 320<br />
Top = 232<br />
end<br />
object fsExtCtrlsRTTI1: TfsExtCtrlsRTTI<br />
Left = 328<br />
Top = 240<br />
end<br />
object fsDialogsRTTI1: TfsDialogsRTTI<br />
Left = 336<br />
Top = 248<br />
end<br />
object fsMenusRTTI1: TfsMenusRTTI<br />
Left = 344<br />
Top = 256<br />
end<br />
object fsIniRTTI1: TfsIniRTTI<br />
Left = 352<br />
Top = 264<br />
end<br />
object fsPascal1: TfsPascal<br />
Left = 448<br />
Top = 89<br />
end<br />
end<br />
<br />
<br />
If I wish to access (i.e. to variable 'X') declared inside the script the compiler return Variable Unkown.<br />
<br />
Could you please help me?]]>
        </description>
    </item>
    <item>
        <title>Demo with inputs and outputs to delphi application</title>
        <link>https://forum.fast-report.com/en/discussion/11725/demo-with-inputs-and-outputs-to-delphi-application</link>
        <pubDate>Fri, 25 Apr 2014 16:41:26 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>teddy</dc:creator>
        <guid isPermaLink="false">11725@/en/discussions</guid>
        <description><![CDATA[here is my code for inputs and outputs.....<br />
When i run the script, i get an error 'incompatible types' then i run it a 2nd time, there is no error?<br />
What is causing the incompatible types ERROR?<br />
<br />
{Form has Edit1, Edit2, Memo1, Label4, Button<br />
}<br />
<br />
<br />
procedure TForm2.bRunClick(Sender: TObject);<br />
var<br />
a,b: integer;<br />
begin<br />
label4.Caption := '0';<br />
fsScript1.Clear;<br />
fsScript1.AddVariable('a','Integer', a);<br />
fsScript1.AddVariable('b','Integer', [img]style_emoticons/&lt;#EMO_DIR#&gt;/cool.gif&quot; style=&quot;vertical-align:middle&quot; emoid=&quot;B)&quot; border=&quot;0&quot; alt=&quot;cool.gif&quot; /&gt;;

fsScript1.Lines := Memo1.Lines;
fsScript1.Parent := fsGlobalUnit;

if fsScript1.Compile then begin
fsScript1.Execute;
Label4.Caption := IntToStr(fsScript1.Variables);
end else   // execute if compilation was succesfull
Label4.Caption := fsScript1.ErrorMsg; //show an error message

end;

function TForm2.fsScript1GetVarValue(VarName: string; VarTyp: TfsVarType;
OldValue: Variant): Variant;
begin
if VarName='a' then
Result := StrToInt(Edit1.Text) else
if VarName='b' then
Result := StrToInt(Edit2.Text);
end;

{script code in memo1
var
i : integer;
begin
i := a + b;
end.
}[/img]]]>
        </description>
    </item>
    <item>
        <title>any way to change the editor font in fastscript?</title>
        <link>https://forum.fast-report.com/en/discussion/12533/any-way-to-change-the-editor-font-in-fastscript</link>
        <pubDate>Fri, 23 Jan 2015 05:36:54 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>bartpop</dc:creator>
        <guid isPermaLink="false">12533@/en/discussions</guid>
        <description><![CDATA[I am not a fan of the default font it uses, how can it be changed?]]>
        </description>
    </item>
    <item>
        <title>FastScript 1.6 install on Kylix3</title>
        <link>https://forum.fast-report.com/en/discussion/851/fastscript-1-6-install-on-kylix3</link>
        <pubDate>Mon, 21 Jun 2004 14:06:46 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>rolfa</dc:creator>
        <guid isPermaLink="false">851@/en/discussions</guid>
        <description><![CDATA[ Can you help me to install on Kylix3 delphi and C++<br />
Thank You]]>
        </description>
    </item>
    <item>
        <title>Create fsScriptEngine at runtime?</title>
        <link>https://forum.fast-report.com/en/discussion/11641/create-fsscriptengine-at-runtime</link>
        <pubDate>Mon, 07 Apr 2014 15:42:36 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Johan Rydmark</dc:creator>
        <guid isPermaLink="false">11641@/en/discussions</guid>
        <description><![CDATA[Hi!<br />
<br />
We use FastReport and FastScript inside, but we now have a need to call small external user scripts. My plan was to use FastScript engine in a unit, creating it all at runtime i.e. no forms involved at all. I can't find any examples at all and I always get an exception when I use fsScriptEngine.Create(...);<br />
<br />
Is it possible, any examples or hints? Documentation does not help at all!<br />
<br />
Thanks for any help!<br />
<br />
Cheers,<br />
Johan]]>
        </description>
    </item>
    <item>
        <title>System Units</title>
        <link>https://forum.fast-report.com/en/discussion/8985/system-units</link>
        <pubDate>Mon, 26 Mar 2012 02:39:24 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Marcio Garcia</dc:creator>
        <guid isPermaLink="false">8985@/en/discussions</guid>
        <description><![CDATA[Dear all,<br />
<br />
I am looking for how to add the systems units to the scripts.<br />
<br />
I am working with Delphi 2010. I would like to run the example bellow.<br />
<br />
The MIN is a function that there is located in MATH system unit.<br />
<br />
Anybory knows if  is it possible to add the system units to the fsScript tool?<br />
<br />
Script Example:<br />
<br />
begin<br />
ShowMessage(FloatToStr(min(10.5,50)));<br />
end.<br />
<br />
Best regards,<br />
<br />
Marcio Pereira Garcia]]>
        </description>
    </item>
    <item>
        <title>Fatal Error F2051 when compiling under Delphi XE6 and XE7</title>
        <link>https://forum.fast-report.com/en/discussion/12377/fatal-error-f2051-when-compiling-under-delphi-xe6-and-xe7</link>
        <pubDate>Mon, 10 Nov 2014 21:36:39 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Peter M??ller</dc:creator>
        <guid isPermaLink="false">12377@/en/discussions</guid>
        <description><![CDATA[Hallo,<br />
<br />
I get the following error when I compile my project created with Delphi XE2 in XE6 and XE7:<br />
German message:<br />
[dcc32 Fataler Fehler] fs_isysrtti.pas(581): F2051 Unit fs_iinterpreter wurde mit einer unterschiedlichen Version von fs_isysrtti.TfsSysFunctions compiliert<br />
Translated to english:<br />
[dcc32 fatal error] fs_isysrtti.pas(581): F2051 Unit fs_iinterpreter was compiled with a different version of fs_isysrtti.TfsSysFunctions<br />
<br />
I use Fast Report XE6 (4.15.10) and XE7 (Version 5.1.5) delivered with Delphi.<br />
<br />
What can I do?<br />
<br />
Thanks<br />
<br />
Peter<br />
]]>
        </description>
    </item>
    <item>
        <title>FastScript for C++-Builder XE7</title>
        <link>https://forum.fast-report.com/en/discussion/12334/fastscript-for-c-builder-xe7</link>
        <pubDate>Tue, 28 Oct 2014 09:26:13 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>Rutger S.</dc:creator>
        <guid isPermaLink="false">12334@/en/discussions</guid>
        <description><![CDATA[Hello,<br />
<br />
When can we expect FastScript for XE7?<br />
<br />
Best regards,<br />
<br />
Rutger<br />
]]>
        </description>
    </item>
    <item>
        <title>Instantiation problem</title>
        <link>https://forum.fast-report.com/en/discussion/12092/instantiation-problem</link>
        <pubDate>Tue, 02 Sep 2014 15:29:02 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>NaturalB0rnScripter</dc:creator>
        <guid isPermaLink="false">12092@/en/discussions</guid>
        <description><![CDATA[Hi All,<br />
<br />
Currently I am researching the possibilities with FastScript.<br />
The problem I'm running in to is the following.<br />
<br />
I have a Class (which is not a default delphi component)<br />
And that said Class is for the ease of this example now named TAp and is added by the following code:<br />

<pre><code>with fsGlobalUnit.AddClass(TAp, 'TObject') do
Â Â  begin
Â Â  { functions &amp; procedures }
Â Â Â Â Â Â  AddMethod('function FindSAP(DevName: String)', CallTapMethod);
Â Â  end;
fsGlobalUnit.AddObject('App', TAp.NewInstance);
fsGlobalUnit.AddType('App', fvtClass);

with fsGLobalUnit.AddClass(TSap, 'TSObject') do
Â Â  begin
Â Â  { functions &amp; procedures }
Â Â Â Â Â Â  AddMethod('function DoSomething():Boolean', CallYMethod);
Â Â  end;
fsGlobalUnit.AddObject('TSap', TSap.NewInstance);
fsGlobalUnit.AddType('TSap', fvtClass);
</code></pre>
<br />
my CallTapMethod is implemented like this.
<pre><code>function TScriptHelper.CallTapMethod(Instance: TObject; ClassType: TClass;
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  const MethodName: String; var Params: Variant): Variant;
begin
if (MethodName = 'FindSAP') then
Â Â Â Â begin
Â Â Â Â Â Â result := Integer(_uAp.TAp.Create().FindSAP(AnsiString(params)));
Â Â Â Â end
end;
</code></pre>
Which points to the function that should be called.<br />
When calling the function FindSAP from the FScript with the given parameter like this.
<pre><code>var
Â Â Â Â x: TSap;
begin
Â Â Â Â x:=App.FindSAP('value');
end;
</code></pre>
Where value is just a normal string. I receive a message from FastScript. Stating that I have incompatible types.<br />
Lets make it clear that the function FindSAP should return an instantiated object. (which it does when normally calling the function straight from delphi).<br />
And ofcourse that fact that i Add the fsGlobalUnit to the FScript component via fsScript1.Parent := fsGlobalUnit;<br />
<br />
The message i receive is the following: Incompatible types TSap, String.<br />
<br />
I am unsure whats going on here. As far as I know I have implemented everything necessary and would like to have some help or at least a push in the right direction<br />
<br />
]]>
        </description>
    </item>
    <item>
        <title>callmethod</title>
        <link>https://forum.fast-report.com/en/discussion/4050/callmethod</link>
        <pubDate>Thu, 27 Mar 2008 12:20:07 +0000</pubDate>
        <category>FastScript</category>
        <dc:creator>anmisoft</dc:creator>
        <guid isPermaLink="false">4050@/en/discussions</guid>
        <description><![CDATA[hi, i am a problem with callmethod function.<br />
<br />
Example:<br />
<br />
SsCRIPT.AddMethod('function Anf_ValorT(Fieldname:string):Variant',CallMethod,EmptyStr,EmptyStr);<br />
<br />
and callmethod is:<br />
<br />
function CallMethod(Instance: TObject; ClassType: TClass; const<br />
MethodName: String ; var Params: Variant): Variant;<br />
<br />
<br />
<br />
function CallMethod(Instance: TObject; ClassType: TClass;<br />
const MethodName: String ; var Params: Variant): Variant;<br />
begin<br />
<br />
if MethodName = 'ANF_VALORT' then<br />
result:=Anf_valorT(Params[0])<br />
end;<br />
<br />
Error Delphi: incompatible types: method pointer and regular procedure<br />
<br />
Why?]]>
        </description>
    </item>
   </channel>
</rss>
