我正在尝试编写一个水晶报表,它的总计以与主报表不同的方式分组。到目前为止,我能够做到这一点的唯一方法是使用总计的子报表,但这意味着必须再次点击数据源来检索相同的数据,这似乎是无稽之谈。这是一个简化的示例:
date name earnings source location
-----------------------------------------------------------
12-AUG-2008 Tom $50.00 washing cars uptown
12-AUG-2008 Dick $100.00 washing cars downtown { main report }
12-AUG-2008 Harry $75.00 mowing lawns around town
total earnings for washing cars: $150.00 { subreport }
total earnings for mowing lawns: $75.00
date name earnings source location
-----------------------------------------------------------
13-AUG-2008 John $95.00 dog walking downtown
13-AUG-2008 Jane $105.00 washing cars around town { main report }
13-AUG-2008 Dave $65.00 mowing lawns around town
total earnings for dog walking: $95.00
total earnings for washing cars: $105.00 { subreport }
total earnings for mowing lawns: $65.00
在此示例中,主报表按“日期”分组,但总计另外按“来源”分组。我查找了使用运行总计的示例,但它们并没有真正满足我的需要。难道没有某种方法可以存储结果集并使主报表和子报表都引用相同的数据吗?