Difference between revisions of "Report Editor"

From QmazeWiki
Jump to: navigation, search
(Outputscript Editor)
(Outputscript Editor)
Line 198: Line 198:
 
'''Pagebreak''': this inserts a pagebreak command. The page break is not HTML, but only from
 
'''Pagebreak''': this inserts a pagebreak command. The page break is not HTML, but only from
 
application when you print to Word or PDF.
 
application when you print to Word or PDF.
 +
 
'''Header''': header for Word or PDF. Inserts the following text:
 
'''Header''': header for Word or PDF. Inserts the following text:
 
<qmaze.header textl = "Text" textc = "Text" textr = "Text" />
 
<qmaze.header textl = "Text" textc = "Text" textr = "Text" />

Revision as of 10:14, 13 April 2018

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.

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.

Outputscript1.PNG

The following screen will be displayed:

Outputscript2.PNG

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.

Outputscript3.PNG

Pagebreak: this inserts a pagebreak command. The page break is not HTML, but only from application when you print to Word or PDF.

Header: header for Word or PDF. Inserts the following text: <qmaze.header textl = "Text" textc = "Text" textr = "Text" /> Replace "Text" with the desired text. The header has a Left, centered and right part.

Footer: footertext for Word / PDF New Outputscript: A new output script is created, Save: Saves changes. A copy of the old version is made in the log files. The report editor frame turns green if the changes are saved correctly.

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.