Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report Display specific value from array field

Status
Not open for further replies.

shams100

MIS
May 2, 2008
24
US
I have a sub report and there is a field in it is An Array. This is example to explain how the data display in that array field:

valueA~1.10~1.10|ValueB~2.20~2.20|ValueC~3.30~3.30|ValueD~4.40~4.40|ValueE~5.50~5.00

Is there any way that I can get only the value for field valueC and the value for field valueD and display in the sub report as:


3.30 4.40


Thanks,
 
Try something like:
Code:
Split(Split({your_field}, "|")[3],"~")[3] + " " + 
Split(Split({your_field}, "|")[4],"~")[3]
- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Or I think you could use:

extractstring({table.string},"ValueC~","~")+
extractstring({table.string},"ValueD~","~")

This assumes you want the first of the two values after each ValueN.

-LB

 
I did it like that
First Formula:

stringvar array x := split({MyFIeld},"|");
x[5]

And Created another formula from the first one :
stringvar array x := split({@MyFirstFormula},"~");
x[2]

This worke fine.

Now is there any way I can create SUM for that value
 
I could also create the sum.

-I created another formula

dim Y
Y=tonumber({@MySecondFormula})

formula=Y

-Insert it in the Subreport as field
-Created sum for that field.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top