on 03-04-2015 7:57 PM
CS2008 SP3 - version 12.3.0.601
Is there any way parameter value of a report can be found? The following code doesn't return parameter value but returns name.
Fields existingReportParameters = null;
IDataDefinition dataDefinition = reportDocument.getDataDefinition();
existingReportParameters = dataDefinition.getParameterFields();
if (existingReportParameters != null) {
for (int i = 0; i < existingReportParameters.size(); i++) {
IField field = existingReportParameters.getField(i);
if (field instanceof ParameterField) {
ParameterField pa = (ParameterField)field;
String paramName = pa.getName();
//Values values = pa.getValues();
//Object value = values.get(0);
//System.out.println("*** repName Parameter - " + paramName + ":" + values);
System.out.println("*** repName Parameter - " + paramName);
}
}
}
Need to find a solution soon. Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for the reply.
I am trying to solve a problem where report parameter value that is set at Management Console is wiped out after calling replaceConnection.
databaseController.replaceConnection(oldConnectionInfo, newConnectionInfo,
null,DBOptions._doNotVerifyDB);
We have to support changing database connection from a java utility
class. But once replaceConnection is called all existing static parameter values are lost. To fix this issue we thought of getting parameters and values before calling replaceConnection and setting it after replaceConnection.
Version is CS2008 SP3 - version 12.3.0.601
If there is any other option of fixing the original wipe out issue?
ParameterValues.getValues() didn't return value. I will try ParameterValues.getCurrentCalues() but the document says ParameterValues.getValues() is equivalent to the IParameterField.getCurrentValues()
method unless it is empty, in which case it is equivalent to the IParameterField.getDefaultValues()
method.
So getCurrentValues() may not work.
Hi Sarmistha,
The ParameterField object should have a method called CurrentValues.
Have a look at this article.
https://msdn.microsoft.com/en-us/library/aa289936(v=vs.71).aspx
Good luck,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.