Report Editor

From QmazeWiki
Revision as of 09:36, 13 April 2018 by Qmaze (talk | contribs) (Outputscript Editor)
Jump to: navigation, search

If you want to change part of your page you can use the report editor. In the report editor you use HTML to modify components. You can also save HTML in other languages ​​in the report editor. This is useful if you also want to show a page in another language. In the report viewer you can also preview what is on the page by clicking on the preview button.


Editing reports

If-else statement

To display a certain text, image, code or whatever if there is certain condition (statement), there are IF ELSE statements in Qmaze. These statements are too use in output scripts or rules. Qmaze functions can be used in the statement used.

IF statement

The notation to write an IF statement is as follows:

Ifelse1.PNG

Between the round brackets comes the condition that an IF statement must address meet. Once the condition is true / true, the result is displayed between {if} {if}.

Two examples are described below.

Example 1:

Ifelse2.PNG

Example 2:

Ifelse3.PNG

Else statement

If an IF statement does not meet the condition, there may be another piece shown. As:

Ifelse4.PNG

AND and OR

Multiple comparisons can be made in 1 IF statement. As 2 conditions you have to use the AND operator. If the 1 or the other must be 'true', you can use the OR operator.

Functions

The functions that can be used in an IF statement are:

sql() Performing a sql query on the database sql(SELECT status FROM

configuration WHERE id=1)

calc() Calculating of numbers calc(1+2*5)
substring() Substituting a text
len() Length of a text len (hello world)
{username.field} Column from the username read out the table, based on current user {username.email}
{configuration.field} Column from the configuration read out the table, based on current configuration {configuration.status}
{customer.field} Column from the customer table read out, obv current user {customer.address}
{session.get.field} Current session value to pick up {session.get.username}
{url.get.property} Read parameters from the current URL {url.get.page}
{ip.property} Get IP address {ip.address}
{request.post.property} Read POST parameters(usual with web service) {request.post.xml}
contains () Checks the specified value in one piece of text. contains ('hello world', 'World')

Operators

The operators below can be used to make a comparison in one statement.

= is equal to
> Bigger than
< Smaller than
>= Bigger than or equal to
<= Smaller than or equal to
<> or!= Unequal to

Below are some examples of IF statements

Example:

Ifelse5.PNG

Example:

Ifelse6.PNG

Example:

Ifelse7.PNG

Example:

Ifelse8.PNG

Outputscript Editor

Output scripts are used to display data everywhere in Qmaze. Examples are example:

• The complete layout of the Qmaze website, which consists of three parts, a Header, Home and Footer

• Additional pages within qmaze. Each page is an output script

• The reports that you can make with overviews, offers, etcetera

• The display of options within the control panel

• The price summary

• The actions to be performed from pages and / or buttons

Output scripts are pieces of HTML code that also contain Qmaze, users and / or configurator data contain. The output script is stored in the Qmaze database and is also Language and Date sensitive.

Before the output script is sent to the browser or report viewer, it becomes the output script translated, converted for the configuration and user who is logged in. That makes it extremely powerful and flexible for making reports.