Crystal Report Formula

Yep I caught that as well! Thanks so much for your help!




________________________________
From: Linda Lowney <llowney@...>
To: vantage@yahoogroups.com
Sent: Wed, February 16, 2011 3:49:05 PM
Subject: RE: [Vantage] Crystal Report Formula

Â


Oops! I have an extra curly bracket after the load hours:



It should be LoadHours := split({ResourceTimeUsed.LoadHours},"~");

NOT LoadHours := split({ResourceTimeUsed.LoadHours}},"~");



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
melissa hietala
Sent: Wednesday, February 16, 2011 4:38 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Crystal Report Formula





Thank you, I will give it a shot

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Wed, February 16, 2011 10:18:01 AM
Subject: RE: [Vantage] Crystal Report Formula


Something like this: (untested)

stringvar array LoadHours;

numbervar TotalHours;

numbervar i;

LoadHours := split({ResourceTimeUsed.LoadHours}},"~");

TotalHours = 0;

for i := 1 to ubound(LoadHours) do

TotalHours := TotalHours + tonumber(LoadHours[i])

;

TotalHours

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf
Of

melissa hietala
Sent: Tuesday, February 15, 2011 9:55 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: Re: [Vantage] Crystal Report Formula

Thanks for the response, Can you give me a little more info on where I need to
go from here? Maybe some sample code of what the end result may look like?

Thanks,

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com>
<mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>

Sent: Mon, February 14, 2011 12:51:31 PM
Subject: RE: [Vantage] Crystal Report Formula

Hi Dustin,

You can use the "Split" function in Crystal. Try:

Split(ResourceTimeUsed.LoadHours,"~")

This should load each amount into a string array.

Linda

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>

[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>

Subject: [Vantage] Crystal Report Formula

In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
In report builder, you can create a calculated field that can reference itself.

Ex.
OP1 = IIF(Count = 1, joboper.opcode, OP1)

In this example if count = 1, it would return the opcode, if count <> 1, it would return the value of OP1 it had calculated before.

How can I recreate this in Crystal Reports.
When I try the same thing, I get this error message:

"A number, currency amount, Boolean, date, time, date-time, or string is expected here."

Any ideas on how I can do this?

Thanks,
Jasper




[Non-text portions of this message have been removed]
I know the trick in RB is to create the calculated field as the end
character type first and save it.

Counter = 1

Not the system knows "counter" is numeric and = 1.

Then you can edit "count" and reference itself.

Counter = Counter + 1

If you just enter the end result you get an error.

Crystal may need the same process in creating variables/calculated fields
that reference themselves.
Good luck.


Patrick Winter


-----Original Message-----
From: Jasper Recto [mailto:jrecto@...]
Sent: Wednesday, October 06, 2004 8:16 AM
To: Vantage Groups (E-mail)
Subject: [Vantage] Crystal Report Formula


In report builder, you can create a calculated field that can reference
itself.

Ex.
OP1 = IIF(Count = 1, joboper.opcode, OP1)

In this example if count = 1, it would return the opcode, if count <> 1, it
would return the value of OP1 it had calculated before.

How can I recreate this in Crystal Reports.
When I try the same thing, I get this error message:

"A number, currency amount, Boolean, date, time, date-time, or string is
expected here."

Any ideas on how I can do this?

Thanks,
Jasper




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> Make
a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/PhFolB/TM
--------------------------------------------------------------------~->

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links
In crystal I am trying to take the field "ResourceTimeUsed.LoadHours" and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the "~"
symbol:Â Example:Â "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the #'s to
get a grand total. So in the example above I would need to take 4.41 + 10 +
5.01 and return the value 19.42. The amount of #s in the "string" of #'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are.  Does anyone know how this can be
accomplished in Crystal?

Thanks, Â
Â
Dustin Biniek
UMC, Inc.




____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]
Hi Dustin,



You can use the "Split" function in Crystal. Try:



Split(ResourceTimeUsed.LoadHours,"~")



This should load each amount into a string array.



Linda





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Report Formula





In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Thanks for the response, Can you give me a little more info on where I need to
go from here? Maybe some sample code of what the end result may look like?

Thanks,




________________________________
From: Linda Lowney <llowney@...>
To: vantage@yahoogroups.com
Sent: Mon, February 14, 2011 12:51:31 PM
Subject: RE: [Vantage] Crystal Report Formula

Â
Hi Dustin,

You can use the "Split" function in Crystal. Try:

