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

How to pass a parameter from prompt to the child report during drill

Status
Not open for further replies.

VVVD

Programmer
Nov 29, 2005
7
US
Hi Guys
I Got couple of value prompts and based on these prompts data in the crosstab is coming. On this crosstab I have a drill thro which is working fine (i.e child is a list report), but my question is how to pass a parameter from a prompt to the child report. how can I do this?

Appreciate ur time.

thanks
V
 
Assuming ReportNet....

In the tabular model of your crosstab (parent) query, include a query item for each prompt value, and set the value of the data item to the parameter. Then in your list (Child) report, include three optional filters using three new parameters (one for each of the prompts in the parent report). Then in the drill through, link the query items from the parent report to the parameters in the optional filters in the child report.

Example:

If you have in the crosstab report the following prompts:
* Start Date (parameter = parm_StartDate)
* End Date (parameter = parm_EndDate)
* Location (parameter = parm_Location)

In the parent crosstab report query, create three data items in the tabular model:
* Data Item Name = StartDate
Data Item Derivation = ?parm_StartDate?
* Data Item Name = EndDate
Data Item Derivation = ?parm_EndDate?
* Data Item Name = Location
Data Item Derivation = ?parm_Location?

In the child list report query, create three optional filters:
* [StartDateColumn] >= ?parm_StartDate?
* [EndDateColumn] <= ?parm_EndDate?
* [LocationColumn] in ?parm_Location?

Finally, go back to the parent report, edit the drill through, and the three new parameters from the child report should be added. Set them as follows:
* ?parm_StartDate?=StartDate
* ?parm_EndDate?=EndDate
* ?parm_Location?=Location

Thats it!

J
 
Hi J

Thanks it worked out and I did it.

V
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top