Preparing reports with minimal system load when using querybuilder and pivottable

Hello

I could not see the existing "Query" parameter in the Grid component in the SfPivotView component.

What I want to do is:

We are developing reports using query builder and pivotview. There can be many records in the data source we use. In this case, the querybuilder is very slow to load. In addition, there is no need to load so many records at that stage.

For example, when making a report for invoice records, I want only customer, product, date, etc. filters in the query builder. Then we want to use the Query builder filter in the pivotview query.

What would be the best method for this?

Best Regards


1 Reply

AP AngelinFaithSheeba PaulvannanRajadurai Syncfusion Team March 23, 2022 07:51 PM UTC

Hi Seckin,

You can filter the fields from the given data source by using the "ExcludeFields" property to render the pivot table. Apart from that, there is no built-in option to filter the records in the pivot table. Please refer the code example below.

Code Example:

<SfPivotView TValue="ProductDetails" ShowFieldList="true">
         <PivotViewDataSourceSettings DataSource="@dataSource" ExcludeFields="@(new string[] { "Products", "Amount" })">
          </PivotViewDataSourceSettings>
</SfPivotView>


Meanwhile, we have prepared a sample in net6 for your reference. Please find it from below link.

Also, please refer the following documentation for more details about “ExcludeFields” property.

Please let us know if you have any concerns.


Regards,
Angelin Faith Sheeba.



Loader.
Up arrow icon