Page 1 of 1

Grouping charts

Posted: Tue Dec 08, 2020 3:56 pm
by pvb
Hello,

I have data like this:

Code: Select all

ProductID	Value
2690		1	
2690		2
2690		3
2691		1
2691		2
2691		3	 

I want to present values for every ProductID on different chart. Like this one:
monthly_stats_tn.jpg
monthly_stats_tn.jpg (10.08 KiB) Viewed 5171 times
I tried to use a solution from example (viewtopic.php?t=57239) using Variable which is set in Before Print event for group heder and then used in chart Filters property. It works fine in desktop Designer but it does not work in PHP version. Probably beacuse Before Print is not supported.

Am I right? Is there any other solution which can give me the same result?

Thank you in advance.

Re: Grouping charts

Posted: Wed Dec 09, 2020 7:45 am
by Lech Kulikowski
Hello,

What code do you use in the BeforePrint event?
It should be converted to JavaScript.

> I want to present values for every ProductID on different chart. Like this one:

You can add the "Data from Other Data source" with grouping by ID and then use it as a master data source.

Thank you.

Re: Grouping charts

Posted: Tue Dec 15, 2020 5:22 pm
by pvb
This are my settings:

1) Variable definition:
CurrentFilter (int)

2) Setting variable in Before Print event for Group1

Code: Select all

CurrentFilter = Orders.CustomerID
23 Filters property of clustered chart set to:

Code: Select all

Orders.CustomerID == CurrentFilter

Re: Grouping charts

Posted: Wed Dec 16, 2020 12:00 am
by Lech Kulikowski
Hello,

Thank you for the information.

Re: Grouping charts

Posted: Wed Dec 16, 2020 8:28 am
by HighAley
Hello,

Please, try to use the next code in the BeforePrint event:

Code: Select all

CurrentFilter = Orders.getData("CustomerID");
Thank you.

Re: Grouping charts

Posted: Wed Dec 16, 2020 9:22 am
by pvb
Hello,

Thank you for the answer. It works.

BTW: I have found another workaround solution:
1) Create master-detail report.
2) Add master and detail band to report.
3) Set master and detail height to 0 (setting Enabled=False for detail band does not work, because section is not processed)
3) Add group header for detail band.
4) Put chart on group header. Do not set any data assingment.

Re: Grouping charts

Posted: Thu Dec 17, 2020 7:48 am
by HighAley
Hello,

We are always glad to help you.

Thank you.