Jump to content
We've recently updated our Privacy Statement, available here ×

Filling a sub report with a datasource


divsen

Recommended Posts

hi

 

I am using a datasource to fill my report..How can i fill my sub report which uses the same datasource..

 

Actually it is a list of bean values and i loaded it into a datasource and i am filling my report.

 

For example:

 

List of bean Order for main report..

 

 

The main report takes values like Order.getOrderName(),Order.getOrderNumber(),Order.getOrderDate() etc...

 

The sub report takes values present in Order.getOrderServices..which is again a list..

 

 

 

List Services = (List)Order.getOrderServices();

 

for(int j=0;j<Services.size();j++)

{

OrderService orderService= (OrderService)Services.get(j);

data[j][1]=orderService.getService().getServiceName();

data[j][2]=orderService.getOrderServicePrice();

 

}

 

 

 

This is not my exact code..just to show what values i want in my sub report..

 

How do i do this..

 

If iam not clear..i can provide more details..

 

Thanks

Post edited by: divsen, at: 2006/08/29 17:57

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...