Page 1 of 1

Dynamic GroupHeaderBand

Posted: Tue Feb 16, 2016 1:15 pm
by mahsan
Hello
I want To set the condiontion of GroupHeaderBand dynamicly,for example when I Check the ChkBox1 ,the groupBand set group by
Column1 ,when I Check the ChkBox2 ,the groupBand set group by Column2
Is it Possible to do this?
I am Waitting eagerly for your response.

Re: Dynamic GroupHeaderBand

Posted: Tue Feb 16, 2016 8:31 pm
by Jan
Hello,

You can use following expression in group condition:

Code: Select all

{checkbox1 ? datasource.name1 : datasource.name2}
or

Code: Select all

{checkbox1 ? datasource.name1 : (checkbox2 ? datasource.name2 : datasource.name3)}
Thank you.

Re: Dynamic GroupHeaderBand

Posted: Wed Feb 17, 2016 4:54 am
by mahsan
Thank You very much.
Is it possible to write this code on Click a button In Form?

Re: Dynamic GroupHeaderBand

Posted: Wed Feb 17, 2016 12:00 pm
by HighAley
Hello.

No, could you specify what do you want to do?

Thank you.

Re: Dynamic GroupHeaderBand

Posted: Mon Feb 22, 2016 11:09 am
by mahsan
I have a groupheaderband in my report ,and there is a form with 3 radiobuttons,if User select first radiobutton the I want the report to be grouped by City ,if user select second rediobutton I want the report to be grouped by Street and if user select third rediobutton I want the report to be grouped by Country.so I need a dynamic groupheader band

Re: Dynamic GroupHeaderBand

Posted: Mon Feb 22, 2016 12:19 pm
by Alex K.
Hello,

Please try to use the following expression:

Code: Select all

{RadioButtonControl1.Checked ? datasource.name1 : (RadioButtonControl2.Checked ? datasource.name2 : datasource.name3)}
Thank you.

Re: Dynamic GroupHeaderBand

Posted: Mon Mar 07, 2016 1:26 pm
by mahsan
Thank You for Your response,But I want set the groupexpression on OnClick a button in the report form

Re: Dynamic GroupHeaderBand

Posted: Wed Mar 09, 2016 7:55 am
by HighAley
Hello.

Sorry, there is no other way to do this.
Please, set the value of a variable and then use it in the Condition expression like above.

Thank you.

Re: Dynamic GroupHeaderBand

Posted: Sun Jun 12, 2016 5:33 am
by mahsan
excuse me how can I do it with varriable ?
I create a varriable "Vargrp" as string and set the value of it with "Dt.AccCode".
and write this code below on GoupCondition in my GroupHeaderBand
------------
StiGroupConditionExpression s = new StiGroupConditionExpression();
s.Value= {Vargrp};
GrpHeader.Condition =s;

-------------
but it dosent work.please help me to solve my problem.Thanks you.

Re: Dynamic GroupHeaderBand

Posted: Mon Jun 13, 2016 6:22 am
by Alex K.
Hello,

Please send us a sample which reproduces the issue for analysis.

Thank you.