cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax to display value string with brackets for negative values

Former Member
0 Kudos

I have a report designed in Crystal based on a Business View.

The report is a cross tab where I need to show some cells as percentages and some as values.

To achieve this I have used a display string to convert the values to text, and add a % onto those cells where it is required. This was a recommendation from this forum.

It runs fine in the designer, but when running fthe report rom in the CMS or on Infoview, the number formats are different (show as - not brackets for negatives and show with decimal places).

I haven't been able to find out why Enterprise is changing the display, so I am hoping someone here can help with the string syntax required to show the values correctly.

The report contains 4 cross tabs and 2 subreports, with 4 cross tabs each....

Any assistance much appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Julie,

The formatting is likely due to differences between your default and the BOE Local settings.

Can you paste in what the data looks like and what formula you are using as well as what you are seeing on both OS's?

Thank you

Don

Former Member
0 Kudos

Hi Don,

I have updated the default settings in the desinger & most of these do seem to flow to the CRS which is installed on the same machine as the designer.

The display string is--- " if CurrentRowIndex = 2 or CurrentRowIndex = 6 or CurrentRowIndex = 8 then totext(CurrentFieldValue,1)& "%"

else

if currentrowindex = 3 or currentrowindex = 5 then totext(CurrentFieldValue ) else totext(CurrentFieldValue *-1 )"

The default in the designer is brackets for negatives, and no decimal places, there are some customisations around negative if (Income or expenses items etc), but none of these seem to be recognised in enterprise.

I have managed to get the display string to round, but can't work out the rest

0 Kudos

Hi Julie,

If you are using BOE then you likely have a support contract? I suggest you create a case in SMP and have a rep go over this issue. It may be something in the Universe that is being over written in BOE. It could even be a bug in which case they can either track it or help you install a patch that may resolve the issue.

Try setting the default viewer to one of the other ones to see if it's viewer related.

Thank you

Don

Answers (0)