Author Topic: summary data in Grid query for dynmic columns  (Read 310 times)

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
summary data in Grid query for dynmic columns
« on: January 18, 2023, 08:21:37 pm »
We need the summary data in the grid but the column position cannot fix, I mean the dynamic column with different column index for any column in the grid.

As per your sample article below, here you set hardcode (revenues:'sum(C:C)'). We need to set "C:C" dynamically based on the column index. Please advise
https://paramquery.com/pro/demos/summary_json

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: summary data in Grid query for dynmic columns
« Reply #1 on: January 19, 2023, 01:31:24 pm »
Any update on this?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: summary data in Grid query for dynmic columns
« Reply #2 on: January 19, 2023, 05:37:09 pm »
you can get the letter corresponding to column index by pq.toLetter method:

https://paramquery.com/pro/api#method-toLetter

pranit@srcomsec

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 99
    • View Profile
Re: summary data in Grid query for dynmic columns
« Reply #3 on: January 20, 2023, 05:40:46 pm »
Thank you. Working great!!