Skip to Content
Former Member
Oct 19, 2006 at 02:30 AM

How to set null values for parameters in subreports


<p>Hi every one</p><p>Actually, we are migrating from Crystal 7 to Crystal XI (first release). The reports use Store procedures and them have many subreports that use Store procedures too. There are no problem when running reports on Crystal Reports APP, but when I run same reports in Tomcat 5.0 using Crystal for Eclipse, JRC ask for parameters in subreports Until it have non-null values</p><p>Thus, I want to know if there is an programatic way to set null values for parameters in subreports when subreport use a store procedure that don&#39;t use all of its parameters.</p><p>Code I use to set Null Parameters in subreport:</p><p>Fields oFields = new Fields(); </p><p>ParameterField oParameterField = new ParameterField();</p><p>oParameterField.setReportName(subreportName); </p><p>Values oValues = new Values();</p><p>ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue(); </p><p> oParameterField.setName(paramName); </p><p>oParameterFieldDiscreteValue.setValue(null); </p><p> oValues.add(oParameterFieldDiscreteValue); </p><p>oParameterField.setCurrentValues(oValues); </p><p> oFields.add(oParameterField); </p><p>&nbsp;</p><p>JNDI data source works fine.</p><p>Thanks </p>