MemoExecDQL is the most used ExecDQL function simply because you can make your own editor form in an application where you store all your DQLs and then you transfere them to the form where they are needed via a simple lookup to a virtual memo field.
When it is looked up in the virtual memo field, you can simply execute it in the form via MemoExecDQL().
You can execute a DQL up to 64k in length this way.
MemoContianingDQL: (Field)
Field name (Memo field) that contain the DQL you want to execute.
Data-Entry Field1: (String)
This is the parameter that you can reference inside the DQL script as Data-Entry field1.
Data-Entry Field2: (String)
This is the parameter that you can reference inside the DQL script as Data-Entry field2.
Data-Entry Field3: (String)
This is the parameter that you can reference inside the DQL script as Data-Entry field3.
Data-Entry Field4: (String)
This is the parameter that you can reference inside the DQL script as Data-Entry field4.
Output: (Field)
There is several different output modes for MemoExecDQL.
File: (Default)
If you use the reserved keyword file: or refrain from using a reserved keyword in the Output argument the argument will be interpreted as a text file and the export will be saved in this file name.
ex: MemoExecDQL(DQL,"","","","","C:\test.txt",Layout) or : MemoExecDQL(DQL,"","","","","file:C:\test.txt",Layout)
Web:
This is the HTML mode. The output will now be interpreted as HTML and you can either Print it or Preview the output in the IE object. When using the Web: keyword you have extra formatting.
Web:<printer>,<mode> ex. MemoExecDQL(DQL,"","","","","web:Default,1",Layout) -- this will preview the Result in the IE object.
<printer> -- Default, Printer1..Printer4, Actual name of printer. -- The default printer in WIndows will be changed to this printer.
<mode> -- 0,1 - Preview, 2 - Print Directly to printer without dialog, 3 - printer dialogue.
PDF:
Print directly to PDF. PDF:<filename>. Ex. MemoExecDQL(DQL,"","","","","PDF:c:\test\mypdf.pdf",Layout)
Memo:
Will put the output directly into a Memo GUI control in the active form. If the GUI control is a WebField it will display HTML correctly.
PS! If you output formatted text to a text memo, remember to use COURIER or another fixed position font.
Layout:
This is a Memo where the layout format for the DQL is stored. Format:
Report Header: Free text that will come at the beginning of the report. Never repeated!
.header.
,items
.footer
.end
Tags: [{column name}]
EkstraTags:
Position: LRW ex. L30, R20, C10
[{Price:R15}] -- print Price R oriented 15 spaces.
[{Price:R15 sum}] -- print the sum off Price listed in List Records Price : sum ;
Integer to float European: [{var1:F999 999 999,99}]
Integer to float C type: [{var2:F999999999.99}]
Integer fixed leading 0s: [{var3:F00000}]
Integer to with fixed length: [{var4:F99999999}]
Float just formatet: [{var5:F999 999 999,99}]
Float to Integer: [{var6:F99999}]
Float C more dec: [{var7:F999999.999999}]
Float European more dec: [{var7:F999999,999999}]
When combining formatting and statistical the statistical need to come last.
[{Price:R15 Sum}] or [{Price:F99999.99 sum}] or [{CustomerNr:L4 Count}]
.page -- will send HTML page break.
<br><br><pre></pre>
If you use this tag around your output, the resulting code will be treated as TEXT i.e. space, line feed and position will be honoured (DFD mode)
Example 1: Simple Order printed to Memo.
DQL:
for OrderHead with OrderNr = Data-entry field1 ;
list records
OrderNr ;
Customer ;
Address ;
Address1 ;
PostCode ;
Town ;
Terms;
OrderTotal ;
DueDate .
for OrderLine
list records
Description ;
Price ;
Count ;
LineTotal : item sum ;
LineTotal*0.2 : sum ;
LineTotal+LineTotal* 0.2 : sum .
end
Body:
.header
Order nr.: [{OrderNr}]
To:
[{Customer}]
[{Address}]
[{Address1}]
[{PostCode}]
[{Town}]
Terms: [{Terms}] days. Due date: [{DueDate}]
Description Price0 Count LineTotal
-----------------------------------------------------------------------------------------------------
.items
[{Description:L40}][{Price:R10}][{Count:R8}][{LineTotal:R17}]
.footer
-----------------------------------------------------------------------------------------------------
OrderTotal : [{LineTotal:R50 sum}]
=====================================================================================================
.end
End of report....
Button Code:
MemoExecDQL(DQL,OrderNr,"","","","Memo:Result",Body)
GetValue()
ExecDQL()
LabelExecDQL()
TextExecDQL()
StringEscape()
Product: Dataease [{8}]FIVE. Written by Graham Brown 09/03/14 at 17:48:31
Product: Dataease [{8}]FIVE. Written by DataEase 10/03/14 at 09:33:05
Product: Dataease [{8}]FIVE. Written by Graham Brown 22/10/14 at 13:23:46
Product: Dataease [{8}]FIVE. Written by DataEase 22/10/14 at 19:30:38
Product: Dataease [{8}]FIVE. Written by Rainer 08/11/14 at 09:46:04
Product: Dataease [{8}]FIVE. Written by DataEase 10/11/14 at 06:33:59
Product: Dataease [{8}]FIVE. Written by Rainer 10/11/14 at 11:35:40
Product: Dataease [{8}]FIVE. Written by Rainer 10/11/14 at 11:42:25
Product: Dataease [{8}]FIVE. Written by Rainer 10/11/14 at 21:47:54
Product: Dataease [{8}]FIVE. Written by DataEase 11/11/14 at 09:07:58
Product: Dataease [{8}]FIVE. Written by DataEase 11/11/14 at 09:14:39
Product: Dataease [{8}]FIVE. Written by DataEase 11/11/14 at 09:16:02
Product: Dataease [{8}]FIVE. Written by Tor Nerland 12/11/14 at 09:42:53
Product: Dataease [{8}]FIVE. Written by DataEase 12/11/14 at 10:53:54
Product: Dataease [{8}]FIVE. Written by Rainer 17/11/14 at 15:33:54
Product: Dataease [{8}]FIVE. Written by Rainer 17/11/14 at 16:09:08
Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup. 17/11/14 at 18:23:26
Product: Dataease [{8}]FIVE. Written by Rainer 19/11/14 at 14:20:03
Product: Dataease [{8}]FIVE. Written by DataEase Tech Sup. 19/11/14 at 19:44:12
Product: Dataease [{8}]FIVE. Written by Rainer 20/11/14 at 11:09:59
Product: Dataease [{8}]FIVE. Written by Rainer 20/11/14 at 11:58:12
Product: Dataease [{8}]FIVE. Written by Rainer 26/11/14 at 07:50:42
Product: Dataease [{8}]FIVE. Written by DataEase 26/11/14 at 09:23:28
Product: Dataease [{8}]FIVE. Written by Rainer 26/11/14 at 14:35:03
Product: Dataease [{8}]FIVE. Written by DataEase 26/11/14 at 14:35:52
Product: Dataease [{8}]FIVE. Written by George Washington 07/01/15 at 08:07:23
Product: Dataease [{8}]FIVE. Written by Kensington 07/01/15 at 11:11:56
Product: Dataease [{8}]FIVE. Written by DataEase 07/01/15 at 13:01:23
Product: Dataease [{8}]FIVE. Written by George Washington 08/01/15 at 10:12:10
Product: Dataease [{8}]FIVE. Written by Arul 26/02/15 at 07:17:12
Product: Dataease [{8}]FIVE. Written by DataEase 26/02/15 at 07:19:06
Product: Dataease [{8}]FIVE. Written by Arul 26/02/15 at 14:36:05
Product: Dataease [{8}]FIVE. Written by DataEase 26/02/15 at 14:36:29
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 27/02/15 at 18:40:45
Product: Dataease [{8}]FIVE. Written by DataEase 28/02/15 at 14:18:41
Product: Dataease [{8}]FIVE. Written by DataEase 07/07/15 at 14:22:43
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 07/07/15 at 14:48:37
Product: Dataease [{8}]FIVE. Written by DataEase 07/07/15 at 16:48:19
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 08/07/15 at 13:32:19
Product: Dataease [{8}]FIVE. Written by DataEase 08/07/15 at 13:45:45
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 27/06/16 at 08:04:12
Product: Dataease [{8}]FIVE. Written by DataEase 29/06/16 at 18:17:28
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 06/07/16 at 14:08:15
Product: Dataease [{8}]FIVE. Written by DataEase 06/07/16 at 19:37:56
Product: Dataease [{8}]FIVE. Written by DataEase 06/07/16 at 19:53:06
Product: Dataease [{8}]FIVE. Written by Thomas 19/08/16 at 21:22:40
Product: Dataease [{8}]FIVE. Written by DataEase 19/08/16 at 21:25:42
Product: Dataease [{8}]FIVE. Written by Tor Einar Nerland 05/01/17 at 09:44:29
Product: Dataease [{8}]FIVE. Written by Rainer 19/03/17 at 19:44:04
Product: Dataease [{8}]FIVE. Written by DataEase 19/03/17 at 19:49:36
Product: Dataease [{8}]FIVE. Written by Rainer 31/03/17 at 10:49:37
Product: Dataease [{8}]FIVE. Written by DataEase 31/03/17 at 14:31:11
Product: Dataease [{8}]FIVE. Written by Rainer 31/03/17 at 16:45:35
Product: Dataease [{8}]FIVE. Written by DataEase 31/03/17 at 17:01:26
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 28/09/18 at 15:31:10
Product: Dataease [{8}]FIVE. Written by DataEase 01/10/18 at 18:24:20
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 02/10/18 at 18:37:48
Product: Dataease [{8}]FIVE. Written by DataEase 04/10/18 at 17:41:13
Product: Dataease [{8}]FIVE. Written by afonso santos 22/10/19 at 01:05:41
Product: Dataease [{8}]FIVE. Written by DataEase 25/10/19 at 10:58:17
Product: Dataease [{8}]FIVE. Written by afonso santos 29/10/19 at 00:34:47
Product: Dataease [{8}]FIVE. Written by DataEase 29/10/19 at 16:05:57
Product: Dataease [{8}]FIVE. Written by afonso santos 25/03/20 at 23:26:47
Product: Dataease [{8}]FIVE. Written by DataEase 27/03/20 at 14:29:18
Product: Dataease [{8}]FIVE. Written by afonso santos 27/03/20 at 23:57:26
Product: Dataease [{8}]FIVE. Written by DataEase 28/03/20 at 14:26:30
Product: Dataease [{8}]FIVE. Written by afonso santos 28/03/20 at 20:08:46
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 04/07/20 at 09:16:32
Product: Dataease [{8}]FIVE. Written by DataEase 06/07/20 at 23:21:27
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 07/07/20 at 11:30:35
Product: Dataease [{8}]FIVE. Written by DataEase 17/07/20 at 13:41:08
Product: Dataease [{8}]FIVE. Written by afonso santos 12/12/21 at 11:23:50
Product: Dataease [{8}]FIVE. Written by afonso santos 12/12/21 at 11:34:38
Product: Dataease [{8}]FIVE. Written by Paul Cheeseman 15/12/21 at 13:15:31
Product: Dataease [{8}]FIVE. Written by DataEase 01/03/13 at 13:36:04
Product: Dataease [{8}]FIVE. Written by DataEase 05/06/15 at 18:55:35
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 06/06/15 at 01:41:39
Product: Dataease [{8}]FIVE. Written by 06/06/15 at 01:41:39
Product: Dataease [{8}]FIVE. Written by DataEase 07/07/15 at 11:49:54
Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 07/07/15 at 14:36:56
Product: Dataease [{8}]FIVE. Written by DataEase 07/07/15 at 15:41:00
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 25/10/16 at 10:31:48
Product: Dataease [{8}]FIVE. Written by Marco Marchesi 25/10/16 at 11:51:39
Product: Dataease [{8}]FIVE. Written by DataEase 17/03/17 at 17:09:04
Product: Dataease [{8}]FIVE. Written by Rainer 17/03/17 at 21:12:27
Product: Dataease [{8}]FIVE. Written by DataEase 19/03/17 at 20:31:09