Split(ResourceTimeUsed.LoadHours,"~")

This should load each amount into a string array.

Linda

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Crystal Report Formula

In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
Something like this: (untested)



stringvar array LoadHours;

numbervar TotalHours;

numbervar i;

LoadHours := split({ResourceTimeUsed.LoadHours}},"~");

TotalHours = 0;





for i := 1 to ubound(LoadHours) do

TotalHours := TotalHours + tonumber(LoadHours[i])

;

TotalHours







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of melissa hietala
Sent: Tuesday, February 15, 2011 9:55 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Crystal Report Formula





Thanks for the response, Can you give me a little more info on where I need to
go from here? Maybe some sample code of what the end result may look like?

Thanks,

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Mon, February 14, 2011 12:51:31 PM
Subject: RE: [Vantage] Crystal Report Formula


Hi Dustin,

You can use the "Split" function in Crystal. Try:

Split(ResourceTimeUsed.LoadHours,"~")

This should load each amount into a string array.

Linda

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Crystal Report Formula

In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Thank you, I will give it a shot




________________________________
From: Linda Lowney <llowney@...>
To: vantage@yahoogroups.com
Sent: Wed, February 16, 2011 10:18:01 AM
Subject: RE: [Vantage] Crystal Report Formula

Â
Something like this: (untested)



stringvar array LoadHours;

numbervar TotalHours;

numbervar i;

LoadHours := split({ResourceTimeUsed.LoadHours}},"~");

TotalHours = 0;





for i := 1 to ubound(LoadHours) do

TotalHours := TotalHours + tonumber(LoadHours[i])

;

TotalHours







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
melissa hietala
Sent: Tuesday, February 15, 2011 9:55 AM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Crystal Report Formula





Thanks for the response, Can you give me a little more info on where I need to
go from here? Maybe some sample code of what the end result may look like?

Thanks,

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Mon, February 14, 2011 12:51:31 PM
Subject: RE: [Vantage] Crystal Report Formula


Hi Dustin,

You can use the "Split" function in Crystal. Try:

Split(ResourceTimeUsed.LoadHours,"~")

This should load each amount into a string array.

Linda

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Crystal Report Formula

In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
Oops! I have an extra curly bracket after the load hours:



It should be LoadHours := split({ResourceTimeUsed.LoadHours},"~");

NOT LoadHours := split({ResourceTimeUsed.LoadHours}},"~");



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of melissa hietala
Sent: Wednesday, February 16, 2011 4:38 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Crystal Report Formula





Thank you, I will give it a shot

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Sent: Wed, February 16, 2011 10:18:01 AM
Subject: RE: [Vantage] Crystal Report Formula


Something like this: (untested)

stringvar array LoadHours;

numbervar TotalHours;

numbervar i;

LoadHours := split({ResourceTimeUsed.LoadHours}},"~");

TotalHours = 0;

for i := 1 to ubound(LoadHours) do

TotalHours := TotalHours + tonumber(LoadHours[i])

;

TotalHours

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of
melissa hietala
Sent: Tuesday, February 15, 2011 9:55 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: Re: [Vantage] Crystal Report Formula

Thanks for the response, Can you give me a little more info on where I need to
go from here? Maybe some sample code of what the end result may look like?

Thanks,

________________________________
From: Linda Lowney <llowney@... <mailto:llowney%40pridesigns.com> <mailto:llowney%40pridesigns.com> >
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Sent: Mon, February 14, 2011 12:51:31 PM
Subject: RE: [Vantage] Crystal Report Formula

Hi Dustin,

You can use the "Split" function in Crystal. Try:

Split(ResourceTimeUsed.LoadHours,"~")

This should load each amount into a string array.

Linda

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf
Of melissa hietala
Sent: Monday, February 14, 2011 1:42 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Crystal Report Formula

In crystal I am trying to take the field "ResourceTimeUsed.LoadHours"
and
perform a calcuation on it.
The field is of type "string" and contains a list of #'s separted by the
"~"
symbol: Example: "4.41~10~5.01"
What I need to do is take this field and find all the #'s and add the
#'s to
get a grand total. So in the example above I would need to take 4.41 +
10 +
5.01 and return the value 19.42. The amount of #s in the "string" of
#'s
can vary, so I would need to loop through all the values in the string
regardless of how many values there are. Does anyone know how this can
be
accomplished in Crystal?

Thanks,

Dustin Biniek
UMC, Inc.

__________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]