Search code examples
reportingpentahoadhoc

Pentaho adhoc reporting functions


I am doing reporting on a dataset but I only want the report to show the count function instead of all the values and, in the end, a line with the count.

Can it be done?


Solution

  • So you may have a datasource myds :

    select count(*) from mytable

    Then you create a simple parameter mycount and a query component myquery.

    Assign myds to the property Datasource of myquery and mycount to the property Result Var

    If you want to display the value, add a text component mytext and make it listen to the parameter mycount. In its Expression property, enter the following code :

    function(){return(mycount.toString(););}