KoolReport's Forum

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

Excel export error - Call to a member function meta() on array #1875

Open Dimitar opened this topic on on Jan 28, 2021 - 1 comments

Dimitar commented on Jan 28, 2021

Hi, I've just tried to use the excel export package and I get this error: Fatal error: Uncaught Error: Call to a member function meta() on array in C:\wamp64\www\accounting\reports\koolreport\excel\TableBuilder.php on line 442

Here is the expression:

DataTables::create(array(
		"dataSource"=>$turnover,
		"name"=>"turnover_table",
		"language"=>"bg",
		"fastRender" => true,
		"options"=>array(
			"searching"=>true,
			"select"=>true,
			//prefilter table with data from search field
			"stateSave"=>true,
			  "stateLoadParams"=>"function (settings, data) {
				data.search.search = '$search_param';
			}",
		),
		"showFooter"=>"bottom",		
        "columns"=>array(
            "AccDesc"=>array(
                "label"=>"Описание",
				"footerText"=>"<b>Общо</b>"
            ),
            "Acc"=>array(
                "label"=>"Сметка",
				"footerText"=>"<b>---</b>"
            ),
			"AmSumSBDebit"=>array(
                "label"=>"Начално Салдо Дт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            ),
			"AmSumSBCredit"=>array(
                "label"=>"Начално Салдо Кт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            ),
			"AmSumDebit"=>array(
                "label"=>"Обороти Дт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            ),
			"AmSumCredit"=>array(
                "label"=>"Обороти Кт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            ),
			"AmSumEBDebit"=>array(
                "label"=>"Крайно Салдо Дт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            ),
			"AmSumEBCredit"=>array(
                "label"=>"Крайно Салдо Кт",
				"footer"=>"sum",
				"footerText"=>"<b>@value</b>",
				"type"=>"float"
            )
        ),
        "cssClass"=>array(
            "table"=>"table table-bordered table-striped"
        )
	));
David Winterburn commented on Jan 29, 2021

Hi Dimitar,

There's no DataTables widget in Excel package. Would you please post your true excel view file code and your export command? 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

Excel