Skip to Content
0
Former Member
Jan 13, 2009 at 09:07 AM

Schedule a report with passing range parameters

36 Views

I have wrote a program to run the crystal report in BO server and email to the user. The program can pass the parameter to the crystal report and generate different result/ report. It works well with string parameters, int parameter and date parameter. But when I pass the date range parameters, the CR in BO always displays error "Information is needed before this report can be processed. ", and in the CR history, the Parameters field is "No Parameter"

For single parameters, I will use the setValue() of IReportParameterSingleValue to set the param value

IReportParameterSingleValue v = prompt.getCurrentValues().addSingleValue();

v.setValue(paramValueArray<i>);

but I dunno how to set the date range value. Anyone ve ideas on this?

Here is some of my sample code.

rangeValue.setBeginValue(dateValue1);

rangeValue.setEndValue(dateValue1);

rangeValue.getEndValue());

rangeValue.setLowerBoundType(RangeValueBoundType.inclusive);

rangeValue.setUpperBoundType(RangeValueBoundType.inclusive);

newParam.getCurrentValues().add(rangeValue);