Dear Gurus,
I have developed a package with VB6 & crystal report10. While installing it in Client machines i get error as "Run time Error 713".
I searched for it but only found that it is " Appication - Defined or Object define error 713"..Help me to solve this asap..
Thanx in Advance,
RevolutionWhen creating the Package did you add all the required dlls?
Also search here for your solution
http://support.businessobjects.com/
Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts
Friday, March 30, 2012
Runtime design of report in crystal reports 8.0
Hello All,
I want to change design of report through VB, I mean to say how can I change any textbox location to other location within same report only?
My problem is that we have more than 50 reports & if any customer wants to change location of textbox to other location within same report then he not able to do that & for that small reason support engineer have to visit him for minor change in report.
So saving time as well as man power, can we provide such interface where user can do minor changes in report ?
Any ideas are appreciated...thanx......Which Framework are you programming.
If you work with .Net, it has a solution to control report objects.
But it needs user interface programming.|||See if you find solutiojn at support section of this site
www.BusinessObjects.com
I want to change design of report through VB, I mean to say how can I change any textbox location to other location within same report only?
My problem is that we have more than 50 reports & if any customer wants to change location of textbox to other location within same report then he not able to do that & for that small reason support engineer have to visit him for minor change in report.
So saving time as well as man power, can we provide such interface where user can do minor changes in report ?
Any ideas are appreciated...thanx......Which Framework are you programming.
If you work with .Net, it has a solution to control report objects.
But it needs user interface programming.|||See if you find solutiojn at support section of this site
www.BusinessObjects.com
Monday, March 26, 2012
Running Totals
I have an Oracle View I have brought into Crystal.
Sample Data is this. There are more CostCenters with consisting of various types:
View:
CostCenter Type Hrs
323 M 10
323 V 20
323 L 30
323 Q 39
I do a running totals for Hrs in my reports. I have 6 running totals variables. M, V, L, Q, R, X That I display on my report grouped by CostCenter. However, if a CostCenter is missing any of the 6 types, nothing is shown in my report under that type column. How can I default it to 0?
I want Crystal to be able to handle this issue. My report can't have blanks scattered throughout my report if a Type doesn't exist for that CostCenter.Create a formula having the code
If Isnull(field)=True then
'0'
else
Field
Sample Data is this. There are more CostCenters with consisting of various types:
View:
CostCenter Type Hrs
323 M 10
323 V 20
323 L 30
323 Q 39
I do a running totals for Hrs in my reports. I have 6 running totals variables. M, V, L, Q, R, X That I display on my report grouped by CostCenter. However, if a CostCenter is missing any of the 6 types, nothing is shown in my report under that type column. How can I default it to 0?
I want Crystal to be able to handle this issue. My report can't have blanks scattered throughout my report if a Type doesn't exist for that CostCenter.Create a formula having the code
If Isnull(field)=True then
'0'
else
Field
running total of differences in Crystal Reports
Hi everyone. I need help writing a function in Crystal Reports. I need a running total of the difference of two columns. I know the starting value and I need something like:
Net := Start + (SubCol - AddCol)
in a loop I guess.
So, if the starting number is 20, the report should look somewhat like:
(Its always adding the difference to the previous net value)
Field1 Field2 Add Sub Net
------------
12 A+ 10 10 '20 + (0-10) = 10
13 A 5 25 '10 + (5 - 0) = 15
11 C 12 37 '15 + (0 - 12) = 3
01 D 10 27 ' 3 + (10 - 0) = 13
12 B 11 38 '13 + (0 - 11) = 2Why don't you try creating new formula for each runnig total, add a group, copy all fields from detail into group, hide detail and do the difference after using the running total formulas??
Field1 field2 field3
1 1 1
3 4 6
--------------------
detail rt1 rt2 rt3
--------------------
group rt1-rt2
Rob
Hi everyone. I need help writing a function in Crystal Reports. I need a running total of the difference of two columns. I know the starting value and I need something like:
Net := Start + (SubCol - AddCol)
in a loop I guess.
So, if the starting number is 20, the report should look somewhat like:
(Its always adding the difference to the previous net value)
Field1 Field2 Add Sub Net
------------
12 A+ 10 10 '20 + (0-10) = 10
13 A 5 25 '10 + (5 - 0) = 15
11 C 12 37 '15 + (0 - 12) = 3
01 D 10 27 ' 3 + (10 - 0) = 13
12 B 11 38 '13 + (0 - 11) = 2|||Hi Rob. Thanks for the response. I finally got it to work by declaring a Shared variable and putting it in the report header. Global wouldn't work for some reason. Then, using that variable, I used the same function:
Shared Numbervar x;
x := x + ({Col.Sub} - {Col.Add})
and put it in the details section. Seems to work!
Net := Start + (SubCol - AddCol)
in a loop I guess.
So, if the starting number is 20, the report should look somewhat like:
(Its always adding the difference to the previous net value)
Field1 Field2 Add Sub Net
------------
12 A+ 10 10 '20 + (0-10) = 10
13 A 5 25 '10 + (5 - 0) = 15
11 C 12 37 '15 + (0 - 12) = 3
01 D 10 27 ' 3 + (10 - 0) = 13
12 B 11 38 '13 + (0 - 11) = 2Why don't you try creating new formula for each runnig total, add a group, copy all fields from detail into group, hide detail and do the difference after using the running total formulas??
Field1 field2 field3
1 1 1
3 4 6
--------------------
detail rt1 rt2 rt3
--------------------
group rt1-rt2
Rob
Hi everyone. I need help writing a function in Crystal Reports. I need a running total of the difference of two columns. I know the starting value and I need something like:
Net := Start + (SubCol - AddCol)
in a loop I guess.
So, if the starting number is 20, the report should look somewhat like:
(Its always adding the difference to the previous net value)
Field1 Field2 Add Sub Net
------------
12 A+ 10 10 '20 + (0-10) = 10
13 A 5 25 '10 + (5 - 0) = 15
11 C 12 37 '15 + (0 - 12) = 3
01 D 10 27 ' 3 + (10 - 0) = 13
12 B 11 38 '13 + (0 - 11) = 2|||Hi Rob. Thanks for the response. I finally got it to work by declaring a Shared variable and putting it in the report header. Global wouldn't work for some reason. Then, using that variable, I used the same function:
Shared Numbervar x;
x := x + ({Col.Sub} - {Col.Add})
and put it in the details section. Seems to work!
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 - Count Only Displayed Records
I am working on a Crystal Report right now that I am having trouble trying to figure out how to only count the records that have been displayed in the report. I do not have a whole lot of experience with Crystal. I have supressed the details section with the following formula:
//This formula suppresses the Details line
//when there are duplicate values contained in the fields.
{view_CR_Vehicle_Sales_Deals.CUS_Name} = Next({view_CR_Vehicle_Sales_Deals.CUS_Name}) And
{MajorUnitOrder.VehicleIdentificationNum} = Next({MajorUnitOrder.VehicleIdentificationNum}) And
{MajorUnitOrder.SoldDate} = Next({MajorUnitOrder.SoldDate})
The suppressed data is getting included in the running total count. Is there anyway that I can make Crystal Reports only count what is displayed on the screen?
Thanks,
JamesRight click on the column;select summary;select distinct count;place it in the report
//This formula suppresses the Details line
//when there are duplicate values contained in the fields.
{view_CR_Vehicle_Sales_Deals.CUS_Name} = Next({view_CR_Vehicle_Sales_Deals.CUS_Name}) And
{MajorUnitOrder.VehicleIdentificationNum} = Next({MajorUnitOrder.VehicleIdentificationNum}) And
{MajorUnitOrder.SoldDate} = Next({MajorUnitOrder.SoldDate})
The suppressed data is getting included in the running total count. Is there anyway that I can make Crystal Reports only count what is displayed on the screen?
Thanks,
JamesRight click on the column;select summary;select distinct count;place it in the report
Subscribe to:
Posts (Atom)