I'm new to crystal reports 2011 and I'm trying to develop a report that shows the monthly detail for years 2014 and 2015, and only summarizes years 2010-2013. I have the year as my grouping and I"m able to see all 6 years data summarized when I hide the drill down, but I want to show my customer the monthly data from 2014 and 2015 in detail. Any help would be appreciated!
0
votes
2 Answers
0
votes
There's a few ways this can be done:
- Group on both year & month. In the "section expert" dialogue, define a formula to conditionally suppress the monthly details for appropriate years, e.g.,
{table.year} < "2014"
(assuming year is a string, change as needed. - Define your own formula and then group on that custom formula, e.g.,:
if {table.year} < "2014" then {table.year} else
{table.month} & " " & {table.year}
The second one also presumes your values are stored as strings, you can use totext()
to convert non-strong values if necessary. Option 1 is probably easier to present nicely, Option 2 might give a greater level of flexibility for future use of the rpt as a template with arbitrary grouping, though might still require multiple groups and conditional suppression to have it display exactly as desired, but these should point you in the right direction.