cancel
Showing results for 
Search instead for 
Did you mean: 

Change data source of crosstab with script?

max_rosn
Participant
0 Kudos

Hi,

I currently have a report where different crosstabs are placed at the same position but only one of them is visible depending on what choice the user makes.

I find this quite messy, and tried to figure out if it is possible to change the data source of crosstab with scripting.

Cannot find anything about this, any one who knows?

Thanks

Br

Max

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please Follow this Syntax

DS_1.assignDataSource("cuid:AVDZJNnnWXVAsHd5zLxUd5w", DataSourceType.QUERY, "QUERY_NAME",true);

Its

DataSourceConnection,

DatasourceType,

DatasourceName,

Loadnow(Optional).

max_rosn
Participant
0 Kudos

Thank you for information guys! Those methods will help in future cases.

Unfortunately that does not solve my problem in this particular case.

I'm using different data sources in Design Studio, however they are basically the same actual data source but with different initial views.

I have tried the methods RemoveDimension() and MoveDimensionTo*() but the problem here is that I want to show only specific key figures depending on user's choice. With these methods I can only show all key figures, it seems.

max_rosn
Participant
0 Kudos

I solved this with a simple setFilter()-method in the data source. The filter sets the key figures I want to have for the specific choice.

Should have thought of this before posting, sorry for the unnecessary post.

Former Member
0 Kudos

Hi Just a doubt, can I use this(assign data source) for Universe connections too ,.

thanks and Regards

Bala

TammyPowlas
Active Contributor
0 Kudos

Hi Bala - this is a closed thread; please create a new discussion thread referencing this one with your question

Thank you

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Max

sure you can.

you have to change the assignment to the data souce and not the crosstab.

use:

ds.assignDatasource(...);

ds.loadDatasouce(..);

I dont have Design Studio in front of me, so the syntax is not 100% accurate, but I'm sure you will easily find it using ctrl + space.

hope it helps,

Roman