ASCIIOUTPUT not giving negative data

Post Reply
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

ASCIIOUTPUT not giving negative data

Post by anoops81 »

Hi All ,

I have a TI which exports the data into a text file.

The following is the TI script

Code: Select all

ASCIIOUTPUT('\\TM1\WS\expenseload2UCS\expenseload2UCS_V1.txt',RC,RL,P0,P2,V9,mon,V2)
The TI is running successfully but negative numbers are displayed as positive in the file.

Is this a limitation in ASCIIOUTPUT , because it treats all the vairables as strings ?

When I check in the cube I can see the negative entry for the report line , but the same is displayed as postive entry in export file. The file is of 66 KB , hence I hope it is not truncating any info.

Appreciate your response !!!

Regards
Anoop
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: ASCIIOUTPUT not giving negative data

Post by tomok »

anoops81 wrote:Is this a limitation in ASCIIOUTPUT , because it treats all the vairables as strings ?
TM1 does not treat variables as strings, you have to explicitly convert numeric variables to strings yourself in code before writing them out via the ASCIOUTPUT function, or they have to be defined as strings in the Variables tab. Which one did you do and which of the variables from your function contain the numeric values. If you specified the variable as a string in the variables tab then TM1 will include the minus sign (if there indeed is one). You must have not done this. In that case where is the code you wrote to convert the numeric variable to a string?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: ASCIIOUTPUT not giving negative data

Post by anoops81 »

Tomok,

Value is defined as Numeric in variables tab.

v2=STR(Value,10,8);

ASCIIOUTPUT('\\TM1\WS\expenseload2UCS\expenseload2UCS_V1.txt',RC,RL,P0,P2,V9,mon,V2);


Thats all I have in the TI .


Regards,
Anoop
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: ASCIIOUTPUT not giving negative data

Post by rmackenzie »

anoops81 wrote:v2=STR(Value,10,8);
Try:

Code: Select all

v2=NumberToString(Value);
Robin Mackenzie
anoops81
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: ASCIIOUTPUT not giving negative data

Post by anoops81 »

Thanks a lot Mckanzie & Tomok !!!

Code: Select all

v2=NumberToString(Value);
worked.

I was stuck for a day with this !!


Regards
Anoop
Post Reply