Report Editor
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:
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:
Example 2:
Else statement
If an IF statement does not meet the condition, there may be another piece shown. As:
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:
Example:
Example:
Example:
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.
Starting up the Outputscript editor
To startup the output script editor navigate to the "Report editor" module. Choose which report you would like to edit on the left side of the screen and double click on it.
The following screen will be displayed:
In the bottom of the screen there will be a few options
Code: Here is where you can edit the code
Preview: This option will show you a preview of the report that is selected.
Properties: These are the properties of the selected report.
History: In this option you are able to open past versions of the report.
Buttons: Create buttons on the report
Statistics: Under Constuction.
At the top the screen you will see the toolbar to edit code. The following options are available.
Pagebreak: this inserts a pagebreak command. The page break is not HTML, but only from application when you print to Word or PDF.
B (bold): select part of the text and press B to make it bold
I (italic): select a part of the text and press I to make the text in italics
S (strikethrough): select a part of the text and press S, to make the text crossed out. User manual o - version December 2013 8
Link: adds a link statement (<a href="http://"> </a>) ... enter the link http: // at will.
Image: adds an image statement (<img src = "http: //" alt = "">
Unordered list: makes a bulletpoint list
Ordered list: creates a numbered list.
Undo: undo changes
Expand view: place the editor and preview under / above each other instead of next to each other.
General use of the Output Script Editor
HTML In the output scripts, HTML (Hyper Text Markup Language) is used for the build different types of output scripts. HTML is a markup language specific documents, mainly intended to provide websites with an interface. This manual is not intended as an HTML course. However, there are short ones in this manual examples of how HTML is used in the editor. The organization can also Quadriceps provide an HTML training when desired.