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.
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.
The 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
|
File has to be located in one of the following folders:
c:\program files (x86)\beas software\beas\program
c:\program files (x86)\beas software\beas\program\report
[project folder]\
[project folder]\report
Alternatively, you can set up the file name in macro step, by setting the variable makro_filename (beas 9.1 PL: 08)
Example:
setvar=makro_filename=my_own_report.rpt
Note:
Beas uses Crystal 11 Viewer.
Only object types managed with Crystal 11 viewer can be viewed.
|
|
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
|
Click on the yellow arrow to open the beasgui script editor.
IMPORTANT: The symbol # can cause errors when placed in the beginning of macro script definitions (e.g. macro start/stop). Users are advised to avoid using this symbol in the beginning of a script.
Window report_makro_edit_scripts.psr
|
|
Example: use loop function in macro step:
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
|