By executing this tutorial you will create you first working On-Demand Ajax application. We suggest that you execute the series of tutorials in order as each tutorial is based on the progress made in the previous. Please note that QlikView document used for this tutorial is called SalesDemo for Ajax.qvw. This QlikView document can be accessed locally with a QlikView Desktop or from your QlikView Server Access Point (if you have access to one). However, it is not necessary to have a QlikView server Access Point in order to develop or view NPrinting On-Demand objects. This can be achieved in the QV desktop directly.
Furthermore, you may create (or copy the original QVW) two separate QlikView QVWs to illustrates a useful feature of NPrinting On-Demand. For example, you can have a separate .qvw that contain business data and charts for analysis (the original QVW). The second qvw, (can be a copy of the original) which contains specific charts and data specifically required for your On Demand report. You can, of course, develop your solution using a single integrated .qvw if you prefer. It is a good idea to have a primary QVW to support day to day analysis and a separate QVW for On Demand reports.
Attention: remember to save QlikView documents used as NPrinting connections with WebView mode deactivated. NPrinting cannot open QlikView documents with WebView mode activated because it doesn't have full control of QlikView functionalities.
- Please download NPrinting Client, NPrinting Server and NPrinting Components from our download page then install and activate them to execute this series of tutorials. To activate NPrinting Client refer to Activate or Reactivate NPrinting Client. You need to activate NPrinting Server, refer to Activate or Reactivate NPrinting Server, by using a license code with the On-Deamand feature enabled. To configure NPrinting Server follow the tutorial "How to Configure NPrinting Service". If you experience some issues check the article "Troubleshooting: NPrinting Server Service and Schedules". You need everything installed on your local PC for training purposes so that NPrinting Server will be reachable at localhost. NPrinting Server can also be installed on a different PC. If so, replace localhost with the name or IP address of the server.
- Please download NPrinting Training Material, which contains working examples for this tutorial, and extract it into C:\NPrintingTraining\ so that the the relative path structure continues to be valid.
Open SalesDemo for Ajax.qvw
Open QlikView and under File in the menu bar click on Open...
- Browse to C:\NPrintingTraining\QlikViewDocuments\
- Select the SalesDemo for Ajax.qvw file
- Click on the Open button
Check WebView Status
- Select View in the menu bar
- Make sure that WebView is turned on, the icon on the left will have an orange background
Add New Sheet
- If you want to see what we are going to build, have a look at Simple On-Demand sheet. It contains working, as well as more advanced, examples of what we are creating in this series of tutorials.
- Select Layout in the menu bar
- Click on Add Sheet...
Open Sheet Properties Dialog
Right click on the empty sheet and click on Properties... in the menu that appears.
Start Adding Objects to Sheet
Right click on the empty sheet again and then Click on + New Sheet Object near the bottom of the menu.
Embed NPrinting Queue in Sheet
Drag the NPrinting Queue bar and drop it onto the sheet. It will shows all requests with last at the top of the list. You should add only one NPrinting Queue extension to the document because it shows all requests by all NPrinting buttons. More than one NPrinting Queue object can be embedded, though, say one on each sheet, and all of them will show the same information.
Resizing the reports queue button
We suggest that you increase the size of the "Report queue" button because it doesn't expand the drop-down list automatically. This must be done to show the report list which does not currently appear by default. To do this, simply:
- move the mouse over one of the edges or the corners of the Report queue list button
- by keeping the left button of the mouse pressed, resize the selected border to the desired dimension as you normally do with any window
The drop-down list of On-Demand generated reports will now appear based on the newly resized report queue list area.
Embed NPrinting Report in Sheet
Drag the NPrinting Report bar and drop it onto the sheet. When finished, we’ll be able to run the report PowerPoint Report with Multiple Pages with the filters applied inside NPrinting.
Configure Run Report Object
Right click on the Run Report object and click on Properties... in the menu that appears.
Configure Button Appearance
- Make sure the Button Appearance dialog is open
- Enter the name, PowerPoint Report with Multiple Pages for the purposes of this tutorial, in the Text field. It’s the name that will appear on the NPrinting Report button.
Click on “fx” at the right end of each input field to obtain a more user-friendly, spacious editor.
Configure On-Demand Service Connection
- Select the On-Demand service connection bar to open the dialog
- Verify that the Hostname field contains localhost if NPrinting Server is installed on your PC. If, on the other hand, you use a remote installation of NPrinting Server, put the host name or the IP address of the server.
- The HTTP Port should be 9001, unless you have configured a different port in the ods.config file.
Configure Report Settings
- Select Report settings to access the Report settings fields
- Copy and past the name of the report you want to run in the Friendly name: field. For instance PowerPoint Report with Multiple Pages. It’s the name that will appear on the NPrinting queue extension. You can customize it
- Enter the full path to the .nsq file that contains the reports and tasks to execute in NPrinting project path: field. Enter C:\NPrintingTraining\NPrintingFiles\OnDemand.nsq for this tutorial
- Enter PowerPoint Report with Multiple Pages in Report Id: field. It is the report’s name as registered in the .nsq
- Enter Sales Demo in the ConnectionID: field
- Select the output format you prefer, for instance PDF, in the Output format: field. Please be careful to select an output format compatible with the template. Don’t select CSV if you are using a PowerPoint template for example
- Click on the 'X' to close the dialog and save the settings
Click on the PowerPoint Report... button directly inside the QlikView document and wait until the Reports queue button turns green and the number of reports that are ready has been increased by one.
- Click on the green Reports queue button and click on your report in the queue of reports. The last generated is at the top of the list. It will open in your browser.
- Publish this .qvw on your QlikView server so users will be able to run reports from the web interface