I have a main report which contains 4 sub reports, created w/v.8. The main report has a date parameter which is linked to the date field in 2 of the sub reports.
The problem I'm having is with the other 2 sub reports which have a date parameter, that retreives all dates in the month of the date entered. Therefore, I have 3 parameters that are prompter for:
1) The main report date
2) MTD Sub report 1 date
3) MTD Sub report 2 date
The date parameters in each of the 2 sub reports have the following formula in the select expert:
month({DATE}) = {@Month}
I'm trying to run this report from VB6, but cannot unless the sub report parameters are somehow linked and therefore not prompted for. Is there a way to link the parameters with a formula? Or another way around this? I have tried only passing the main report date:
report.ParameterFields(0) = Date;20020114;TRUE
But get an error of "Invalid Parameter field value"
I have also tried passing the 3 parameters:
report.ParameterFields(0) = Date;20011211;TRUE
report.ParameterFields(1) = Month(MTD);20011211;TRUE
report.ParameterFields(2) = Month(MTD2);20011211;TRUE
and get the same error as above.
Any suggestions?
The problem I'm having is with the other 2 sub reports which have a date parameter, that retreives all dates in the month of the date entered. Therefore, I have 3 parameters that are prompter for:
1) The main report date
2) MTD Sub report 1 date
3) MTD Sub report 2 date
The date parameters in each of the 2 sub reports have the following formula in the select expert:
month({DATE}) = {@Month}
I'm trying to run this report from VB6, but cannot unless the sub report parameters are somehow linked and therefore not prompted for. Is there a way to link the parameters with a formula? Or another way around this? I have tried only passing the main report date:
report.ParameterFields(0) = Date;20020114;TRUE
But get an error of "Invalid Parameter field value"
I have also tried passing the 3 parameters:
report.ParameterFields(0) = Date;20011211;TRUE
report.ParameterFields(1) = Month(MTD);20011211;TRUE
report.ParameterFields(2) = Month(MTD2);20011211;TRUE
and get the same error as above.
Any suggestions?