开发者

counting fields based on group in crystal report

hi all i wana ask a question about crystal reporting in vs 2008

lets say i have a report with these data

customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1           xyz           3            1/1/2010
2           abc           4            2/2/2010
5           sds           21           3/12/2009
(#Group2 Normal开发者_如何学JAVACustomer)
3           tyt           2            3/3/2010
4           ha            4            21/3/2009

i want only to display records where Order_Date year is in 2010 only so i went to the section expert and i added a condintion in suppress formula Year(order_Date)=2010 and i get the result ,,the question is how to count how many vip customers ordered in 2010 only and how many normal customer order in 2010 only ,,then i want the total number of both type of customers to be displayed to have a report like that::

customer_ID Customer_Name Order_amoont Order_Date
(#group1 VipCustomer)
1           xyz           3            1/1/2010
2           abc           4            2/2/2010
subtotal 2
(#Group2 NormalCustomer)
3           tyt           2            3/3/2010
subtotal 1

total 3


i know that answer ,and i will answer it

1-make a conditional formula field and add to it this condtion

if year(Order_Date)=2010 then 1 2-then add summary to the formula filed --to get total place this summary in the report footer --to get sub-total place this symmary in group footer

there is also another way to do it by using running total field and it evaluate section us the formula year(Order_Date)=2010

then to get total place the running field in report footer to get sub-total make a new running field the same as the 1st but in the reset section check on reset of change of group and place this field in group footer

thnx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