Adding column to existing pentaho reports

777 views Asked by At

I am pretty new to Pentaho Tool. I have an existing *.prpt which generates an excel report file with me. All i need is to add a new column to it. Could you guys suggest me a way to do it.

Thanks in advance

1

There are 1 answers

2
Venkatesh Panabaka On BEST ANSWER

Note :- These all are my assumption.

After open that *.prpt file in pentaho report designer. In right side Data tab is their click that tab and check for Data Sets and expand that one. Below image show sample structure of the Data Sets. In that image Query 1 is the main report data source open that Query 1 data source paste that sql1 in there and press Ok button. After drag and drop column1, column2, column3 to your report designer in details header. After save your prpt file it show result like below sql1 output.

enter image description here

   sql1:- select column1, column2, column3 from table_name

              -------------------------------
    output:-  | column1 | column2 | column3 |
              -------------------------------
              | 1       | 12      | 13      |
              -------------------------------
              | 2       | 22      | 23      |
              -------------------------------

=> Now, you want to add first one more column to your report. Copy sql2 and paste in where you copied sql1 and remove sql1 and paste it sql2.

   sql2:- select column1, column2, column3, column4 from table_name

              -----------------------------------------
    output:-  | column1 | column2 | column3 | column4 |
              -----------------------------------------
              | 1       | 12      | 13      | 14      |
              -----------------------------------------
              | 2       | 22      | 23      | 24      |
              -----------------------------------------

That's it you added extra column to your prpt file.

I think these information useful to you. Still you have any doubts fell free to ask.

Another simple solution is change the sql by your convenient ways and drag and drop that column in to details.

Thank you.