Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Parameter's Information
pJune
Hi, I want to access the information enclosed on the red box programmatically. I am able to access the information above by using the IScalarParameterDefn class, but I don't see any method that gets the data set being used in the paramter nor the value column selected. I also want to access in my code the sort by and sort direction. Does anybody know how to do this?
Thanks in advanced
Find more posts tagged with
Comments
Yaytay
<blockquote class='ipsBlockquote' data-author="'DMarch'" data-cid="92101" data-time="1324061690" data-date="16 December 2011 - 11:54 AM"><p>
Hi, I want to access the information enclosed on the red box programmatically. I am able to access the information above by using the IScalarParameterDefn class, but I don't see any method that gets the data set being used in the paramter nor the value column selected. I also want to access in my code the sort by and sort direction. Does anybody know how to do this?<br />
<br />
Thanks in advanced<br /></p></blockquote>
I think the answer is that the IScalarParameterDefn class provides information necessary to run the report - so it's already run the query defined for the parameter and the options are already sorted as defined in the report definition.<br />
<br />
If you want to find out what those sort criteria are I think you'll have to go back to the report definition and find them there.<br />
Start with: <br />
reportRunnable.getDesignInstance().getReportElement( PARAM_NAME );<br />
and see what that gets you.
pJune
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="92161" data-time="1324237561" data-date="18 December 2011 - 12:46 PM"><p>
I think the answer is that the IScalarParameterDefn class provides information necessary to run the report - so it's already run the query defined for the parameter and the options are already sorted as defined in the report definition.<br />
<br />
If you want to find out what those sort criteria are I think you'll have to go back to the report definition and find them there.<br />
Start with: <br />
reportRunnable.getDesignInstance().getReportElement( PARAM_NAME );<br />
and see what that gets you.<br /></p></blockquote>
<br />
Thank you for your replay. It was a starting point to find out the answer. Here it is just in case somebody else has the same question.<br />
<br />
ReportDesignHandle reportDesignHandle = (ReportDesignHandle) reportRunnable.getDesignHandle();<br />
SlotHandle slotHandle = reportDesignHandle.getParameters();<br />
List list = slotHandle.getContents();<br />
<br />
for(int i =0; i < list.size(); i++)<br />
{<br />
if(list.get(i) instanceof ScalarParameterHandle)<br />
{<br />
ScalarParameterHandle scalarHandle = (ScalarParameterHandle) list.get(i);<br />
System.out.println("Sort by " + scalarHandle.getSortByColumn() + " Sort direction " + scalarHandle.getSortDirection());<br />
<br />
}<br />
}