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.
    2 comments

    Popular posts from this blog

    Creating YTD transformation tables

    The other day I had to setup a new data warehouse that will be used for reporting with MicroStrategy. Part of it was setting up the date dimension including the transformation tables. I had a quick look online and couldn't find any script doing the work for me so I created them myself (with the help of a colleague). All you need is an existing date dimension with date_id, year_id, quarter_id, month_id and week_id, you can find plenty of scripts for that online. YTD tableselect t1.day_id, t2.day_id
    INTO YTD_DAY
    from LU_DAY t1, LU_DAY t2
    where t1.day_id >= t2.day_id
    and t1.year_id = t2.year_id QTD table select t1.day_id, t2.day_id as qtd_day_id
    INTO QTD_DAY
    from LU_DAY t1, LU_DAY t2
    where t1.day_id >= t2.day_id
    and t1.QUARTER_id = t2.QUARTER_id  MTD tableselect t1.day_id, t2.day_id as mtd_day_id
    INTO MTD_DAY
    from LU_DAY t1, LU_DAY t2
    where t1.day_id >= t2.day_id
    and t1.month_id = t2.month_id  WTD tableselect t1.day_id, t2.day_id as wtd_day_id
    INTO WTD_DAY
    from LU_DAY t1, LU_DAY t2
    where …

    Dynamic cell references in spreadsheets with Google Docs

    During my former internships in a consulting company I had to work A LOT with Microsoft Excel and often had to use dynamic cell references over multiple worksheets. Recently I started using the spreadsheets of Google Docs to track my bank account balance and to figure out where all my money goes. I decided to have one sheet for every month + one sheet of the month I want to analyze. But how do I dynamically change the reference to the sheet (the monthly sheet) I want to analyze without editing every single formula? Here is my solution: Create the target sheets and your overview sheet
    - I gave my sheets the names Month + Year (July 09)In the overview choose one cell that you want to contain the reference sheet and enter the sheet name
    - cell D24 in the example
    - Using the month names you might have to write 'July 09, otherwise Google will think it's a date.In the overview you can now dynamically reference to a detail sheet using the following formula:=INDIRECT("'"&…

    Pentaho BI Server: Using action sequences as a web service with PHP

    For my masterthesis I had to figure out, how to use the action sequences as webservice with PHP. According to the documentation you can receive soap messages but the action sequences don't offer a WSDL that would help you building your client. I also had problems with the http basic authentication, that Pentaho uses.
    After a couple hours of research and try and error, I found a solution. I doubt thats the best way to go, but at least it works. All you need is the PEAR HTTP Request class.
    Here is the code:

    //PEAR Request
    require_once 'Request.php';
    $response = $req->sendRequest();

    if (PEAR::isError($response)) {
    echo $response->getMessage();
    } else {
    $req->clearPostData();
    $req->setURL("localhost:8080/pentaho/ServiceAction");
    $req->addQueryString("solution", "bi-developers");
    $req->addQueryString("path", "reporting");
    $req->addQueryString("action", "Testreport.xaction");