Despite some problems I managed to run instance of Reports Web Viewer on my stateless REST API running with Microsoft SQL database which works pretty good. Secondly, I've tried to run Reports Web Designer but with some problems I could not resolve myself for a couple of hours so I was forced to ask in here.
The web designer shows up in browser, but I'm having problem with database connection.
The main goal is to provide a database connection to web viewer so the person who will be able to create reports will no need to configure it every time manually.
To the problem:
I've implemented StiWebDesigerHandler where I'd like to use configured DataSource (javax.sql) as Connection provider.
Code: Select all
javax.sql.DataSource myDataSource;
public void onNewReportTemplate(StiReport report, HttpServletRequest request) {
StiMsSqlDatabase db = new StiMsSqlDatabase();
db.setName("Database");
db.setAlias("Database");
db.setConnection(myDataSource.getConnection()); //get connection from datasource
report.getDictionary().getDatabases().add(db); //put the database to report dictionary
}
1. when the connection is local (localhost database) the database connection is closed after first interaction with database.
For example on New Data Source -> "Databse" -> New Query -> Run it shows that SQL Select executed successfully:
but when I hit the button again it throws error:
I do not know if this is the problem on my side but I don't understand why the designer tries to connect to the database when it has Connection instance or why it closes the connection when it executes the select.
2. when the connection is remote (remote database) nothing actually works when doing the same as above - the window fields are blank and buttons are not responding to clicks:
3. When trying MySQL (default is MsSQL) I am not able to connect to database (using desktop version of Designer):
Is there something I am doing wrong?
Are those problems affected by trial license by any chance?
May the first issue be caused by statelessness of the API?
Thanks.