KoolReport's Forum

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

Subtotalling at a group change #2142

Open Richb201 opened this topic on on Jun 11, 2021 - 1 comments

Richb201 commented on Jun 11, 2021

I'd like to subtotal each group in a table. Here is my code and an image of what it is generating. How can I do this>?

Table::create(array(
    "dataStore"=>$this->dataStore("survey_project")->filter("taxyear","=",$_SESSION['last_TY']),
        "showFooter"=>true,
        "grouping"=>array("Project"),
        "showFooter"=>"bottom",
    "columns"=>array(
        "employee",
        "user_email",
        "w2_wages"=>array(
            "label"=>"Gross wages"
        ),

         "qualified_dollars"=>array(
                  "label"=>"qualified wages",
            "cssStyle"=>"text-align:left",
            "prefix"=>"$",
            "footer"=>"sum",
            "footerText"=>"<b>Total Qualified Wages:</b> @value")

    ),

        "cssClass"=>array(
            "table"=>"table table-bordered",
            "tr"=>"row-css-class",
            "th"=>"header-css-class",
            "td"=>"cell-css-class",
            "tf"=>"footer-cell-css-class",
        )
    )
);


Richb201 commented on Jun 13, 2021

all fixed. thx

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
None yet

None