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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters

Status
Not open for further replies.

kken

Programmer
Jun 5, 2001
51
CA
Does anyone know how to pass parameter to a subreport? I have 3 params to pass 2 in the main report and 1 in the subreport. Example that I'm usingis: webTest.rpt?prompt0=value&prompt1=value&user0=UserID&password0=password&prompt0@subreport=value&user0@MaxScore=userID&password0@MaxScore=password"

The first 2 values make it into the report but the subreport value does not. Does anyone know what I'm doing wrong.

Thank you
 
Although there is a separate database logon collection for each report object, such as the main report and for each subreport, there is only one parameter collection for the entire report. This means that prompt#@subreportname will not work. The prompt# will increment for all the parameter fields in the entire report. However, if you have a linked subreport in your report, the subreport will be linked via a parameter field. Thus this parameter field must be skipped in the parameter collection. For example, if parameters #1, #2, #3, and #5 are actual parameter fields and #4 is the linked parameter field, then you will need to use prompt0=a&prompt1=b&prompt2=c&prompt4=d

Simply use:

webTest.rpt?prompt0=value&prompt1=value&user0=UserID&password0=password&prompt2=value&user0@MaxScore=userID&password0@MaxScore=password"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top