rodrigoecai Posted July 1, 2010 Share Posted July 1, 2010 Hello everyone, I'm want to create a report that consume data from an API... The idea is get an Array of String with the values of a tag in a given period, and then create Graphs of them.So I tried to create a Custom DataSource: I implemented JRDataSource, and then a Factory for it. Then I generated a .jar, put it in iReport's Classpath, created a new Connection/Datasource pointing to my Factory and the static method createDatasource, and when I click on Test, it says "Connection test successful".What do i have to do next? I tried to "Report query" to get the fields, using the tab "DataSource Provider", but i get a warning: "The active connection is not a JasperReports DataSource provider". Do I have to create a Provider too? If so, what kind of Field it should have, considering the kind of data I want to get? Thanks,RodrigoPost Edited by rodrigoecai at 07/01/2010 17:19Post Edited by rodrigoecai at 07/01/2010 18:22 Link to comment Share on other sites More sharing options...
slow Posted July 2, 2010 Share Posted July 2, 2010 if you have created properly your personal JRDataSource implementationwith the two methods public Object getFieldValue(JRField jRField) public boolean next()with a correct JRDataSourceFactory then , after you create the connection, simply declare the field you want to use and create the report, and run it.I think you can try to use the JavaBean set datasource to make all more simply if you have beans to print. listening: Nine Inch Nailes - Only 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