Page 1 of 1

textOutput into Metadata tab

Posted: Fri Jun 18, 2010 7:56 am
by Maxon
I need help!

TextOutput work in Prolog tab, but don't work in Metadata tab.

Can you help me...

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 8:15 am
by Alan Kirk
Maxon wrote:I need help!

TextOutput work in Prolog tab, but don't work in Metadata tab.

Can you help me...
It will work in any of the tabs... but you'll only get output from either the Metadata or Data tab if there's one or more records to process. If you aren't getting output, the first place I'd look is at whether your data source is returing any rows.

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 8:27 am
by Maxon
#****Begin: Generated Statements***
#****End: Generated Statements****


vName=cellgets('Templates_DIBP', Филиалы, ФинСтруктура, Время_Годы, Тип_производства, Templates_Статьи, '010');
textoutput('c:\3.txt',vName);
This is don't work.

If i type in metadata only textoutput('c:\3.txt','123'); - also not work
if i type in prolod textoutput('c:\3.txt','123'); - file create and values write into.
why?

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 8:31 am
by kpk
Try ASCIIOutput instead of textOutput.

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 8:43 am
by kpk
"Try ASCIIOutput instead of textOutput."

Sorry, my answer was misleading, you can use the textOutput.
The important question is what Alan asked.
What is your datasource?
If your datasource contains 0 record then no function on the metadata or data tab will be executed.

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 8:51 am
by Alan Kirk
Maxon wrote:#****Begin: Generated Statements***
#****End: Generated Statements****


vName=cellgets('Templates_DIBP', Филиалы, ФинСтруктура, Время_Годы, Тип_производства, Templates_Статьи, '010');
textoutput('c:\3.txt',vName);
This is don't work.

If i type in metadata only textoutput('c:\3.txt','123'); - also not work
if i type in prolod textoutput('c:\3.txt','123'); - file create and values write into.
why?
Most likely for the reason that I gave you previously. I repeat, if you have no data in your data source, then no code in the Metadata tab will be executed, and no code in the Data tab will be executed. It doesn't matter whether you have it as textoutput('c:\3.txt','Please Please Pretty Please write this to a file');, if there's no data from the data source then the Metadata tab won't ever see the code and consequently won't ever execute the code.

The code in Metadata and Data is executed once for each row of data in the data source, and not at all if there are no such rows.

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 9:31 am
by Maxon
I have data in my datasource.:(

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 9:56 am
by Alan Kirk
Maxon wrote:I have data in my datasource.:(
You're certain? You haven't indicated what the source is or how you've checked. If it's a cube view, for example, you'll see sample data in the process even though there may not be any actual values to proess when the query is run.

The easiest way to comfirm it is to declare a variable as equal to zero in the Prolog, increment that variable by 1 in the Metadata tab, then output the result in the Epilog tab. If it comes back as zero then that will explain why your code isn't doing anything.

Re: textOutput into Metadata tab

Posted: Fri Jun 18, 2010 10:10 am
by Maxon
I found an error.

There're data in the last cell, but in the first cell not data.
What is command for searching data in the whole cube? Now TI search data only in the first cell...