Opendocument ToNumber

WebI XI3.1 Fp 1.7 on Windows.

I have inserted an opendocument code in a cell on a report. The cell contains Approved/Total Amounts. This results in a decimal which I then format to display as a %.

After entering the opendocument command the contents of the cell are read as a sting. I want to format the cell as a number so I can format it back to a %.

My code is as follows:

="<a href=\"../../../OpenDocument/opendoc/openDocument.jsp?sType=wid&amp;sIDType=CUID&amp;iDocID=AWks9mqYqUZFmV3XyWHpQoI&amp;lsSRegion="+URLEncode(""+[Region])+"&amp;lsSUnit="+URLEncode(""+[Business Operating Unit])+"&amp;lsSSite="+URLEncode(""+[Site])+"&amp;lsSApproved="+URLEncode(""+0)+"\" title=\""+("Approved:"+[Substance - Approved Samples] +" Non Approved: "+Abs([Substance - Approved Samples]-[Substance - Total Sample Count]))+"\" target=\"_blank\" nav=\"web\">"+[Substance - Approved Samples]/[Substance - Total Sample Count]+"</a>"

Any ideas?


mcliffordgoo :us: (BOB member since 2003-02-13)

Hi,

Try

="<a href=\"../../../OpenDocument/opendoc/openDocument.jsp?sType=wid&amp;sIDType=CUID&amp;iDocID=AWks9mqYqUZFmV3XyWHpQoI&amp;lsSRegion="+URLEncode(""+[Region])+"&amp;lsSUnit="+URLEncode(""+[Business Operating Unit])+"&amp;lsSSite="+URLEncode(""+[Site])+"&amp;lsSApproved="+URLEncode(""+0)+"\" title=\""+("Approved:"+[Substance - Approved Samples] +" Non Approved: "+Abs([Substance - Approved Samples]-[Substance - Total Sample Count]))+"\" target=\"_blank\" nav=\"web\">"+[b]ToNumber([Substance - Approved Samples]/[Substance - Total Sample Count])[/b]+"</a>"

Then try formatting

[Moderator Edit: Added code formatting - Jansi]

When posting code samples please use the code option for formatting. It will preserve any indenting or formatting that you may have done.


DoSTh :india: (BOB member since 2007-05-31)

Unfortunately that does not work. It only gives me the option to format text.


mcliffordgoo :us: (BOB member since 2003-02-13)