Administration System initialization Report settings Macros Macro definition Macro step - robinfeng/beashelp GitHub Wiki

宏步骤



Any number of macro steps can be stored per macro. A macro step determines which system is used to create a form and whether anything should be created at all. The following is a rough outline of what happens in a macro step:

Execute start script - Query or define variables - Generate form - Execute macro output - Execute End script

It is also possible to integrate loops. The visible input fields depend on the generation function. The following fields are generally available:

Name Description Creation with The system to be used to create the report can be specified here. Name Name of the macro step Run at Here you configure the condition under which the macro step should be run, e.g. only run if it was started via View. A script named "Run only if" can be stored for this purpose. If this script returns "return failure", this step is not executed. help-achtungThe filter function must not be confused with the creation function. This allows you e.g. to print by clicking on “Email”, or create an email on printing. Start instructions beas script which is executed before the report is created. End instruction beas script which is executed after the report is created. Loop SQL query Loop function (see example below) Set print ID (Marketing window only): Print ID is set.

Creation with A report can be created in the following ways Name Description Crystal The report was created with Crystal. The form is available as an RPT file. beas form The report was created with Infomaker or Powerbuilder and saved as a beas form (PSR file). Important: If the macro variables should be passed in the call of the base form, they must begin with "var_". SQL Query An SQL instruction was stored. Current window The current window is used. Nothing created No form is created – e.g. for re-use of existing files.

Additional inputs for Crystal Name Description File Name hmtoggle_plus1 File name of the form (RPT)

Deactivate Connection Check A Crystal document is defined for a specific database or connection. beas breaks the connections stored there and links the form to the current database. If you do not want this (e.g. because a result is expected from a process), you can deactivate this setting here. Deactivate Parameter Input beas retains the Crystal parameter input and provides multilingual, user-friendly parameter input. However, if you want to work with the Crystal parameter input, the beas function can be deactivated here. External Report If this option is activated, all beas influence is deactivated, e.g. translation, formula breakdown, etc.

Additional inputs for SQL query Name Description SQL Query SQL instruction from which a report is created.

Tab Name Description Macro Step Defines the macro step. Variables Defines the variables and parameters. Macro Output Defines the output steps.

Example: use loop function in macro step:

If you want to call up a report several times with a macro and change the content of a report variable automatically (eg. continuous number, work order position etc) proceed as follows

Store beas scripts in macro steps "Start statements" and "Loop-SQL-Query" :

Start statement: global function reportscript_step_preinloop // set report variable "pos" with the result of the Loop-SQL Statement printobject=setvar=pos=<e_number> end global

Loop-SQL-Query: select column as number from table where ........

How it works: The SQL-statement loads the desired values from the data base and writes them into the variable "Number" (internally extended with "e_"). Then, the value is transferred to the report.


返回 主页

⚠️ **GitHub.com Fallback** ⚠️