If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Reorder the selected columns during report execution

Started by Sundaramoorthy, 26 Feb 2016 08:36:42 AM

Previous topic - Next topic

Sundaramoorthy

Hi All,

I have a scenario like whatever the columns it got selected in prompt page, user should have the ability to reorder the selected columns in prompt page itself & that same order need to get rendered in report also.

I have been goggling for a while now & not able to find the exact approach for this scenario

Is it possible in report studio? Please suggest..


BigChris

Well, I guess you could do it, but it would be messy and a lot of hard coding...I can't think of a wy to do it dynamically (javascript might make it possible, but that's not my area). In your prompt page you'd need a prompt for each column, into which the user would type a number for the column position. They'd need to make sure they only key in a number once. Then for each column you'd need a calculation that looks something like (for the first column):

CASE
?pItemNumber? = 1 then [Item Number]
?pDescription? = 1 then [Description]
?pRegion? = 1 then [Region]
?pSalesQty? = 1 then [Sales Quantity]
?pSalesValue? = 1 then [Sales Value]
Else Null
END


Then for your second column you'd have:
CASE
?pItemNumber? = 2 then [Item Number]
?pDescription? = 2 then [Description]
?pRegion? = 2 then [Region]
?pSalesQty? = 2 then [Sales Quantity]
?pSalesValue? = 2 then [Sales Value]
Else Null
END


And so on. You'd need to check the performance etc. and I don't know if it would complain about mixed data types...but it might be worth an experiment.

Sundaramoorthy

Hi BigChris,

Thanks for your information. As of now, i have implemented dynamic column logic in the report & it should retain in the report. On top of that, i need to have this reordering of columns.Please find attached the sample xml for this.

BigChris

Good luck with that - the dynamic column selection should run in parallel to the sequencing, assuming you've used render variables of course.