Documente Academic
Documente Profesional
Documente Cultură
2.
Tutorials
3.
Projects Basics
4.
5.
6.
5-6
6-9
9-11
11-13
13-15
Mappings
8.
16
16-17
17-18
18-19
19-20
20-22
22-23
Processes
6.1. Working with Processes
7.
1-2
24
24
24-26
26-27
27-28
28-29
SQL Editor
30
30-31
Mapping Library
32
32-34
34-35
35-36
36-39
39-42
43
43-44
44-45
45-46
46-48
10.
Preferences
49
10.1. Preferences
49
11.
Glossary
12.
Licensing
13.
Product Support
50
51-52
53
QlikView Visual Script Generator is a tool that will allow you to generate QlikView scripts by
designing a Visual Mapping Schema. With QlikView Visual Script Generator VbScript or JavaScript have been
replaced by Visual Database Schema Drawing. Just drag and drop your Database Tables, Excel Sheets or
Mapping Library items to the drawing surface, trace the missing relations between mappings, and generate the
QlikView Script.
QlikView Visual Script Generator will centralize your metadata in a visual project that you will only need to
design one time. Later select parts of the schema to automatically generate QlikView scripts.
QVD files generation is automatic, database connections and variables can be stored in external files, and even
all generated code can be just included with a single line of code in existing QlikView applications.
Getting Started
First you will need to create a new Project that will be a container for your database schema.
A Project contains one or more mappings. A Mapping in a set of processes describing how to generate a
QlikView table
A Mapping can be any kind of
QlikView Visual Script Generator already cover 80-90% of the daily usage Mappings, and will be enhanced in
the next future with new Mappings AddIns.
Thus the powerful QlikView Script Mapping (Section 8.4) offer the possibility to code a complex
mapping inside QlikView and integrate it in QsGen like any other mapping.
Working with projects (Section 3.1)
Tutorials
Projects Basics
Project
Save : save the project (Section 3.1) under it's original name
New Project : create a new Project
Save As : save the project under a new name
Close Project : close the active project
Open Project : open an existing Project
You can only open one project at a time, if you want to open a second one please launch another session of
QsGen
Mappings
Edit Mapping : edit selected mapping (Section 5.2).
Edit 1st Process : edit the 1st process (Section 6.2) of the selected mapping
Connections
Edit Connections : edit the projects connections (Section 4.2)
Tools
Connector : select this button in order to draw relations (Section 4.5) between 2 mappings
Select : default SELECTION cursor.
Pan : to move the drawing
Drawing
Refresh drawing : redraw the schema according to saved data.
Layout Drawing : automatic layout your drawing but don't save the shapes positions.
the shapes position are not saved while you don't move manually the shape to it's new position.
Project ToolBar
Zoom controls
Press the
button
Note: You can edit a connection String pressing the "..." button in the "Connection String" field.
Fields:
Connection string : the ADO .NET connection string to connect to the database
Catalog : you can limit the results the database browser retrieve by entering the Catalog (Ex: dbo for
SQLServer)
Schema : you can limit the results the database browser retrieve by entering the Schema
name (Ex: MASTER for Oracle)
Folder Path : for excel and files the filename entered automatically by the connection wizard.
10
To add a Database Table Mapping simply drag a Table or a View from the "Connection Objects".
You can also Drop a OleDb Mapping from the "Mapping Library", you will then be guided by a wizard.
In order to link the tables see Mapping Relations (Section 4.5)
To display table Catalog and Schema see Preferences (Section 10.1)
11
From the "Mapping Library" you can drag and drop any shape to the drawing surface. After a wizard will
prompt you for Mapping details.
Here the list of current Library plugins, the list will be enhanced in the close future
12
13
What happened: right click on the "Order Details" mapping and select Edit Mapping, you will see that the
Column "UnitPrice" have now "Use for Relations" field unchecked. It means that this field will never been used
for relations in QlikView generated scripts.
Not if you want to recover the column for relations check "Use for Relations" for all Mappings that
contains this column, or Add a new relation between the 2 columns
14
Ensure to point the middle of the shape to get the red square then click on the start / end columns of the
relation.
If the two columns do not have the same name a windows will appear. It is neccessary for QlikView to have the
same column name in the both side of the relation.
You can choose between a new name and left or right column name.
15
NOTE: In one Mapping of the relation is a special mapping like "QlikView Code Mapping" the columns of the
mapping can't be renamed by QsGen. In this case you have to open the mapping's processes and rename the
output processes columns by hand.
Multiple Relations
In a Relation Column appears more that 2 times in a Drawing the Mappings are linked together by a "Relation
End"
NOTE you can also draw a relation between a Mapping and a "Relation End"
16
Mappings
Edit a Mapping
Select the Arrow tool
in the toolbars
Select the Shape in the Drawing or in the Mapping Selector right click and press <Edit Mapping>
Add Process: create a new child process below the selected one
17
18
Fields
QlikView Table Name: Name of the table that will be generated in QlikView. Each mapping will
generate ONE table
Mapping Type: Type of the mapping, defined during the creation (Read Only)
Generates QVD: If true, the resulting mapping table will be saved to a QVD File (glossary.html)
for more details on QVD files generation see Generate QVD Files (Section 5.6)
19
Alias : You can use this field to manually rename a column in order to link it to another mapping.
Use for Relations : if two columns of two or more mappings have the same name by default QlikView will link
them together. To avoid this check this option the column will be prefixed by the table name (Qualified).
You can consult here the QlikView Script as it will be generated in QlikView.
Test a Mapping (Section 5.5) : press the "Test in QlikView" button to test your script.
20
21
QsGen will launch QlikView, generates the script, run it and will create a default Table Box containing your
script result.
Options:
If you choose "Show Data" QsGen will create a default TableBox including all the output columns
If you choose "Show QlikView Script" QsGen will open QlikView in Edit Script mode. QsGen will add a
"QsGen" tab to the original QlikView script containing the Mapping generated script.
22
Generate QVD Applications : for every mapping having the "Generate QVD" flag activated, QsGen will
generate a "Load QVD" application (.qvw) having the same name as "QVD File Name" field of the
mapping.
Include Load QVD : for every mapping having the "Generate QVD" flag activated, insert a "LOAD
FROM QVD" in the main script.
Remark : in the future versions we will add an incremental load feature, and a conditional load clause to
restrict the QVD load fields and rows.
23
24
Processes
Edit a Process
In the Mappings Editor Select the Shape in the right click and press
<Edit Process (Form)>
or
<Edit Process (Wizard)>
In the Main Drawing surface press "Edit 1st Process"
25
Fields
Process Name: Name of the process, will be included in a comment in QlikView script
Is Data Feed: If the process will be a data source like a SQL process or Excel Load (Read Only)
Connection: the connection associated with the process. For SQL or Excel processes.
Data Feed Type: Type of the datafeed, defined during the creation (Read Only)
Catalog, Schema: for SQL processes you can define the catalog and the schema to restrict the data of the
field browser. Also the table name will be prefixed like this: Catalog.Schema.TableName
Do not regenerate script: Check this box if you want to edit the script manually and that QsGen does
not regenerate it.
Buttons:
Edit SQL: will open a powerfull SQL Editor (Section 7.1) to help you to design complex queries
26
Test Mapping in QlikView (Section 5.5), Press the button to the processes it is necessary to test in all
of their mapping.
Fields
Expression:
no user columns : output column name of the previous load, (read only).
user columns : you can enter any QlikView valid expression. Clicking the "..." button on the
right of the field will open the Expression Editor (Section 6.4).
27
Output : check if you want the column to appears in the resulting script
User Column : if checked the columns Expression can be edited with a custom expression. (read only)
Grouping: if you insert an aggregate function in an User Column you will have to group by the others
columns.
To insert a new "User Column" : press the green "+" button. You can delete a "User Column" but others
deleted columns are recreated after editing the SQL.
28
Enter any valid QlikView Expression. You can select items from Columns, QlikView Functions or QlikView
Operators by double clicking the item.
You can test the whole Process in QlikView directly from here.
29
The Process Script is regenerated automatically after any Load or Column change. You can modify it by hand
and keep your modifications checking the "Do not regenerate script". Keep in mind thar checking this option
will prevent the script to be refreshed.
30
SQL Editor
The SQL Editor is very powerfull, you can drop objects from the database browser in the right, draw relations
31
Mapping Library
32
From the "Mapping Library" you can drag and drop any shape to the drawing surface. After a wizard will
prompt you for Mapping details.
Here the list of current Library plugins, the list will be enhanced in the close future
33
To Hide a column, right-click on the column header and choose "Remove This Column"
To display a hidden column right-click on the column header and choose "Column Chooser"
To Filter the data right-click on the column header and choose "Filter Editor"
34
35
Then you'll get hte QlikView resulting script. You can test it directly in QlikView using the "Test in QlikView"
button
To edit it edit the mapping (Section 5.1), select the process and choose Edit Process (Wizard) from the
contextual menu.
36
37
Drag a "QlikView Mapping" from the "Mappings Library" and drop in on the design surface
It will launch the wizard
Press the Edit in QlikView button it will open a new QlikView document, go to the QsGen Tab and add your
code between
/*=======================================================*/
/* QLIKVIEW SCRIPT GENERATOR SCRIPT */
/*=======================================================*/
and
/*<END-QSGen>*/
38
Once finished save your changes in the QlikView document and close QlikView
Press Yes, and QsGen will retrieve your script and the resulting columns. From here you can Edit it back in
QlikView.
The next page will shows you the resulting columns retrieved from the QlikView Script ance reloaded
The resulting Mapping that you can now link to other mappings like a table
8.5 Resident_Mapping
A resident mapping is a mapping which is based on data from another mapping.
Drag a "Resident Load" Mapping from the "Mappings Library" and drop in on the design surface
It will launch the wizard
39
40
We will for the sample create a resident mapping that will count the number of Orders for each customer,
name the mapping and the process, and choose the source mapping for your resident load.
Delete all columns with "-" button except CustomerID, and add a new column with the "+". Note that the
column is a User Column
Press the "..." on the expression and define an Expression like
count( distinct [OrderID] )
Set the Alias name of "NbOrders", check output, and check groupping in the CustomerId column like this
Press Next > you will get the resulting QlikView script like
//-- Process ResidentNbOrders ---------------------------LOAD
CustomerID,
count( distinct [OrderID] ) AS NbOrders
RESIDENT Orders
GROUP BY
CustomerID;
You can test it in QlikView but as it uses another mapping you will have to test it in a Script (Section
9.4) that will include Customers and Orders tables
As there is now 3 tables that have the CustomerID key in common QsGen define a CustomerID link node. Here
the resulting schema
41
42
43
44
45
to change your QlikView applications scripts, deliver only the new include files and that's it.
46
We give you this sample of files organization but you can choose your own.
Relative Path
..\qsinc
..\qsvar
..\qvw
..\qvd
..\qvd
File Type
QsGen Project
QsGen Include File
QsGen Variable Definition file
QlikView Application Generated/Updated
QlikView qvd loader that will generate table1.qvd
QlikView data file generated by table1.qvw
Description
.qsproj
QsGen Project
.qsinc
.qsvar
.qvw
QlikView application
.qvd
47
Script List
You can add / delete a script using the "+" and "-" buttons
Script Settings
Script Name: The name of the script, will be used to name the output files
User Name / Password : username / password used to open the "QlikView Qvw Application File" if
neccessary
QlikView Qvw Application File : the path of the destination QlikView file (.qvw) that will be updated
48
Generate Include : check if you want QsGen to generate the script in a separate include file
Put Variables in Separate File : check if you want QsGen to put the variables definition in a separate
file
Generate Qvd Application : check if you want QsGen to generate, for each Mapping having an Output
to Qvd, the QlikView Application (QDV_xxx.qvw) that will generate the QVD.
Include Load form QVD : check if you want QsGen to generate, for each Mapping having an Output to
Qvd, the script part containing the LOAD from QVD in the QsGen Script.
The "QlikView Qvw Application File" can already contain some scripts. QsGen script it will be added to the
end of file in a QsGen tab that you will be able to move afterwards.
Scripts Mappings
Use the Select Buttons to select the Mapping you want to include in your script.
If you selected one or more mappings that are dependent on other mappings (resident mappings), make
sure to set the order to insert them after of those they are dependent on.
49
50
51
12 Licensing
On the first installation QsGen will start on a trial mode for 30 days.
If you need a trial extension please send an email to our support team
Ordering
QlikView Visual Script Generator can be purchased from the QsGen web site for immediate download, or from
most popular online software resellers. For further information, go to the purchase pages on the QsGen web
site:
http://www.qsgen.com/buy-now
Manage Licenses
The licenses have to be checked through internet line against our license server.
If you have no internet access on one PC you can use another one and connect to our web site to activate your
PC manually.
the support Expires Date tell you the expiration date of support and updates downloads.
Refresh License
Press this button in order to contact the licenses server and to refresh license data. For example if we setup a
trial extension please press this button for the extension to be effective
Deactivate
Any license is linked to a machine, any installation will decrease your license number by one unit. If you want
to install the software on another machine you will have to first release your current license and to register the
license on the new machine.
Activate Manually
Enter License ID and Password to PC to install
Get the Activation Request Code
Connect to our web site from a PC having internet to get Manual Activation Code
You can consult your Payment History, Licenses Detail, Download your software, and buy new licenses or
maintenance / support renewal
52
53
13 Product Support
Support Forum
All support is done through the QsGen forum, our engineers will answer you directly on the forum
the URL IS: http://www.qlikview-script-generator.com/forum
If you want to post on this forum you have to be registered. You can register in the Support / Register page
Download Product
Go to the Download (http://www.qlikview-script-generator.com/qlikview-visual-scriptgenerator-betatest-program) section of QsGen.com. Note that you have to be registered to have access to
this section.
Once downloaded, install the product, you will have a 30 days evaluation period. Once this period expired you
'll have to buy the product if you want to continue
54