KoolReport's Forum

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

Empty column #56

Open zenon opened this topic on on Aug 4, 2017 - 6 comments

zenon commented on Aug 4, 2017

Hi,

Is it possible to create an empty column using CalculatedColumn? Or how to create an empty column using KoolReport? This is because I want to insert a box in the column in the table.

Thanks.

KoolReport commented on Aug 4, 2017

Hi,

Just return empty string in Calculated column:

->pipe(new CalculatedColumn(array(
    "empty_column"=>"''";
)))
zenon commented on Aug 4, 2017

Tried the above and got this error:-

Message: number_format() expects parameter 1 to be float, string given

zenon commented on Aug 4, 2017

I tried to render the empty_column in my table but resulted in the above error. Need your help. Appreciate it.

KoolReport commented on Aug 4, 2017

Let do this:

->pipe(new CalculatedColumn(array(
    "empty_column"=>array(
        "exp"=>"''",
        "type"=>"string"
    ),
)))
tee commented on Aug 7, 2017

I have a variable called gross_last_total from the code below. Could i apply this variable into empty_column of CalculatedColumn above? So, when i call empty_column in report.view, it shows me sum value of gross_last. Thanks.

->pipe(new AggregatedColumn(array(
            "gross_last_total"=>array("sum","gross_last")
        )))
KoolReport commented on Aug 7, 2017

You can use the gross_last_total directly. There is no need to copy it into the empty_column

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

None