I have this code which I use on my swing application:
ReportClientDocument rpt = new ReportClientDocument();
rpt.open(reportPath+"APVendorList.rpt", 0);
rpt.getReportSource();
ReportViewerBean viewer = new ReportViewerBean();
viewer.init(new String[0], null, null, null);
//viewer.setHasGroupTree(false);
viewer.setReportSource(rpt.getReportSource());
The problem is that whenever I try to load the report using jframe, It always ask for login credentials:
Database Logon:
Server Name: Localhost
Database Name: <blank and cannot be edited>
User ID:
Password:
Is there a way to not type in those info eveytime I view the report? Or I could just pass java.sql.Connection to it? Also it seems like it doesnt know which database to connect to. Please help.
You can set the property values, something like this:
Hope this helps…