KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Row number on CalculateColumn() #141

Open dimasmaliq opened this topic on on Oct 31, 2017 - 5 comments

dimasmaliq commented on Oct 31, 2017

Hi, how to make the "rownum" columns as the first column in datastore? because, when i initialize it into CalculateColumn() (in this case with "Grand Total" columns too), it will be placed after the columns from the original query

KoolReport commented on Nov 2, 2017

Sorry for my late reply, you may use the OnlyColumn process to rearrange the order:

->pipe(new CalculatedColumn(array(
    "rowNum"=>"{#}"
)))
->pipe(new OnlyColumn(array(
    "rowNum","propisini","pns","non_pns","grand_total"
)))

Let me know if you need further assistance.

dimasmaliq commented on Nov 3, 2017

no problem :D Thank you

dimasmaliq commented on Nov 3, 2017

btw, how to make index of rownum start from 1 on this datastore?

KoolReport commented on Nov 3, 2017

You do this "rowNum"=>"{#}+1"

dimasmaliq commented on Nov 3, 2017

okey, thanks

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed
solved

None