Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sub Report Parameter

Status
Not open for further replies.

kmcclung

Programmer
Nov 20, 2001
120
US
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?
 
Just wanted to bump this back up - I'm still looking for a solution....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top