Click to See Complete Forum and Search --> : Show all names in a group


sarabellaefc
June 24th, 2008, 03:17 PM
I have a report that totals by year. The year is determined by an if formula to put them into 2008, 2007 and Prior Years buckets. I want it to show all three of those names, even if there was no activity. Is that possible?

Thanks,
sara

Ned Pepper
June 27th, 2008, 04:04 PM
By nature, crystal does not do well generating values when there are no records to drive the report/function. You need to create a little view that will force some years into your report.
if you are using oracle it would be something like


create view YEARS
as
select
"YEAR"
from
(
select
rownum as "YEAR"
from
dual
connect by level < 10000
)
where "YEAR" >= 1990 and "YEAR" <=2010


You should be able to create a similar view in other SQL installations. then left outer join this view with your data and you will have years displayed even when there is no data for those years.