Magento 2 Custom Report grid is not working
Is anyone has created custom Report grid in Magento 2 Admin panel?
We have started to create a report but we are facing an issue with display data and while we click on "Refresh" button entire page is messed up.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
<referenceBlock name="adminhtml.report.grid">
<arguments>
<argument name="id" xsi:type="string">gridMaterialReport</argument>
<argument name="dataSource" xsi:type="object">CommercepunditCoreAdminOrderModelResourceModelMaterialCollectionInitial</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.export">
<arguments>
<argument name="exportTypes" xsi:type="array">
<item name="csv" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersCsv</item>
</item>
<item name="excel" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersExcel</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.columnSet">
<arguments>
<argument name="count_totals" xsi:type="string">1</argument>
</arguments>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.order_id" as="order_id">
<arguments>
<argument name="header" xsi:type="string" translate="true">Order Id</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">text</argument>
<argument name="index" xsi:type="string">order_id</argument>
<argument name="id" xsi:type="string">order_id</argument>
<argument name="column_css_class" xsi:type="string">col-name</argument>
<argument name="header_css_class" xsi:type="string">col-name</argument>
</arguments>
</block>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.sqft" as="sqft">
<arguments>
<argument name="header" xsi:type="string" translate="true">Sqft</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">number</argument>
<argument name="index" xsi:type="string">sqft</argument>
<argument name="total" xsi:type="string">sum</argument>
<argument name="id" xsi:type="string">sqft</argument>
<argument name="column_css_class" xsi:type="string">col-qty</argument>
<argument name="header_css_class" xsi:type="string">col-qty</argument>
</arguments>
</block>
</referenceBlock>
</body>
+++++++++++++++++
While we can click on Refresh entire page is look like below.
Can anyone help me on this??
Thanks,
magento2 magento2.2
|
show 1 more comment
Is anyone has created custom Report grid in Magento 2 Admin panel?
We have started to create a report but we are facing an issue with display data and while we click on "Refresh" button entire page is messed up.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
<referenceBlock name="adminhtml.report.grid">
<arguments>
<argument name="id" xsi:type="string">gridMaterialReport</argument>
<argument name="dataSource" xsi:type="object">CommercepunditCoreAdminOrderModelResourceModelMaterialCollectionInitial</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.export">
<arguments>
<argument name="exportTypes" xsi:type="array">
<item name="csv" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersCsv</item>
</item>
<item name="excel" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersExcel</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.columnSet">
<arguments>
<argument name="count_totals" xsi:type="string">1</argument>
</arguments>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.order_id" as="order_id">
<arguments>
<argument name="header" xsi:type="string" translate="true">Order Id</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">text</argument>
<argument name="index" xsi:type="string">order_id</argument>
<argument name="id" xsi:type="string">order_id</argument>
<argument name="column_css_class" xsi:type="string">col-name</argument>
<argument name="header_css_class" xsi:type="string">col-name</argument>
</arguments>
</block>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.sqft" as="sqft">
<arguments>
<argument name="header" xsi:type="string" translate="true">Sqft</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">number</argument>
<argument name="index" xsi:type="string">sqft</argument>
<argument name="total" xsi:type="string">sum</argument>
<argument name="id" xsi:type="string">sqft</argument>
<argument name="column_css_class" xsi:type="string">col-qty</argument>
<argument name="header_css_class" xsi:type="string">col-qty</argument>
</arguments>
</block>
</referenceBlock>
</body>
+++++++++++++++++
While we can click on Refresh entire page is look like below.
Can anyone help me on this??
Thanks,
magento2 magento2.2
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08
|
show 1 more comment
Is anyone has created custom Report grid in Magento 2 Admin panel?
We have started to create a report but we are facing an issue with display data and while we click on "Refresh" button entire page is messed up.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
<referenceBlock name="adminhtml.report.grid">
<arguments>
<argument name="id" xsi:type="string">gridMaterialReport</argument>
<argument name="dataSource" xsi:type="object">CommercepunditCoreAdminOrderModelResourceModelMaterialCollectionInitial</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.export">
<arguments>
<argument name="exportTypes" xsi:type="array">
<item name="csv" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersCsv</item>
</item>
<item name="excel" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersExcel</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.columnSet">
<arguments>
<argument name="count_totals" xsi:type="string">1</argument>
</arguments>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.order_id" as="order_id">
<arguments>
<argument name="header" xsi:type="string" translate="true">Order Id</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">text</argument>
<argument name="index" xsi:type="string">order_id</argument>
<argument name="id" xsi:type="string">order_id</argument>
<argument name="column_css_class" xsi:type="string">col-name</argument>
<argument name="header_css_class" xsi:type="string">col-name</argument>
</arguments>
</block>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.sqft" as="sqft">
<arguments>
<argument name="header" xsi:type="string" translate="true">Sqft</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">number</argument>
<argument name="index" xsi:type="string">sqft</argument>
<argument name="total" xsi:type="string">sum</argument>
<argument name="id" xsi:type="string">sqft</argument>
<argument name="column_css_class" xsi:type="string">col-qty</argument>
<argument name="header_css_class" xsi:type="string">col-qty</argument>
</arguments>
</block>
</referenceBlock>
</body>
+++++++++++++++++
While we can click on Refresh entire page is look like below.
Can anyone help me on this??
Thanks,
magento2 magento2.2
Is anyone has created custom Report grid in Magento 2 Admin panel?
We have started to create a report but we are facing an issue with display data and while we click on "Refresh" button entire page is messed up.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
<referenceBlock name="adminhtml.report.grid">
<arguments>
<argument name="id" xsi:type="string">gridMaterialReport</argument>
<argument name="dataSource" xsi:type="object">CommercepunditCoreAdminOrderModelResourceModelMaterialCollectionInitial</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.export">
<arguments>
<argument name="exportTypes" xsi:type="array">
<item name="csv" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersCsv</item>
</item>
<item name="excel" xsi:type="array">
<item name="urlPath" xsi:type="string">*/*/exportOrdersExcel</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="adminhtml.report.grid.columnSet">
<arguments>
<argument name="count_totals" xsi:type="string">1</argument>
</arguments>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.order_id" as="order_id">
<arguments>
<argument name="header" xsi:type="string" translate="true">Order Id</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">text</argument>
<argument name="index" xsi:type="string">order_id</argument>
<argument name="id" xsi:type="string">order_id</argument>
<argument name="column_css_class" xsi:type="string">col-name</argument>
<argument name="header_css_class" xsi:type="string">col-name</argument>
</arguments>
</block>
<block class="MagentoBackendBlockWidgetGridColumn" name="adminhtml.report.grid.columnSet.sqft" as="sqft">
<arguments>
<argument name="header" xsi:type="string" translate="true">Sqft</argument>
<argument name="sortable" xsi:type="string">0</argument>
<argument name="type" xsi:type="string">number</argument>
<argument name="index" xsi:type="string">sqft</argument>
<argument name="total" xsi:type="string">sum</argument>
<argument name="id" xsi:type="string">sqft</argument>
<argument name="column_css_class" xsi:type="string">col-qty</argument>
<argument name="header_css_class" xsi:type="string">col-qty</argument>
</arguments>
</block>
</referenceBlock>
</body>
+++++++++++++++++
While we can click on Refresh entire page is look like below.
Can anyone help me on this??
Thanks,
magento2 magento2.2
magento2 magento2.2
edited yesterday
Himanshu
704419
704419
asked Dec 7 '18 at 12:10
Ketan Panchal
380111
380111
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08
|
show 1 more comment
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08
|
show 1 more comment
1 Answer
1
active
oldest
votes
I have resolved an issue for Report Grid.
I have added below function in the Resource model
/**
* Join fields
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
protected function _joinFields($fromDate = '', $toDate = '')
{
$this->addFieldToFilter(
'created_at',
['from' => $fromDate, 'to' => $toDate, 'datetime' => true]
);
//echo $this->getSelect()->__toString();
return $this;
}
/**
* Set date range
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
public function setDateRange($fromDate, $toDate)
{
$this->_reset()->_joinFields($fromDate, $toDate);
return $this;
}
/**
* Set store filter to collection
*
* @param array $storeIds
* @return $this
*/
public function setStoreIds($storeIds)
{
if ($storeIds) {
$this->addFieldToFilter('store_id', ['in' => (array)$storeIds]);
}
return $this;
}
now its working fine :)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f252808%2fmagento-2-custom-report-grid-is-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have resolved an issue for Report Grid.
I have added below function in the Resource model
/**
* Join fields
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
protected function _joinFields($fromDate = '', $toDate = '')
{
$this->addFieldToFilter(
'created_at',
['from' => $fromDate, 'to' => $toDate, 'datetime' => true]
);
//echo $this->getSelect()->__toString();
return $this;
}
/**
* Set date range
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
public function setDateRange($fromDate, $toDate)
{
$this->_reset()->_joinFields($fromDate, $toDate);
return $this;
}
/**
* Set store filter to collection
*
* @param array $storeIds
* @return $this
*/
public function setStoreIds($storeIds)
{
if ($storeIds) {
$this->addFieldToFilter('store_id', ['in' => (array)$storeIds]);
}
return $this;
}
now its working fine :)
add a comment |
I have resolved an issue for Report Grid.
I have added below function in the Resource model
/**
* Join fields
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
protected function _joinFields($fromDate = '', $toDate = '')
{
$this->addFieldToFilter(
'created_at',
['from' => $fromDate, 'to' => $toDate, 'datetime' => true]
);
//echo $this->getSelect()->__toString();
return $this;
}
/**
* Set date range
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
public function setDateRange($fromDate, $toDate)
{
$this->_reset()->_joinFields($fromDate, $toDate);
return $this;
}
/**
* Set store filter to collection
*
* @param array $storeIds
* @return $this
*/
public function setStoreIds($storeIds)
{
if ($storeIds) {
$this->addFieldToFilter('store_id', ['in' => (array)$storeIds]);
}
return $this;
}
now its working fine :)
add a comment |
I have resolved an issue for Report Grid.
I have added below function in the Resource model
/**
* Join fields
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
protected function _joinFields($fromDate = '', $toDate = '')
{
$this->addFieldToFilter(
'created_at',
['from' => $fromDate, 'to' => $toDate, 'datetime' => true]
);
//echo $this->getSelect()->__toString();
return $this;
}
/**
* Set date range
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
public function setDateRange($fromDate, $toDate)
{
$this->_reset()->_joinFields($fromDate, $toDate);
return $this;
}
/**
* Set store filter to collection
*
* @param array $storeIds
* @return $this
*/
public function setStoreIds($storeIds)
{
if ($storeIds) {
$this->addFieldToFilter('store_id', ['in' => (array)$storeIds]);
}
return $this;
}
now its working fine :)
I have resolved an issue for Report Grid.
I have added below function in the Resource model
/**
* Join fields
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
protected function _joinFields($fromDate = '', $toDate = '')
{
$this->addFieldToFilter(
'created_at',
['from' => $fromDate, 'to' => $toDate, 'datetime' => true]
);
//echo $this->getSelect()->__toString();
return $this;
}
/**
* Set date range
*
* @param string $fromDate
* @param string $toDate
* @return $this
*/
public function setDateRange($fromDate, $toDate)
{
$this->_reset()->_joinFields($fromDate, $toDate);
return $this;
}
/**
* Set store filter to collection
*
* @param array $storeIds
* @return $this
*/
public function setStoreIds($storeIds)
{
if ($storeIds) {
$this->addFieldToFilter('store_id', ['in' => (array)$storeIds]);
}
return $this;
}
now its working fine :)
answered Dec 8 '18 at 3:56
Ketan Panchal
380111
380111
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f252808%2fmagento-2-custom-report-grid-is-not-working%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you remove <arguments> <argument name="count_totals" xsi:type="string">1</argument> </arguments>
– Pritam Info 24
Dec 7 '18 at 13:14
@PritamInfo24: I have resolved that issue, there was a collection issue in the Resource model I have added _joinFields and setDateRange function. now, i am getting "ReportJsObject is not defined". Please find link for more information: prnt.sc/lrz56b Do you have any idea??
– Ketan Panchal
Dec 7 '18 at 13:36
Did you use $this->getSelect() in your collection class to check the select query is ok or not.
– Pritam Info 24
Dec 7 '18 at 13:50
Yes it's working fine. $this->getSelect()->addFieldToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Ketan Panchal
Dec 7 '18 at 13:51
Can you try this $this->getSelect(); $this->addAttributeToFilter( 'created_at', ['from' => $fromDate, 'to' => $toDate, 'datetime' => true] );
– Pritam Info 24
Dec 7 '18 at 14:08