|
Re: Access dataSet ColumnValue [message #793921 is a reply to message #793709] |
Wed, 08 February 2012 18:40 |
|
The code you listed is the DE API for getting design values not runtime
values. Can you give some more details one what you are trying to do?
Is this app web based, client/server?
Jason
On 2/8/2012 8:12 AM, William Tchatchueng wrote:
> 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 #794012 is a reply to message #794004] |
Wed, 08 February 2012 20:37 |
|
William
Are you using a data set parameter for the nested table?
Take a look at this example video:
http://download.eclipse.org/birt/downloads/examples/reports/2.1/subreport/subreport.html
Jason
On 2/8/2012 3:30 PM, William Tchatchueng wrote:
> HI Jason,
>
> I have a report with 2 tables... the first table has 2 detailrows and
> the second table and is placed inside the second detailrow of the first
> table.
>
> the first table have to display a serviceprovider and the second table
> show the description (details) for each serviceprovider.
> i used a scripted datasource. this is a java class who give a call to a
> webservice to get the data. i've tried to get this webservice as
> datasource, but it couldnt work because birt got a problem to find and
> show the results.
>
> Any way, i decide to use this java class as datasource and make the
> webservice calls through this class.
>
> for the first table has 2 detail row, one for the serviceprovider and
> one for the second table for displaying the details.
>
> The workflow is like this. the java class make the first webservice call
> to get the serviceprovider, fill the row and then make a second call
> with the serviceproviderid to get the details to fill the second table
> and so on.
>
> I hope u can feel me
>
> thanks William
|
|
|
|
Re: Access dataSet ColumnValue [message #794041 is a reply to message #794022] |
Wed, 08 February 2012 21:34 |
|
If you create a data set parameter on the nested table and set it in the
binding like the video showed, you can access its value in Java in the
beforeOpen like:
dataSet.getInputParameters().get("param_1");
Jason
On 2/8/2012 4:04 PM, William Tchatchueng wrote:
> hi Jason,
>
> i dont use a dataset parameter for the nested table. i use java event
> handler for the two datasets (open or beforeOpen, fetch)... i dont know
> how to read this dataset parameter (e.g. serviceproviderid) from java
> code and if i have to make a webservicecall with serviceproviderid to
> get the serviceprovider details for each row and fill and show the data.
>
> thanks a lot
> William
|
|
|
|
Re: Access dataSet ColumnValue [message #794078 is a reply to message #794055] |
Wed, 08 February 2012 22: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
|
|
|
|
Re: Access dataSet ColumnValue [message #794804 is a reply to message #794412] |
Thu, 09 February 2012 18:11 |
|
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.03885 seconds