Access dataSet ColumnValue [message #793709] |
Wed, 08 February 2012 08:12  |
Eclipse User |
|
|
|
hi,
i have a scriptdataset with a column named "ServiceProviderID" and i set the value via fetch-method
updatableDataSetRow.setColumnValue("ServiceProviderID", sp.getID());
In another place of the java application, i want to retrieve this value. how can i do this via javacode?
here is how i startet, but now aint know how to continue
ReportDesignHandle reportDesignHandle = reportContext.getDesignHandle();
List<DesignElementHandle> list = reportDesignHandle.getDataSets().getContents();
for (DesignElementHandle designElementHandle : list) {
DataSetHandle dataSetHandle = (DataSetHandle) designElementHandle;
if ("Data Set".equalsIgnoreCase(dataSetHandle.getName())) {
DesignElement elt = dataSetHandle.getElement();
if (elt instanceof ScriptDataSet) {
ScriptDataSet scriptDataSet = (ScriptDataSet) elt;
IElementDefn eltDefn = scriptDataSet.getDefn();
}
}
}
thanks a lot
|
|
|
|
|
|
|
|
|
|
|
Re: Access dataSet ColumnValue [message #794804 is a reply to message #794412] |
Thu, 09 February 2012 13:11  |
Eclipse User |
|
|
|
You can not get it from the reportContext object. You have to use the
dataSet object.
public void beforeOpen(IDataSetInstance dataSet,
IReportContext reportContext) throws ScriptException {
Object val = dataSet.getInputParameters().get("param_1");
Jason
On 2/9/2012 3:55 AM, William Tchatchueng wrote:
> Hi Jason,
>
> if this issue has been resolved, can u please tell me how to get this
> inputParameter if i have a reportContext-Object.
>
> thanks.
> William
>
>
> Jason Weathersby wrote on Wed, 08 February 2012 17:23
>> I believe that issue has been resolved.
>>
>> Jason
>>
>> On 2/8/2012 4:56 PM, William Tchatchueng wrote:
>> > Hi Jason,
>> >
>> > i've read in a book that is not possible to get the inputParameter of a
>> > ScriptedDataSet over a Java Event handler, just over Rhino
>> Javascript...
>> > that why i didnt use a dataset parameter
>> >
>> > thanks
>> > William
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.15685 seconds