I want to add the things that are commented out to my Table in Drill Down.. I can't seem to get the syntax correct.
Any help would be appreciated.
        array(
            //Level 2;
            "title" => function ($params, $scope) {
                return "Year " . $params["year"];
            },
            //           "content"=>function($params,$scope)
            "widget" => array(Table::class, array(
                "dataSource" => function ($params, $scope) {
                    return $this->src("cloud1")->query("
SELECT AL.CategoryEDesc Description,
COUNT(1) Count,
SUM(AL.price20) Total
FROM dbo.Activity A
JOIN Step S ON S.id = A.CurrStepID
JOIN dbo.Company C ON C.id = A.CompanyID
JOIN dbo.ActivityLines AL ON AL.ActivityID = A.ID
where EngagementYear = 2023
AND C.Name = 'Group, LLC'
AND S.ActivityStep = 'Engagement'
AND A.Status = 'A'
AND AL.Disabled = 0
GROUP BY AL.CategoryEDesc
ORDER BY AL.CategoryEDesc
                            ")
                        ->params(array(
                            ":year" => $params["year"]
                        ))   ;
//                        ,
//                        "columns"=>array(
//                            "Description"=>array(
//                          "type"=>"string",
//                                "label"=>"Description"),
//                            "Count"=>array(
//                                "type"=>"number",
//                        "footer"=>"sum",
//                            "footerText"=>"<b>Total:</b> @value"  ,
//                            "cssStyle"=>"text-align:right"
//                            ),
//                            "Total"=>array(
//                              "type"=>"number",
//                                "label"=>"Total",
//                                "prefix"=>"$",
//                            "cssStyle"=>"text-align:right",
//                        "footer"=>"sum",
//                            "footerText"=>"<b>Total:</b> @value"
//                            )
//                        )
//                        ,
//                        "clientEvents"=>array(
//                            "itemSelect"=>"function(params){
//                                saleDrillDown.next({month:params.selectedRow[0]});
                }
            ))
        )
This is for the second level of the drill down. First level is a Chart, but second level is a table. I am using SQL Server. Some query values are hard coded for now. I am trying to get "inputs" figured out so I could change some of the hard coding.