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

Subreport data source expression


Asdfghjkl123

Recommended Posts

I have problem to display a subreport in a master report. Data sources for both are collections. When I put a subreport element into a master report it's need to define "Connection/data source expression". So I wrote in a text field "new JREmptyDataSource(1)". After this in a pdf appears a null information from a subreport. Please could you help me to write the data source expression?

Subreport data source class looks liki this:

Code:

public class ServiceBean {

private String name;
public static List createBeanCollection() {
List list = new ArrayList();

ServiceBean serviceBean = new ServiceBean();
serviceBean.setName("name1"«»);
list.add(serviceBean);

ServiceBean serviceBean1 = new ServiceBean();
serviceBean1.setName("name2"«»);
list.add(serviceBean1);

return list;
}
public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
}

Thanks in advance.

Regards, Denis.

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 13 years later...

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...