Macro Step

Administration > System Initialization > Report setup > Macros > Macro Definition > Macro Step

Top  Previous  Next
Expand/Collapse Toggles

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:

1. Execute start script

2. Query or define variables

3. Generate form

4. Execute macro output

5. Execute End script

 

It is also possible to integrate loops. The visible input fields depend on the generation function.

 

PATH: Administration > System Initialization > Report Setup > Open a report > "Macro Step" tab > Open a macro step.

Macro_step_SAPStyle

Window report_makrostep_edit_page1.psr

 

General fields:

Name

Description

Creation with

The system to be used to create the report can be specified here.

Beas use the SAP Crystal engine for displaying reports.
Note:  SAP Crystal report is not a product of Beas.

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.
Limitation of PDF printing: "Microsoft PDF Printer" is not supported. Install a different PDF printer to use.

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.

No Creation

No form is created – e.g. for re-use of existing files.

 

Additional inputs for Crystal

Name

Description

File Name

 

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.

Note: This setting is only available in MSSQL.

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 influences are 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.

Scripts

 

 

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 (e.g. continuous number, work order position etc.) proceed as follows

 

Store BeasScripts 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.

 

 

 


Help URL: https://help.beascloud.com/beas202402/index.html?makroschritt.htm