Simplicty and flexibility!


Function::Internal

LabelExecDQL
LabelExecDQL("LabelName",DataEntryValue1,DataEntryValue3,DataEntryValue3,DataEntryValue4,"ExportFilePath")
LabelExecDQL("DQLLabel","","","","","")
retval := LabelExecDQL("MyDQLLabel",Field1,"","","","C:\export.txt")


LabelExecDQL() is part of the ExecDQL library and is complimentary to MemoExecDQL() etc. LabelExecDQL will execute the DQL script that is stored in a label in a document.

One of the challenges with ExecDQL is to store the DQL in the form from where you want to execute it. Especially if the DQL is of any size.

ExecDQL is limited to 255 charcters and even though it was much improved with the introduction of ESCAPE characters, it is still quite limited as you have to write the DQL on one line in a derivation etc.

So the Big Hitter in the ExecDQL department has been MemoExecDQL(). It is brilliant as you use the strong DE relational behaviour in combination with virtual Memo fields to lookup the DQL from a DQL storage (table) anywhere in your app. It is great since you can share a DQL between different parts of your APP, but it is limiting in the way you have to build the Relational structure and as well edit the DQL out of context.

With LabelExecDQL you can simply write the DQL into the form as a text (label) and then execute it by reference it via its Object Name.

Obviously its not very nice to have a big ugly DQL written into your form, but that is easily resolved by executing a SetState("LabelName",0) somewhere on startup.

Parameters


MemoContianingDQL: (String)

Object name for the Label  that contain the DQL you want to execute always in "" - "Labelname"

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: (String)

There is several different output modes for LabelExecDQL.

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: LabelExecDQL("DQL","","","","","C:\test.txt","Layout") or : LabelExecDQL("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. LabelExecDQL("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 the Label where the layout format for the DQL is stored. Always in "" - "Layout"

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}]

.page -- will send HTML page break.

Returns/Result


Nothing

Examples


Reference

See Also


ExecDQL
MemoExecDQL
FileExecDQL

On the forum about LabelExecDQL

Custome TableView/FormView Toggle, fun with LabelExecDQL, SetClass, Custom Menu, Custom Toolbar, MoveObject etc...

Since we made you cry over the weekend, and your "challenge" is an interesting one that give us plenty of opportunity to confuse you and everyone else even further we couldn't stop ourselves from putting aside some time and make a sample/solution/chal...

Product: Dataease [{8}]FIVE. Written by DataEase 13/07/15 at 19:09:21

Re:Custome TableView/FormView Toggle, fun with LabelExecDQL, SetClass, Custom Menu, Custom Toolbar, MoveObject etc...

Thank you firstly.&nbsp; Having an example to work off helps masssively.I managed to get the saving corrrect record in table view sussed pretty quick, having a temporary variable with the exact same name as a field confused me as I didn't reali...

Product: Dataease [{8}]FIVE. Written by Simon B 15/07/15 at 10:55:41

Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

this is all very nice.Does it work with "any" as well? Examplefor PERSONALwith( Austritt &gt;= data-entry Field1 orAustritt = blank ) andEintritt &lt;= data-entry Field1 andFreigabe = "J"and<...

Product: Dataease [{8}]FIVE. Written by Rainer 19/03/17 at 19:44:04

Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Of course. You ca do anything you can in "traditional" DQL and then some.It is however very awkward to include tags that [{any ERFASSUNG with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR}]So the best cause of action is simp...

Product: Dataease [{8}]FIVE. Written by DataEase 19/03/17 at 19:49:36

Re:Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

I tried to combine&nbsp;MemoExecDQL(DQL,von,"","","","Web:Default,1",Body) withretval := MemoExecDQL(any DQL with DQLnr=0003 DQL,data-entry field1,"","","","").but the output I get only the group and not the item lines. see pdf 2...

Product: Dataease [{8}]FIVE. Written by Rainer 31/03/17 at 10:49:37

Re:Re:Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

The problem is the multi-view that is generated.We base ExecDQL on the internal multiview in PRISM which is dynamic and extremly flexible.When you add a dimension you add another level.A dimention is a relational action like<br...

Product: Dataease [{8}]FIVE. Written by DataEase 31/03/17 at 14:31:11

Re:Re:Re:Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

I fire&nbsp;a "control" DQL that fire both DQLs withMemoExecDQL(DQL,von,"","","","Web:Default,1",Body)define "retval" text .retval := MemoExecDQL(any DQL with DQLnr=0003 DQL,data-entry field1,"","","","")....

Product: Dataease [{8}]FIVE. Written by Rainer 31/03/17 at 16:45:35

Re:Re:Re:Re:Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

MemoExecDQL is a function and each function is self-contained.Each of these could produce their own output. There is no "cross-over" between them and it is no voodoo or magic.When you call the MemoExecDQL it will do its job with the ar...

Product: Dataease [{8}]FIVE. Written by DataEase 31/03/17 at 17:01:26

On the blog about LabelExecDQL

New Function in 8,1 - LabelExecDQL() - Execute the Script stored in a label (Ver. 8.1.0.1521)

We are rushing ahead and the full documentation will follow, but for those of you that have embraced the ExecDQL class have come across some challenges. ExecDQL() the normal PRISM function is limited to 255 and if you want to write the DQL dir...

Product: Dataease [{8}]FIVE. Written by DataEase 01/04/14 at 16:12:14

Re:New Function in 8,1 - LabelExecDQL() - Execute the Script stored in a label (Ver. 8.1.0.1521)

Remember when calling a LabelExecDQL() that you are reading a GUI object not a PRISM column.This means that the name of the object needs to be in "" ex. LabelExecDQL("MyDQL","","","","","")&nbsp;You can rename a label by right-clic...

Product: Dataease [{8}]FIVE. Written by DataEase 24/04/14 at 08:49:04

Custome TableView/FormView Toggle, fun with LabelExecDQL, SetClass, Custom Menu, Custom Toolbar, MoveObject etc...

Downlaod Sample! We had a request the other day about manip...

Product: Dataease [{8}]FIVE. Written by DataEase 13/07/15 at 16:48:31

New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Download Sample! Not all of us has got to grips with the concept of ExecDQL so we have taken some...

Product: Dataease [{8}]FIVE. Written by DataEase 17/03/17 at 17:09:04

Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

this is all very nice.Does it work with "any"&nbsp;as well?&nbsp;Examplefor PERSONAL with ( Austritt &gt;= data-entry Field1 or Austritt = blank ) and Eintritt &lt;= data-entry&nbsp;Field1&...

Product: Dataease [{8}]FIVE. Written by Rainer 17/03/17 at 21:12:27

Re:Re:New Sample : ExecDQL, LabelExecDQL, MemoExecDQL Showcased and explained!!!

Of course. You ca do anything you can in "traditional" DQL and then some. It is however very awkward to include tags that [{any ERFASSUNG with ( Tag = Field1 and MANR = PERSONAL MANR ) BewegungsartNR}] So the best cause of action is...

Product: Dataease [{8}]FIVE. Written by DataEase 19/03/17 at 20:31:09


dg3_HelpView