2004 IR Help Posted August 30, 2006 Share Posted August 30, 2006 By: Nishant Miglani - nishantm Loading Object Data through IReport 2004-03-02 12:18 Hello, I needed to populate report fields in IReport using the values of instance variables in objects (similar to JavaBeans usage through JSP), as opposed to using the fields from database tables. This would basically add "<field..>" tags to the resultant report XML file. I'm not sure how to do this using the IReport UI. Any help would be appreciated. Thanks By: Giulio Toffoli - gt78 RE: Loading Object Data through IReport 2004-03-02 15:13 Hi Nishant, you can retrive field from your bean using the the tool that appears in the query frame. To test your reports you have to write some lines of code: you have to provide to ireport a custom datasource factory, alias a class that return, in example, an JRDataSource instanced i.e. by a JRBeanArrayDataSource. Select this new datasource as default datasource. Giulio By: jagung - jagung RE: Loading Object Data through IReport 2004-03-07 17:57 I try the example and set the custom datasource factory in setting up the Datasouce > Connection/Database. Type of connection / datasource ->Custom JRDataSource Name -> Test Factory class -> it.businesslogic.ireport.connection.Sample.SampleJRDataSourceFactory The static method to call to retrieve the JRDataSource -> getSampleCustomJRDataSource and set the active connection to Test In Datasource ->Report query -> Custom Datasource there is no fields for me to register to the report. I will appreciate if there is any step by step tutorial to learn how to create an generate a custom datasource. I have difficulty following the previos tutorial on this as i can't find complete souce code and file on it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now