Page 3 of 3

Re: Dynamic Datasource Path

Posted: Thu Sep 01, 2016 12:29 pm
by jim wood
I've just gone through this. I can't remember where I was at the time but I do know I'm no hurry to go back. It's ironic that I'm now at a government agency and the security policies are no where near as tight inside the IT department.

Re: Dynamic Datasource Path

Posted: Thu Jul 19, 2018 9:05 am
by Hector2005
Hello Guys,
I have a problem to assign the file path in runtime.

I have made a ti process and select the type is File then assigned a template Excel file "Just contained a header" I attached it.

after that I opened the prolog tab : and wrote the following.

Code: Select all

DataSourceNameForServer = 'C:\Program Files\ibm\cognos\tm1_64\samples\tm1\Test\Templates\ProductionData.xlsx';
In the Data tab: I wrote the following as you see Just a simple code to check if it's okay or not.

Code: Select all

Version = 'Plan';

IF(Accounts @<> 'Accounts' );

	IF(DimIx('ProductionDim', Accounts) > 0);
	
		CellPutN(Year1/12, 'Production','Jan 2018' , Accounts, Version);
	
	ENDIF;

ENDIF;

If this doing well I will make a cube then put all my paths in it.

But, Unfortunately it doesn't work. Is there anything I missed ???

Thanks in advance,
Best Regrads.

Re: Dynamic Datasource Path

Posted: Thu Jul 19, 2018 10:00 am
by declanr
TIs don’t accept xls or xlsx etc rules as a source, it needs a flat file to read (CSV, CMA, TXT etc.)
I believe performance modeller could accept excel files but I think that just had an additional program that converted it to a CSV first, you can do something similar yourself by having VBS executed in the prolog to convert the xlsx to a CSV and then set the CSV as your data source.

Re: Dynamic Datasource Path1

Posted: Fri Jul 20, 2018 2:17 am
by Hector2005
declanr wrote: Thu Jul 19, 2018 10:00 am TIs don’t accept xls or xlsx etc rules as a source, it needs a flat file to read (CSV, CMA, TXT etc.)
I believe performance modeller could accept excel files but I think that just had an additional program that converted it to a CSV first, you can do something similar yourself by having VBS executed in the prolog to convert the xlsx to a CSV and then set the CSV as your data source.
Appreciated sir, You are right it worked.
Really this is amazing community, Because everyone helps the others. :) :)

Thanks a lot,
Best Regards.