Monday, February 20, 2012

Problem converting Crystal Report to RS2005

I've run into a problem while converting an old Crystal report into a
RS2005 version. The report in question gets a dataset from a SQL
stored procedure. The stored procedure passes details on paper
production by day, machine and grade. The report groups the data by
grade and then by machine. In the grade group footer, I perform a
calculation on the data that is as follows:
=sum(GradePeriod.value)*avg(SBK.value). This works the same as in the
crystal report. However, in the crystal report, they declare a global
variable, that basically creates a running sum of this calculation.
So in the Machine footer, it is a sum of all of the
sum(GradePeriod.value)*avg(SBK.value). Now if I try in RS to sum the
values in the footer by using
=sum(sum(GradePeriod.value)*avg(SBK.value)) I get an error that says
you cannot use an aggregate of an aggregate. So my question is, how
do I replicate what is going on in the Crystal Report in RS?In RS you need to give some thing like this in the header or footer you cant
give directly. Try this. (you should use "reportitems")
=Sum(ReportItems!Gradeperiod.Value)
Amarnath, MCTS
"dachrist" wrote:
> I've run into a problem while converting an old Crystal report into a
> RS2005 version. The report in question gets a dataset from a SQL
> stored procedure. The stored procedure passes details on paper
> production by day, machine and grade. The report groups the data by
> grade and then by machine. In the grade group footer, I perform a
> calculation on the data that is as follows:
> =sum(GradePeriod.value)*avg(SBK.value). This works the same as in the
> crystal report. However, in the crystal report, they declare a global
> variable, that basically creates a running sum of this calculation.
> So in the Machine footer, it is a sum of all of the
> sum(GradePeriod.value)*avg(SBK.value). Now if I try in RS to sum the
> values in the footer by using
> =sum(sum(GradePeriod.value)*avg(SBK.value)) I get an error that says
> you cannot use an aggregate of an aggregate. So my question is, how
> do I replicate what is going on in the Crystal Report in RS?
>|||It wants me to put the sum(ReportItems!GradePeriod.value) in the Page
Footer. I need to have these sums at each group footer, because I
cannot have one paper machine per page.
Dave
On Mar 15, 2:33 am, Amarnath <Amarn...@.discussions.microsoft.com>
wrote:
> In RS you need to give some thing like this in the header or footer you cant
> give directly. Try this. (you should use "reportitems")
> =Sum(ReportItems!Gradeperiod.Value)
> Amarnath, MCTS
>
> "dachrist" wrote:
> > I've run into a problem while converting an old Crystal report into a
> > RS2005 version. The report in question gets a dataset from a SQL
> > stored procedure. The stored procedure passes details on paper
> > production by day, machine and grade. The report groups the data by
> > grade and then by machine. In the grade group footer, I perform a
> > calculation on the data that is as follows:
> > =sum(GradePeriod.value)*avg(SBK.value). This works the same as in the
> > crystal report. However, in the crystal report, they declare a global
> > variable, that basically creates a running sum of this calculation.
> > So in the Machine footer, it is a sum of all of the
> > sum(GradePeriod.value)*avg(SBK.value). Now if I try in RS to sum the
> > values in the footer by using
> > =sum(sum(GradePeriod.value)*avg(SBK.value)) I get an error that says
> > you cannot use an aggregate of an aggregate. So my question is, how
> > do I replicate what is going on in the Crystal Report in RS... Hide quoted text -
> - Show quoted text -

No comments:

Post a Comment