I want to embed data in report template(jrxml) without any dataSource.I want to write my data staticly in jrxml,аnd display the table with this data. It is really possible?<
You can have a list variable and store the data in it using Java class.
If you are using groovy same thing can be achieved Groovy Collection. Here's more if you want to learn about groovy collections .
For Example :
Have a parameter/variable in report
<parameter name="list_collect" class="java.util.List" isForPrompting="false">
<defaultValueExpression><![CDATA[(new beandatasource()).OnFlyCollection()]]> </defaultValueExpression>
</parameter>
And the Java Class
package beandatasource;
import java.util.ArrayList;
public class OnFlyCollection {
public ArrayList<String> ListCollect() {
ArrayList<String> arr_list = new ArrayList<String>();
arr_list.add("A");
arr_list.add("B");
arr_list.add("C");
return arr_list;
}
}