cancel
Showing results for 
Search instead for 
Did you mean: 

Having Issues with Function Output

Former Member
0 Kudos

I need to track and accumulate the costs for different "PROJECTS", and print them out on the report in the detail section.  The "PROJECTS" names are in a string variable delimited by a semi-colon, coming from a database table.  Because of this, I cannot use any of the built-in CRYSTAL grouping or summary functions.

I use a CRYSTAL Forumula "TheProjectsAndCostsAvg" to pass all the cost variables and project-name string variable to a function, where I split out all the data to get the various Project name(s) and cost(s)

I build string variables for each "Project" name and their costs and pass them back to the report to print out in the detail section.

I am having 2 problems.  I print out the string from the function next to the "XXX" in the Detail Section.  If you look at the output file, you will note that there is a "2.00" that prints out at the begining and end of the string.  I cannot for the life of me figure out where this value is coming from.  I tried adding "BeforeReadingRecords;" at the begining of the formula, that did not make a difference.

Also enclosed is a copy of the Formula "TheProjectsAndCostsAvg", and Function "ThePerProjectCost".  What the output looks like, and what the Desgn mode looks like.

I'm pulling my hair out.  Thank you

Vince

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Vince,

Get rid of the text 'crDoubleLine' from each of your variables:

Example: strScopeTitle = crDoubleLine & "THE COST FOR THE SCOPE PROJECT: " & curScopeCost & crDoubleLine

Should just be:

strScopeTitle = "THE COST FOR THE SCOPE PROJECT: " & curScopeCost


-Abhilash

Former Member
0 Kudos

Abhilash:

Thanks, that did the trick, but how do I create a line-break after each Project name and cost?

Vince

Former Member
0 Kudos

I added a Chr(10) after each line.  Thanks for your help.  If you don't mind me asking why was 2.00 geeting generated?

abhilash_kumar
Active Contributor
0 Kudos

2.00 was being generated due to the 'crDoubleLine' function. The function is supposed to be used in conjunction with the 'Line Style' formulae under the 'Border' tab.

-Abhilash

Answers (0)