I have created a Java application, which takes in some command line arguments (such as DB name, user id, pwd, report name and other parameters) and connects to the report, refreshes it based on the given parameters, and exports to a rpt.
It works great as long as I pass only String parameters, I encounter a problem while passing date parameters to this report. I follow the code given in the sample applications on this site.
Calendar calendar = Calendar.getInstance();
Date dateValue = calendar.getTime();
paramFieldController.setCurrentValue("", "Param1", dateValue);
The problem is that the exported report has no data in it. However, when I refresh it using current parameters, it loads data from the server.
1. As I said, the app works fine when I'm using String parameters, so it is not a DB connection problem.
2. I think the parameter is being passed correctly, which is why I find data in the report if I refresh it without changing the parameters.
Has anyone encountered this before? Any help would be appreciated.