Skip to main content

Wabit finally supports Parameters!

In the last days SQL Power released Wabit 1.3.1, you can download it here: SQL Power Download Website.

The most important change that came with Wabit 1.3 is the ability to parametrize reports. Below is a screenshot on how it looks like:

Report with parameters in SQL Power Wabit
You can choose a text entry field, date picker and a select box as parameter entry field. The values from a select box can be based on a query.

How to add parameters to your report:
  • Add parameters to your SQL query. You can add parameters either by using the parameter dialog (Ctrl + Space) or just by using the right syntax in the query, for example "continent =${Continent->Europe}".
    • ${Continent} defines the parameters "Continent"
    • ${Continent->Europe} defines the parameter "Continent" and sets the default value to "Europe"
Parameter in a query
  • Create a new Report
    • Drag the query into the report
    • Add a parameter in the parameter panel (Go to View->Docked Source List if you can't see the parameter panel) . Make sure the parameter has the same name as you defined in the query.
      • To add a text entry field add a free form text.
      • To add a select box add a drop down list.
        • If you want to use values from a query in your select box, add a query with the values first and then select the query using "Source" and "Pick a variable" in the parameter properties.
      • To add a date picker add a date selection widget.
    • You will see that the result changes depending on the parameter entered.
Using a query as a select box

This functionality is available in the open source version of Wabit. Give it a try and let me know what you think of it.


    EvilRabbit said…
    I've a question. I've previously worked with Crystal Reports, where I can get a subset of records by linking a sub report. However, I would very much like to know how to do the same in Wabit.

    You're using a region, and then displaying only the countries. Is this two different queries in one area?
    Ben said…
    I'm not sure if I really understand your question. With parameters you can create 1 query to get the list of possible parameters (ex. Continents). The selected continent (ex. Europe) can be used in the report (which is a second query) to only display countries from Europe.

    Popular posts from this blog

    Pentaho Data Integration - Multi-part Form submission with file upload using the User Defined Java Class Step

    I recently needed to use Pentaho Data Integration (PDI) to send a file to a server for processing using HTTP Post. I spent several hours trying to use the existing steps HTTP Post, HTTP Client & Rest Client but I couldn't get it to work. After some more research I came across the issue PDI-10120 - Support for Multi-part Form Submittal In Web Service Steps  and I thought I was out of luck. I previously wrote a small Java client for a similar use case and remembered the PDI has a step called User Defined Java Class  (UDJC). After reading this great tutorial I created the following basic transaction. I have a dataset with the URL and the full file path and use the UDJC to make the HTTP call. HTTP Post using User Defined Java Class The Java class handles the actual HTTP Post. It uses 2 input variables, the URL (url) which is used for the call and the file name (longFileName). The HTTP call then contains the file (line 30) and the file name (line 31). I included some basi

    Products you don't expect to be 'Made in China' - Del Monte fruit cups

    Since I moved to Canada back in March I have started to realize how many products are actually made in China. Back in Germany you could also buy lots of stuff from China but you mostly had the choice between German or Europe products and Chinese products. When I went to Food Basics in Oakville a couple weeks ago to get some apples I stood in front of a huge tray of Chinese apples! Aren't there enough apples in Ontario, Canada or the US? Even Mexico would probably be closer than China. Another day my wife bought Del Monte fruit cups in the grocery store. I checked the label when I was going to eat it and i decided to leave it in the fridge. First of all it is 'Made in China' (again I guess no other country in this world has fruit) and second it contains artificial flavor. How bad must the fruit inside be that you need artificial flavor (and does anybody in China controls how it is made)? For my part I'll check the labels more closely whenever I buy any kind of product

    Connect Facebook & (almost) everything from Google

    Yesterday I tried to figure out how to post my blog posts on my Facebook profile. First I tried different application but all they could do was adding a box on your profile. After searching for on google for a couple minutes I found one video on youtube that lead me the way: Import Blog/RSS in Facebook profile . You can do it even easier as in the video. When you are on your profile in Facebook, you just have to click on Import (as shown in the picture) and you can import not only a RSS feed from your blog, but also integrate lots of different websites like Youtube, Google Reader and most important for me: Picasa. Finally you can use all the different great tools from Google and integrate them all into one Profile. UPDATE: Finally there is also a blog post in the offical blog from blogger about the topic: Blogger Buzz: Facebook Your Blog