Group by condition
Group by condition
Hi,
Is there any way to define groupheaderband with multiple conditions? Say, for instance, before generating a report, I can select from a drop down list to select the group by condition to have say by user; by department or by title. Then, if I select by user, the report will look like this:
John Smith (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
Ann Jones Manager Finance Male (as DataBand)
If I select by Dept, then the report becomes:
Finance (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones Manager Finance Male (as DataBand)
If I select by Title, then the report becomes:
Manager (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones Manager Finance Male (as DataBand)
In other words, the report grouping is generated according to the user selection.
Thanks in advance for your advise.
Is there any way to define groupheaderband with multiple conditions? Say, for instance, before generating a report, I can select from a drop down list to select the group by condition to have say by user; by department or by title. Then, if I select by user, the report will look like this:
John Smith (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
Ann Jones Manager Finance Male (as DataBand)
If I select by Dept, then the report becomes:
Finance (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones Manager Finance Male (as DataBand)
If I select by Title, then the report becomes:
Manager (as GroupHeaderBand)
Name Title Dept Gender (as GroupHeaderBand)
John Smith Manager Finance Male (as DataBand)
Ann Jones Manager Finance Male (as DataBand)
In other words, the report grouping is generated according to the user selection.
Thanks in advance for your advise.
Re: Group by condition
Hello.
It's possible to change Condition of the report in the events or create several Conditions and Enable what you need.
Thank you.
It's possible to change Condition of the report in the events or create several Conditions and Enable what you need.
Thank you.
Re: Group by condition
Hi,
Can you explain how it can be done? Or direct me to any doc or video to show how to do it? Thanks.
Can you explain how it can be done? Or direct me to any doc or video to show how to do it? Thanks.
Re: Group by condition
Hello.
Please, read the 1.3 Conditional Formatting section of the Stimulsoft User Manual.
Also you could watch the videos on our site: http://www.stimulsoft.com/en/videos?tag ... conditions
Thank you.
Please, read the 1.3 Conditional Formatting section of the Stimulsoft User Manual.
Also you could watch the videos on our site: http://www.stimulsoft.com/en/videos?tag ... conditions
Thank you.
Re: Group by condition
Hi,
Can I set a variable, say varGroupBy as a GroupHeaderBand condition such that varGroupBy is passed from a Flex program? Taking the example above, varGroupBy can be a Dept or Title. Thanks.
Can I set a variable, say varGroupBy as a GroupHeaderBand condition such that varGroupBy is passed from a Flex program? Taking the example above, varGroupBy can be a Dept or Title. Thanks.
Re: Group by condition
Hello.
It's possible to use more simple way. You could set the Condition of the StiGroupHeaderBand. Here is a sample sode:
Thank you.
It's possible to use more simple way. You could set the Condition of the StiGroupHeaderBand. Here is a sample sode:
Code: Select all
var gb: StiGroupHeaderBand = report.getComponentByName("GroubBand1") as StiGroupHeaderBand;
gb.condition.value = "{Employees.ID}";
Re: Group by condition
Hi,
Thanks for the code, it works fine. Now able to group by different StiGroupHeaderBand Condition based on what is passed from Flex. Like in the tutorial video of Creating Reports with Group, we can define a text component that is same as the condition (in the video, the expression is {Customers.ContactTitle}) such that can the group change, the Customers.ContactTitle for that group will be printed. In other words, each group will have a different Customers.ContactTitle content printed. To illustrate, it will be like this:
Manager
Name Title Gender
Robert Smith
Thanks for the code, it works fine. Now able to group by different StiGroupHeaderBand Condition based on what is passed from Flex. Like in the tutorial video of Creating Reports with Group, we can define a text component that is same as the condition (in the video, the expression is {Customers.ContactTitle}) such that can the group change, the Customers.ContactTitle for that group will be printed. In other words, each group will have a different Customers.ContactTitle content printed. To illustrate, it will be like this:
Manager
Name Title Gender
Robert Smith
Re: Group by condition
sorry, accidently submitted the reply before finishing the message, continue here
Manager
Name Title Gender
Robert Smith Manager Male
Clerk
Name Title Gender
Amy Jones Clerk Male
The question is how can I pass this {Customers.ContactTitle} from Flex. Please note that this {Customers.ContactTitle} is a variable, it may a different group by condition. I have tried to create a variable say flexCondition and I set the content in flex app but the result turned out to have the group header remain unchanged. The result is as follow:
Manager
Name Title Gender
Robert Smith Manager Male
Manager (expect to be Clerk but remain as Manager)
Name Title Gender
Amy Jones Clerk Male
Manager (expect to be Junior Clerk but remain as Manager)
Name Title Gender
Peter Jones Junior Clerk Male
Thanks.
Manager
Name Title Gender
Robert Smith Manager Male
Clerk
Name Title Gender
Amy Jones Clerk Male
The question is how can I pass this {Customers.ContactTitle} from Flex. Please note that this {Customers.ContactTitle} is a variable, it may a different group by condition. I have tried to create a variable say flexCondition and I set the content in flex app but the result turned out to have the group header remain unchanged. The result is as follow:
Manager
Name Title Gender
Robert Smith Manager Male
Manager (expect to be Clerk but remain as Manager)
Name Title Gender
Amy Jones Clerk Male
Manager (expect to be Junior Clerk but remain as Manager)
Name Title Gender
Peter Jones Junior Clerk Male
Thanks.
Re: Group by condition
Hello.
You should do the same with the text component on the Group header:
Thank you.
You should do the same with the text component on the Group header:
Code: Select all
var txt: StiText = report.getComponentByName("Text1") as StiText;
txt.text.value = "{Employees.ID}";
Re: Group by condition
Hi, Aleksey:
can I set condition = {Employees.Department},{Employees.Project} ?
in other words, I need to group by Employee Department and Project at the same time, in my case, I need to set multiple grouping level, at each level, I need to group by more than one fields.
please let me know if this is possible, I tried in code it does not give me error, but it does not produce correct groupping
can I set condition = {Employees.Department},{Employees.Project} ?
in other words, I need to group by Employee Department and Project at the same time, in my case, I need to set multiple grouping level, at each level, I need to group by more than one fields.
please let me know if this is possible, I tried in code it does not give me error, but it does not produce correct groupping