g:\surround\reportingservice\c5\c5 standard rapporter\Finans rapport.rdl
The
expression for the chart 'chart1' has a scope parameter that is not valid
for RunningValue, RowNumber or Previous. The scope parameter must be set
to
a string constant that is equal to the name of a containing group within
the
matrix 'chart1'.
I get that error when trying to make a running value in a chart.
I need to have the months summed together month for month to show the
progress between different fiscal years and budget, now it shows each
months
values.
this is the expression
=RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
Chart1 is the name of the chart, I also tried with the
chart1_CategoryGroup1
in the region value but same result !
Jack
--
Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
Den har indtil videre sparet mig for at få 45077 spam-mails.
Betalende brugere får ikke denne besked i deres e-mails.
Hent gratis SPAMfighter her: www.spamfighter.dkIs this RS 2000? RunningValues in charts are not supported in RS 2000, only
in RS 2005.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
news:ehm$ZVvvFHA.252@.TK2MSFTNGP09.phx.gbl...
> g:\surround\reportingservice\c5\c5 standard rapporter\Finans rapport.rdl
> The
> expression for the chart 'chart1' has a scope parameter that is not valid
> for RunningValue, RowNumber or Previous. The scope parameter must be set
> to
> a string constant that is equal to the name of a containing group within
> the
> matrix 'chart1'.
> I get that error when trying to make a running value in a chart.
> I need to have the months summed together month for month to show the
> progress between different fiscal years and budget, now it shows each
> months
> values.
> this is the expression
> =RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
> Chart1 is the name of the chart, I also tried with the
> chart1_CategoryGroup1
> in the region value but same result !
> Jack
>
>
> --
> Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> Den har indtil videre sparet mig for at få 45077 spam-mails.
> Betalende brugere får ikke denne besked i deres e-mails.
> Hent gratis SPAMfighter her: www.spamfighter.dk
>|||Yes it is RS 2000, how is it possible to do make a chart where the months
are added to eachother each month, a temporary table ?
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> skrev i en meddelelse
news:%23LFJprwvFHA.596@.TK2MSFTNGP12.phx.gbl...
> Is this RS 2000? RunningValues in charts are not supported in RS 2000,
only
> in RS 2005.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
> news:ehm$ZVvvFHA.252@.TK2MSFTNGP09.phx.gbl...
> > g:\surround\reportingservice\c5\c5 standard rapporter\Finans rapport.rdl
> > The
> > expression for the chart 'chart1' has a scope parameter that is not
valid
> > for RunningValue, RowNumber or Previous. The scope parameter must be
set
> > to
> > a string constant that is equal to the name of a containing group within
> > the
> > matrix 'chart1'.
> >
> > I get that error when trying to make a running value in a chart.
> >
> > I need to have the months summed together month for month to show the
> > progress between different fiscal years and budget, now it shows each
> > months
> > values.
> >
> > this is the expression
> >
> > =RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
> > Chart1 is the name of the chart, I also tried with the
> > chart1_CategoryGroup1
> > in the region value but same result !
> >
> > Jack
> >
> >
> >
> >
> > --
> > Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> > Den har indtil videre sparet mig for at få 45077 spam-mails.
> > Betalende brugere får ikke denne besked i deres e-mails.
> > Hent gratis SPAMfighter her: www.spamfighter.dk
> >
> >
>|||Yes, for RS 2000 you should perform the calculation inside the query or in a
stored procedure.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jack Nielsen" <nospamjackd@.jackd.dk (Fjern nospam)> wrote in message
news:%23DFrJf2vFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Yes it is RS 2000, how is it possible to do make a chart where the months
> are added to eachother each month, a temporary table ?
>
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> skrev i en
> meddelelse
> news:%23LFJprwvFHA.596@.TK2MSFTNGP12.phx.gbl...
>> Is this RS 2000? RunningValues in charts are not supported in RS 2000,
> only
>> in RS 2005.
>> -- Robert
>> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>>
>> "Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
>> news:ehm$ZVvvFHA.252@.TK2MSFTNGP09.phx.gbl...
>> > g:\surround\reportingservice\c5\c5 standard rapporter\Finans
>> > rapport.rdl
>> > The
>> > expression for the chart 'chart1' has a scope parameter that is not
> valid
>> > for RunningValue, RowNumber or Previous. The scope parameter must be
> set
>> > to
>> > a string constant that is equal to the name of a containing group
>> > within
>> > the
>> > matrix 'chart1'.
>> >
>> > I get that error when trying to make a running value in a chart.
>> >
>> > I need to have the months summed together month for month to show the
>> > progress between different fiscal years and budget, now it shows each
>> > months
>> > values.
>> >
>> > this is the expression
>> >
>> > =RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
>> > Chart1 is the name of the chart, I also tried with the
>> > chart1_CategoryGroup1
>> > in the region value but same result !
>> >
>> > Jack
>> >
>> >
>> >
>> >
>> > --
>> > Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
>> > Den har indtil videre sparet mig for at få 45077 spam-mails.
>> > Betalende brugere får ikke denne besked i deres e-mails.
>> > Hent gratis SPAMfighter her: www.spamfighter.dk
>> >
>> >
>>
>|||I am using RS 2005 but still can't get the running value function to work.
The expression doesn't cause any errors - the totals simply don't "run".
They are plotted as single values. Any thoughts?
"Robert Bruckner [MSFT]" wrote:
> Yes, for RS 2000 you should perform the calculation inside the query or in a
> stored procedure.
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Jack Nielsen" <nospamjackd@.jackd.dk (Fjern nospam)> wrote in message
> news:%23DFrJf2vFHA.3236@.TK2MSFTNGP14.phx.gbl...
> > Yes it is RS 2000, how is it possible to do make a chart where the months
> > are added to eachother each month, a temporary table ?
> >
> >
> > "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> skrev i en
> > meddelelse
> > news:%23LFJprwvFHA.596@.TK2MSFTNGP12.phx.gbl...
> >> Is this RS 2000? RunningValues in charts are not supported in RS 2000,
> > only
> >> in RS 2005.
> >>
> >> -- Robert
> >> This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> >>
> >>
> >> "Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
> >> news:ehm$ZVvvFHA.252@.TK2MSFTNGP09.phx.gbl...
> >> > g:\surround\reportingservice\c5\c5 standard rapporter\Finans
> >> > rapport.rdl
> >> > The
> >> > expression for the chart 'chart1' has a scope parameter that is not
> > valid
> >> > for RunningValue, RowNumber or Previous. The scope parameter must be
> > set
> >> > to
> >> > a string constant that is equal to the name of a containing group
> >> > within
> >> > the
> >> > matrix 'chart1'.
> >> >
> >> > I get that error when trying to make a running value in a chart.
> >> >
> >> > I need to have the months summed together month for month to show the
> >> > progress between different fiscal years and budget, now it shows each
> >> > months
> >> > values.
> >> >
> >> > this is the expression
> >> >
> >> > =RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
> >> > Chart1 is the name of the chart, I also tried with the
> >> > chart1_CategoryGroup1
> >> > in the region value but same result !
> >> >
> >> > Jack
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> >> > Den har indtil videre sparet mig for at fÃ?Â¥ 45077 spam-mails.
> >> > Betalende brugere fÃ?Â¥r ikke denne besked i deres e-mails.
> >> > Hent gratis SPAMfighter her: www.spamfighter.dk
> >> >
> >> >
> >>
> >>
> >
> >
>
>|||I found a new thread where Robert Bruckner answers this question. The thread
is titled RunningValue in a chart - scope issues. My issue was using a
category group rather than a series group. Works great now.
"john" wrote:
> I am using RS 2005 but still can't get the running value function to work.
> The expression doesn't cause any errors - the totals simply don't "run".
> They are plotted as single values. Any thoughts?
> "Robert Bruckner [MSFT]" wrote:
> > Yes, for RS 2000 you should perform the calculation inside the query or in a
> > stored procedure.
> >
> > -- Robert
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> >
> > "Jack Nielsen" <nospamjackd@.jackd.dk (Fjern nospam)> wrote in message
> > news:%23DFrJf2vFHA.3236@.TK2MSFTNGP14.phx.gbl...
> > > Yes it is RS 2000, how is it possible to do make a chart where the months
> > > are added to eachother each month, a temporary table ?
> > >
> > >
> > > "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> skrev i en
> > > meddelelse
> > > news:%23LFJprwvFHA.596@.TK2MSFTNGP12.phx.gbl...
> > >> Is this RS 2000? RunningValues in charts are not supported in RS 2000,
> > > only
> > >> in RS 2005.
> > >>
> > >> -- Robert
> > >> This posting is provided "AS IS" with no warranties, and confers no
> > > rights.
> > >>
> > >>
> > >> "Jack Nielsen" <no_spam jack.nielsen@.get2net.dk> wrote in message
> > >> news:ehm$ZVvvFHA.252@.TK2MSFTNGP09.phx.gbl...
> > >> > g:\surround\reportingservice\c5\c5 standard rapporter\Finans
> > >> > rapport.rdl
> > >> > The
> > >> > expression for the chart 'chart1' has a scope parameter that is not
> > > valid
> > >> > for RunningValue, RowNumber or Previous. The scope parameter must be
> > > set
> > >> > to
> > >> > a string constant that is equal to the name of a containing group
> > >> > within
> > >> > the
> > >> > matrix 'chart1'.
> > >> >
> > >> > I get that error when trying to make a running value in a chart.
> > >> >
> > >> > I need to have the months summed together month for month to show the
> > >> > progress between different fiscal years and budget, now it shows each
> > >> > months
> > >> > values.
> > >> >
> > >> > this is the expression
> > >> >
> > >> > =RunningValue(Fields!belxbdkk.Value, Sum, 'chart1')
> > >> > Chart1 is the name of the chart, I also tried with the
> > >> > chart1_CategoryGroup1
> > >> > in the region value but same result !
> > >> >
> > >> > Jack
> > >> >
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Jeg beskyttes af den gratis SPAMfighter til privatbrugere.
> > >> > Den har indtil videre sparet mig for at fÃ?Â¥ 45077 spam-mails.
> > >> > Betalende brugere fÃ?Â¥r ikke denne besked i deres e-mails.
> > >> > Hent gratis SPAMfighter her: www.spamfighter.dk
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
> >
Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts
Wednesday, March 28, 2012
Monday, March 26, 2012
Running Total in Crystal vs RS
In RS, Scope tells the Aggregate function when to Re-set. Is there any other
argument to define when to Evaluate the expression. (equivalent of "Evaluate
on Change of Group" in crystal report for a Running Total field)No, but I don't believe that such an argument is needed. Could you describe
what you're trying to do?
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> In RS, Scope tells the Aggregate function when to Re-set. Is there any
other
> argument to define when to Evaluate the expression. (equivalent of
"Evaluate
> on Change of Group" in crystal report for a Running Total field)
>
>|||:(
I've a report which has the following groupings:
group 1 : Client Name
group 2: Business Line
group 3: Brand
group 4: RecID
I need to display the total cost in the group3 footer and has expression
Runningvalue(fields!extended_price,SUM,"group3")
where "fields!extended_price" is a formula field -
FindExtPrice(fields!recID,fields!list_price)
When there are more than 1 records in the group3, the total cost is eing
calculated for each of the record in the grop3. Since they both have the
same recID, I need to calculate the total only if the rec ID changes i.e
Evaluate on Change of Group4. I have exactly same rpeort working in crystal
report but can not replicate in RS.
Hope I'm able to explain the issue.
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> No, but I don't believe that such an argument is needed. Could you
describe
> what you're trying to do?
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "newmem" <""> wrote in message
news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > In RS, Scope tells the Aggregate function when to Re-set. Is there any
> other
> > argument to define when to Evaluate the expression. (equivalent of
> "Evaluate
> > on Change of Group" in crystal report for a Running Total field)
> >
> >
> >
>|||I'm not entirely sure I understand, but it sounds like this might be a case
which would require aggregates of aggregates.
Let me draw a simplified example to see if I understand it (I'm going to
skip one of the groups and just use a simple Price field):
Based on your description, I think your data looks something like this:
Client Brand Rec Item Price
C1 B1 R1 I1 10
C1 B1 R1 I2 10
C1 B1 R2 I1 22
C1 B1 R2 I2 22
C1 B2 R1 I1 35
C1 B2 R1 I2 35
C1 B2 R2 I1 20
C1 B2 R2 I2 20
C1 B2 R2 I3 20
...etc...
The Price column includes denormalized data (it has the same value for every
Item within a Rec)
Since the data is denormalized, when calculating the total price per Brand,
you want to ignore the duplicates.
So in the above example, you would want this:
Client Brand Total Price
C1 B1 32
C1 B2 55
Rather than this:
Client Brand Total Price
C1 B1 64
C1 B2 130
And in Crystal, you're using their RunningValue function to achieve this
(even though it isn't really a running value)
Is that correct so far?
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> :(
> I've a report which has the following groupings:
> group 1 : Client Name
> group 2: Business Line
> group 3: Brand
> group 4: RecID
> I need to display the total cost in the group3 footer and has expression
> Runningvalue(fields!extended_price,SUM,"group3")
> where "fields!extended_price" is a formula field -
> FindExtPrice(fields!recID,fields!list_price)
> When there are more than 1 records in the group3, the total cost is eing
> calculated for each of the record in the grop3. Since they both have the
> same recID, I need to calculate the total only if the rec ID changes i.e
> Evaluate on Change of Group4. I have exactly same rpeort working in
crystal
> report but can not replicate in RS.
> Hope I'm able to explain the issue.
> "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > No, but I don't believe that such an argument is needed. Could you
> describe
> > what you're trying to do?
> >
> > --
> > My employer's lawyers require me to say:
> > "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> >
> > "newmem" <""> wrote in message
> news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > In RS, Scope tells the Aggregate function when to Re-set. Is there any
> > other
> > > argument to define when to Evaluate the expression. (equivalent of
> > "Evaluate
> > > on Change of Group" in crystal report for a Running Total field)
> > >
> > >
> > >
> >
> >
>|||apologize for the late reply.
I think you have described the problem correctly. How do i get rid of the
duplicates and perform the aggregate in RS?
Thanks.
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
news:%230v$NHgZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> I'm not entirely sure I understand, but it sounds like this might be a
case
> which would require aggregates of aggregates.
> Let me draw a simplified example to see if I understand it (I'm going to
> skip one of the groups and just use a simple Price field):
> Based on your description, I think your data looks something like this:
> Client Brand Rec Item Price
> C1 B1 R1 I1 10
> C1 B1 R1 I2 10
> C1 B1 R2 I1 22
> C1 B1 R2 I2 22
> C1 B2 R1 I1 35
> C1 B2 R1 I2 35
> C1 B2 R2 I1 20
> C1 B2 R2 I2 20
> C1 B2 R2 I3 20
> ...etc...
> The Price column includes denormalized data (it has the same value for
every
> Item within a Rec)
> Since the data is denormalized, when calculating the total price per
Brand,
> you want to ignore the duplicates.
> So in the above example, you would want this:
> Client Brand Total Price
> C1 B1 32
> C1 B2 55
> Rather than this:
> Client Brand Total Price
> C1 B1 64
> C1 B2 130
> And in Crystal, you're using their RunningValue function to achieve this
> (even though it isn't really a running value)
> Is that correct so far?
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "newmem" <""> wrote in message
news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > :(
> > I've a report which has the following groupings:
> > group 1 : Client Name
> > group 2: Business Line
> > group 3: Brand
> > group 4: RecID
> >
> > I need to display the total cost in the group3 footer and has expression
> > Runningvalue(fields!extended_price,SUM,"group3")
> > where "fields!extended_price" is a formula field -
> > FindExtPrice(fields!recID,fields!list_price)
> >
> > When there are more than 1 records in the group3, the total cost is eing
> > calculated for each of the record in the grop3. Since they both have the
> > same recID, I need to calculate the total only if the rec ID changes i.e
> > Evaluate on Change of Group4. I have exactly same rpeort working in
> crystal
> > report but can not replicate in RS.
> >
> > Hope I'm able to explain the issue.
> >
> > "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> > news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > > No, but I don't believe that such an argument is needed. Could you
> > describe
> > > what you're trying to do?
> > >
> > > --
> > > My employer's lawyers require me to say:
> > > "This posting is provided 'AS IS' with no warranties, and confers no
> > > rights."
> > >
> > > "newmem" <""> wrote in message
> > news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > > In RS, Scope tells the Aggregate function when to Re-set. Is there
any
> > > other
> > > > argument to define when to Evaluate the expression. (equivalent of
> > > "Evaluate
> > > > on Change of Group" in crystal report for a Running Total field)
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||I was afraid you were going to say that.
The *right* way to do this would be with an aggregate of an aggregate, such
as this:
=Sum(First(Fields!Price.Value,"RecGroup"))
This would sum the first Price within each Rec.
Unfortunately, aggregates of aggregates isn't supported in the current
release. (Since this comes up a lot, I'm pushing to get them added to SQL
2005, but the schedule is really tight so odds aren't good at the moment).
There are several ways around this, all of which involve modifying your
query.
I'll show examples based on my earlier simplified example below.
Option 1: Remove the duplicates
Change your query to return this:
Client Brand Rec Item Price
C1 B1 R1 I1 10
C1 B1 R1 I2 NULL
C1 B1 R2 I1 22
C1 B1 R2 I2 NULL
C1 B2 R1 I1 35
C1 B2 R1 I2 NULL
C1 B2 R2 I1 20
C1 B2 R2 I2 NULL
C1 B2 R2 I3 NULL
...etc...
And then you can simply =Sum(Fields!Price.Value)
Option 2: Include a count of duplicates
Change your query to return this:
Client Brand Rec Item Price Items
C1 B1 R1 I1 10 2
C1 B1 R1 I2 10 2
C1 B1 R2 I1 22 2
C1 B1 R2 I2 22 2
C1 B2 R1 I1 35 2
C1 B2 R1 I2 35 2
C1 B2 R2 I1 20 3
C1 B2 R2 I2 20 3
C1 B2 R2 I3 20 3
...etc...
And then you can: =Sum(Fields!Price.Value/Fields!Items.Value)
Option 3: Preaggregate
Change your query to return this:
Client Brand Rec Item Price BrandPrice
C1 B1 R1 I1 10 32
C1 B1 R1 I2 10 32
C1 B1 R2 I1 22 32
C1 B1 R2 I2 22 32
C1 B2 R1 I1 35 55
C1 B2 R1 I2 35 55
C1 B2 R2 I1 20 55
C1 B2 R2 I2 20 55
C1 B2 R2 I3 20 55
...etc...
And then you can do this for Brand: =First(Fields!BrandPrice.Value)
And this for Rec: =First(Fields!Price.Value)
This approach is simplest to write the query for but least useful since you
need a preaggregate for each level (you'll need one for Client as well, for
example)
Sorry I don't have a simpler answer for you. Like I said, I really want to
get aggregates of aggregates into the next release because this sort of
thing comes up quite a lot. But for now you're unfortunately stuck with a
query-based workaround.
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message
news:un6u9%23AaEHA.3692@.TK2MSFTNGP09.phx.gbl...
> apologize for the late reply.
> I think you have described the problem correctly. How do i get rid of the
> duplicates and perform the aggregate in RS?
> Thanks.
> "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> news:%230v$NHgZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > I'm not entirely sure I understand, but it sounds like this might be a
> case
> > which would require aggregates of aggregates.
> > Let me draw a simplified example to see if I understand it (I'm going to
> > skip one of the groups and just use a simple Price field):
> >
> > Based on your description, I think your data looks something like this:
> >
> > Client Brand Rec Item Price
> > C1 B1 R1 I1 10
> > C1 B1 R1 I2 10
> > C1 B1 R2 I1 22
> > C1 B1 R2 I2 22
> > C1 B2 R1 I1 35
> > C1 B2 R1 I2 35
> > C1 B2 R2 I1 20
> > C1 B2 R2 I2 20
> > C1 B2 R2 I3 20
> > ...etc...
> >
> > The Price column includes denormalized data (it has the same value for
> every
> > Item within a Rec)
> > Since the data is denormalized, when calculating the total price per
> Brand,
> > you want to ignore the duplicates.
> >
> > So in the above example, you would want this:
> > Client Brand Total Price
> > C1 B1 32
> > C1 B2 55
> >
> > Rather than this:
> > Client Brand Total Price
> > C1 B1 64
> > C1 B2 130
> >
> > And in Crystal, you're using their RunningValue function to achieve this
> > (even though it isn't really a running value)
> > Is that correct so far?
> >
> > --
> > My employer's lawyers require me to say:
> > "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> >
> > "newmem" <""> wrote in message
> news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > > :(
> > > I've a report which has the following groupings:
> > > group 1 : Client Name
> > > group 2: Business Line
> > > group 3: Brand
> > > group 4: RecID
> > >
> > > I need to display the total cost in the group3 footer and has
expression
> > > Runningvalue(fields!extended_price,SUM,"group3")
> > > where "fields!extended_price" is a formula field -
> > > FindExtPrice(fields!recID,fields!list_price)
> > >
> > > When there are more than 1 records in the group3, the total cost is
eing
> > > calculated for each of the record in the grop3. Since they both have
the
> > > same recID, I need to calculate the total only if the rec ID changes
i.e
> > > Evaluate on Change of Group4. I have exactly same rpeort working in
> > crystal
> > > report but can not replicate in RS.
> > >
> > > Hope I'm able to explain the issue.
> > >
> > > "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> > > news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > > > No, but I don't believe that such an argument is needed. Could you
> > > describe
> > > > what you're trying to do?
> > > >
> > > > --
> > > > My employer's lawyers require me to say:
> > > > "This posting is provided 'AS IS' with no warranties, and confers no
> > > > rights."
> > > >
> > > > "newmem" <""> wrote in message
> > > news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > > > In RS, Scope tells the Aggregate function when to Re-set. Is there
> any
> > > > other
> > > > > argument to define when to Evaluate the expression. (equivalent of
> > > > "Evaluate
> > > > > on Change of Group" in crystal report for a Running Total field)
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
argument to define when to Evaluate the expression. (equivalent of "Evaluate
on Change of Group" in crystal report for a Running Total field)No, but I don't believe that such an argument is needed. Could you describe
what you're trying to do?
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> In RS, Scope tells the Aggregate function when to Re-set. Is there any
other
> argument to define when to Evaluate the expression. (equivalent of
"Evaluate
> on Change of Group" in crystal report for a Running Total field)
>
>|||:(
I've a report which has the following groupings:
group 1 : Client Name
group 2: Business Line
group 3: Brand
group 4: RecID
I need to display the total cost in the group3 footer and has expression
Runningvalue(fields!extended_price,SUM,"group3")
where "fields!extended_price" is a formula field -
FindExtPrice(fields!recID,fields!list_price)
When there are more than 1 records in the group3, the total cost is eing
calculated for each of the record in the grop3. Since they both have the
same recID, I need to calculate the total only if the rec ID changes i.e
Evaluate on Change of Group4. I have exactly same rpeort working in crystal
report but can not replicate in RS.
Hope I'm able to explain the issue.
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> No, but I don't believe that such an argument is needed. Could you
describe
> what you're trying to do?
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "newmem" <""> wrote in message
news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > In RS, Scope tells the Aggregate function when to Re-set. Is there any
> other
> > argument to define when to Evaluate the expression. (equivalent of
> "Evaluate
> > on Change of Group" in crystal report for a Running Total field)
> >
> >
> >
>|||I'm not entirely sure I understand, but it sounds like this might be a case
which would require aggregates of aggregates.
Let me draw a simplified example to see if I understand it (I'm going to
skip one of the groups and just use a simple Price field):
Based on your description, I think your data looks something like this:
Client Brand Rec Item Price
C1 B1 R1 I1 10
C1 B1 R1 I2 10
C1 B1 R2 I1 22
C1 B1 R2 I2 22
C1 B2 R1 I1 35
C1 B2 R1 I2 35
C1 B2 R2 I1 20
C1 B2 R2 I2 20
C1 B2 R2 I3 20
...etc...
The Price column includes denormalized data (it has the same value for every
Item within a Rec)
Since the data is denormalized, when calculating the total price per Brand,
you want to ignore the duplicates.
So in the above example, you would want this:
Client Brand Total Price
C1 B1 32
C1 B2 55
Rather than this:
Client Brand Total Price
C1 B1 64
C1 B2 130
And in Crystal, you're using their RunningValue function to achieve this
(even though it isn't really a running value)
Is that correct so far?
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> :(
> I've a report which has the following groupings:
> group 1 : Client Name
> group 2: Business Line
> group 3: Brand
> group 4: RecID
> I need to display the total cost in the group3 footer and has expression
> Runningvalue(fields!extended_price,SUM,"group3")
> where "fields!extended_price" is a formula field -
> FindExtPrice(fields!recID,fields!list_price)
> When there are more than 1 records in the group3, the total cost is eing
> calculated for each of the record in the grop3. Since they both have the
> same recID, I need to calculate the total only if the rec ID changes i.e
> Evaluate on Change of Group4. I have exactly same rpeort working in
crystal
> report but can not replicate in RS.
> Hope I'm able to explain the issue.
> "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > No, but I don't believe that such an argument is needed. Could you
> describe
> > what you're trying to do?
> >
> > --
> > My employer's lawyers require me to say:
> > "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> >
> > "newmem" <""> wrote in message
> news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > In RS, Scope tells the Aggregate function when to Re-set. Is there any
> > other
> > > argument to define when to Evaluate the expression. (equivalent of
> > "Evaluate
> > > on Change of Group" in crystal report for a Running Total field)
> > >
> > >
> > >
> >
> >
>|||apologize for the late reply.
I think you have described the problem correctly. How do i get rid of the
duplicates and perform the aggregate in RS?
Thanks.
"Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
news:%230v$NHgZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> I'm not entirely sure I understand, but it sounds like this might be a
case
> which would require aggregates of aggregates.
> Let me draw a simplified example to see if I understand it (I'm going to
> skip one of the groups and just use a simple Price field):
> Based on your description, I think your data looks something like this:
> Client Brand Rec Item Price
> C1 B1 R1 I1 10
> C1 B1 R1 I2 10
> C1 B1 R2 I1 22
> C1 B1 R2 I2 22
> C1 B2 R1 I1 35
> C1 B2 R1 I2 35
> C1 B2 R2 I1 20
> C1 B2 R2 I2 20
> C1 B2 R2 I3 20
> ...etc...
> The Price column includes denormalized data (it has the same value for
every
> Item within a Rec)
> Since the data is denormalized, when calculating the total price per
Brand,
> you want to ignore the duplicates.
> So in the above example, you would want this:
> Client Brand Total Price
> C1 B1 32
> C1 B2 55
> Rather than this:
> Client Brand Total Price
> C1 B1 64
> C1 B2 130
> And in Crystal, you're using their RunningValue function to achieve this
> (even though it isn't really a running value)
> Is that correct so far?
> --
> My employer's lawyers require me to say:
> "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> "newmem" <""> wrote in message
news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > :(
> > I've a report which has the following groupings:
> > group 1 : Client Name
> > group 2: Business Line
> > group 3: Brand
> > group 4: RecID
> >
> > I need to display the total cost in the group3 footer and has expression
> > Runningvalue(fields!extended_price,SUM,"group3")
> > where "fields!extended_price" is a formula field -
> > FindExtPrice(fields!recID,fields!list_price)
> >
> > When there are more than 1 records in the group3, the total cost is eing
> > calculated for each of the record in the grop3. Since they both have the
> > same recID, I need to calculate the total only if the rec ID changes i.e
> > Evaluate on Change of Group4. I have exactly same rpeort working in
> crystal
> > report but can not replicate in RS.
> >
> > Hope I'm able to explain the issue.
> >
> > "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> > news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > > No, but I don't believe that such an argument is needed. Could you
> > describe
> > > what you're trying to do?
> > >
> > > --
> > > My employer's lawyers require me to say:
> > > "This posting is provided 'AS IS' with no warranties, and confers no
> > > rights."
> > >
> > > "newmem" <""> wrote in message
> > news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > > In RS, Scope tells the Aggregate function when to Re-set. Is there
any
> > > other
> > > > argument to define when to Evaluate the expression. (equivalent of
> > > "Evaluate
> > > > on Change of Group" in crystal report for a Running Total field)
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||I was afraid you were going to say that.
The *right* way to do this would be with an aggregate of an aggregate, such
as this:
=Sum(First(Fields!Price.Value,"RecGroup"))
This would sum the first Price within each Rec.
Unfortunately, aggregates of aggregates isn't supported in the current
release. (Since this comes up a lot, I'm pushing to get them added to SQL
2005, but the schedule is really tight so odds aren't good at the moment).
There are several ways around this, all of which involve modifying your
query.
I'll show examples based on my earlier simplified example below.
Option 1: Remove the duplicates
Change your query to return this:
Client Brand Rec Item Price
C1 B1 R1 I1 10
C1 B1 R1 I2 NULL
C1 B1 R2 I1 22
C1 B1 R2 I2 NULL
C1 B2 R1 I1 35
C1 B2 R1 I2 NULL
C1 B2 R2 I1 20
C1 B2 R2 I2 NULL
C1 B2 R2 I3 NULL
...etc...
And then you can simply =Sum(Fields!Price.Value)
Option 2: Include a count of duplicates
Change your query to return this:
Client Brand Rec Item Price Items
C1 B1 R1 I1 10 2
C1 B1 R1 I2 10 2
C1 B1 R2 I1 22 2
C1 B1 R2 I2 22 2
C1 B2 R1 I1 35 2
C1 B2 R1 I2 35 2
C1 B2 R2 I1 20 3
C1 B2 R2 I2 20 3
C1 B2 R2 I3 20 3
...etc...
And then you can: =Sum(Fields!Price.Value/Fields!Items.Value)
Option 3: Preaggregate
Change your query to return this:
Client Brand Rec Item Price BrandPrice
C1 B1 R1 I1 10 32
C1 B1 R1 I2 10 32
C1 B1 R2 I1 22 32
C1 B1 R2 I2 22 32
C1 B2 R1 I1 35 55
C1 B2 R1 I2 35 55
C1 B2 R2 I1 20 55
C1 B2 R2 I2 20 55
C1 B2 R2 I3 20 55
...etc...
And then you can do this for Brand: =First(Fields!BrandPrice.Value)
And this for Rec: =First(Fields!Price.Value)
This approach is simplest to write the query for but least useful since you
need a preaggregate for each level (you'll need one for Client as well, for
example)
Sorry I don't have a simpler answer for you. Like I said, I really want to
get aggregates of aggregates into the next release because this sort of
thing comes up quite a lot. But for now you're unfortunately stuck with a
query-based workaround.
--
My employer's lawyers require me to say:
"This posting is provided 'AS IS' with no warranties, and confers no
rights."
"newmem" <""> wrote in message
news:un6u9%23AaEHA.3692@.TK2MSFTNGP09.phx.gbl...
> apologize for the late reply.
> I think you have described the problem correctly. How do i get rid of the
> duplicates and perform the aggregate in RS?
> Thanks.
> "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> news:%230v$NHgZEHA.2516@.TK2MSFTNGP10.phx.gbl...
> > I'm not entirely sure I understand, but it sounds like this might be a
> case
> > which would require aggregates of aggregates.
> > Let me draw a simplified example to see if I understand it (I'm going to
> > skip one of the groups and just use a simple Price field):
> >
> > Based on your description, I think your data looks something like this:
> >
> > Client Brand Rec Item Price
> > C1 B1 R1 I1 10
> > C1 B1 R1 I2 10
> > C1 B1 R2 I1 22
> > C1 B1 R2 I2 22
> > C1 B2 R1 I1 35
> > C1 B2 R1 I2 35
> > C1 B2 R2 I1 20
> > C1 B2 R2 I2 20
> > C1 B2 R2 I3 20
> > ...etc...
> >
> > The Price column includes denormalized data (it has the same value for
> every
> > Item within a Rec)
> > Since the data is denormalized, when calculating the total price per
> Brand,
> > you want to ignore the duplicates.
> >
> > So in the above example, you would want this:
> > Client Brand Total Price
> > C1 B1 32
> > C1 B2 55
> >
> > Rather than this:
> > Client Brand Total Price
> > C1 B1 64
> > C1 B2 130
> >
> > And in Crystal, you're using their RunningValue function to achieve this
> > (even though it isn't really a running value)
> > Is that correct so far?
> >
> > --
> > My employer's lawyers require me to say:
> > "This posting is provided 'AS IS' with no warranties, and confers no
> > rights."
> >
> > "newmem" <""> wrote in message
> news:uWIzotfZEHA.2500@.TK2MSFTNGP09.phx.gbl...
> > > :(
> > > I've a report which has the following groupings:
> > > group 1 : Client Name
> > > group 2: Business Line
> > > group 3: Brand
> > > group 4: RecID
> > >
> > > I need to display the total cost in the group3 footer and has
expression
> > > Runningvalue(fields!extended_price,SUM,"group3")
> > > where "fields!extended_price" is a formula field -
> > > FindExtPrice(fields!recID,fields!list_price)
> > >
> > > When there are more than 1 records in the group3, the total cost is
eing
> > > calculated for each of the record in the grop3. Since they both have
the
> > > same recID, I need to calculate the total only if the rec ID changes
i.e
> > > Evaluate on Change of Group4. I have exactly same rpeort working in
> > crystal
> > > report but can not replicate in RS.
> > >
> > > Hope I'm able to explain the issue.
> > >
> > > "Chris Hays [MSFT]" <chays@.online.microsoft.com> wrote in message
> > > news:O%23OCbjfZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> > > > No, but I don't believe that such an argument is needed. Could you
> > > describe
> > > > what you're trying to do?
> > > >
> > > > --
> > > > My employer's lawyers require me to say:
> > > > "This posting is provided 'AS IS' with no warranties, and confers no
> > > > rights."
> > > >
> > > > "newmem" <""> wrote in message
> > > news:u8ooFefZEHA.2488@.tk2msftngp13.phx.gbl...
> > > > > In RS, Scope tells the Aggregate function when to Re-set. Is there
> any
> > > > other
> > > > > argument to define when to Evaluate the expression. (equivalent of
> > > > "Evaluate
> > > > > on Change of Group" in crystal report for a Running Total field)
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
Friday, March 23, 2012
Running Total
I try to sum the weight by putting the expression
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L", Fields!CONTAINER_WEIGHT.Value, 0))
in group footer section but #Error is returned. On the contrast if the expression: =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L",1, 0))
No error is returned. Please help me !!!Can anyone help me ?
#Error is displayed in the cell.
"May Liu" wrote:
> I try to sum the weight by putting the expression
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L", Fields!CONTAINER_WEIGHT.Value, 0))
> in group footer section but #Error is returned. On the contrast if the expression: =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L",1, 0))
> No error is returned. Please help me !!!
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L", Fields!CONTAINER_WEIGHT.Value, 0))
in group footer section but #Error is returned. On the contrast if the expression: =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L",1, 0))
No error is returned. Please help me !!!Can anyone help me ?
#Error is displayed in the cell.
"May Liu" wrote:
> I try to sum the weight by putting the expression
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L", Fields!CONTAINER_WEIGHT.Value, 0))
> in group footer section but #Error is returned. On the contrast if the expression: =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "L",1, 0))
> No error is returned. Please help me !!!
Labels:
database,
expression,
fieldscontainer_weight,
fieldseqp_len,
fieldseqp_type,
iif,
microsoft,
mysql,
oracle,
running,
server,
sql,
sum,
total,
value,
weight
Subscribe to:
Posts (Atom)