Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
list problem
mani_03
I have problem using list in report
problem is some thing like that ,there are some item A, B,C, D,E & item has its price & for each item there are customer &customer details
ITEM A
A'S PRICE DISCOUNT
CUSTOMER NAME CUSTOMER DETAILS
A'S CUSTOMER 1 ADDRESS1
A'S CUSTOMER 2 ADDRESS2
A'S CUSTOMER 3 ADDRESS3
ITEM B
B'S PRICE DISCOUNT
CUSTOMER NAME CUSTOMER DETAILS
B'S CUSTOMER 1 ADDRESS1
B'S CUSTOMER 2 ADDRESS2
B'S CUSTOMER 3 ADDRESS3
ITEM C
C 'S PRICE DISCOUNT
CUSTOMER NAME CUSTOMER DETAILS
C'S CUSTOMER 1 ADDRESS1
C'S CUSTOMER 2 ADDRESS2
C'S CUSTOMER 3 ADDRESS3
how I will access these information from pojo so that can show the corrponding data record (I am using scripted data set)
Thanks for any help...
Find more posts tagged with
Comments
mwilliams
Hi mani_03,
So, you have just one dataSet with all this information? Are you able to bring the data in to your scripted dataSet? Can you explain more about where you're stuck at?
mani_03
thans mwilliams,
//This is the Outer pojo class which I want to iterate
public class OuterPojo{
private int itemId;
private String itemPrice;
private double itemDiscount;
private List<InnerPojo> innerPojoList;
}
//This the the inner pojo which I want to iterate for every object of
Outer pojo. i,e for one itemId of OuterPojo may contain multiple number of
InnerPojo.
public class InnerPojo{
private int customerId;
private String customerAddress;
}
Generally I do iterate a pojo without having a property of list of another pojo
in fetch like below.
********
if(count < stock.size()){
row["CustomerId"] = stock.get(count).getCustomerId();
row["CustomerAddress"] = stock.get(count).getCustomerAddress();
count++;
return true;
}
return false;
********
so please help me how to iterate the above mentioned OuterPojo.
mwilliams
mani_03,
If you have a key on which you could link the info from the two pojo's, you could just bring in each as its own dataSet and then use a joint dataSet or a table within a list/table with grouping to link the data that you want to display under each outer item.
mani_03
thanks mwilliams,
now its working....
mwilliams
mani_03,
No problem. Glad to help!