I have a crystal report that 开发者_高级运维currently shows data grouped twice.
The first group is "Region" and the second group is "Job Type". So "Regions" have groups of "Job Types".
There is a need to display this report without the "Region" group, but still maintain the second "Job Type" group. So all the data would be grouped by "Job Type", and "Region" would not be grouped at all.
Can I do this within an existing crystal report or do I have to make a second report? I can modify properties of the report using c# if necessary.
I have tried to setup dynamic grouping as shown in this post: here
But the value I am using to determine what kind of grouping to use is being set programatically in the backend. I have created a formula field called "ReportType" and I set it's value in c# based on other inputs by the user. I tried to create a formula, but the formula editor doesn't recognize "formula fields".
It depends on how you bind your report to the viewer. If the report is embedded you will have direct access to sections to enable suppress.
report.Section1.SectionFormat.EnableSuppress = true;
If you are dynamically loading the report then you have to access the sections through the ReportDefinition
report.ReportDefinition.Sections[0].SectionFormat.EnableSuppress = true;
精彩评论