Skip to main content



      Home
Home » Newcomers » Newcomers » tranfer paramater between parent table and sub-table
tranfer paramater between parent table and sub-table [message #238868] Fri, 26 October 2007 01:29
Eclipse UserFriend
Originally posted by: ssbitlw324.yahoo.com.cn

Hi!
Could you help to solve the following problem?
Problem: how to transfer paramater value from parent table to sub-table
with script.

I finished the following step:
1. In my application, I has used Report engine API to generate report and
create some java objects as the input of report design doc.

2. I has created a script data source and the two dataSets. And I has also
created two tables in the editor. A dateSet called 'dataSetA' mapped to
the parent table 'A' and the other one called 'dataSetB' mapped to the
sub-table 'B'.

3. I can get object value with script in the open of 'dataSetA' and fetch
it to the each row of the table.

4. I has also defined a parameter for dataSetB and it can binded to
DataSetRow["serviceID"] in dataSetA. The each row data in the sub-table is
dependent on the each row data in the parent table as the the following
example shown:

serviceID operation
=======================================
service1 operation1.1
operation1.2
operation1.3
=======================================
service2 operation2.1
operation2.2
operation2.3

So, I want to get operation list according to service id in the sub-table.
Service id is as the input parameter for the sub-table.
How to get the parameter value with script in the sub-table?

My current dataSetB script as the following shown:
Open:
serviceID = params["serviceParam"];
operations = null;
operationTotalrows = 0;
operationCurrentrow = 0;
length = serviceOperations.size();
for(i=0;i<length;i++)
{
serviceOperation = serviceOperations.get(i);
if(serviceOperation.getServiceID().equals(serviceID))
{
operations = serviceOperation.getOperationList();
operationTotalrows = operations.size();
break;
}
}
Previous Topic:Eclipse does not start
Next Topic:Not able to hide the grid in HTML
Goto Forum:
  


Current Time: Sun Jun 08 03:41:15 EDT 2025

Powered by FUDForum. Page generated in 0.07662 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top