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

Trouble with Params for subreport

Status
Not open for further replies.

cisscott

IS-IT--Management
Apr 21, 2003
115
US
CR 9.0
MS SQL Server 2000

I am apparently short on knowledge of how to use the main report parameters in a subreport. I think I'm getting flogged by the table linking too, but I want to be sure I am using the parameters correctly. My main report asks for a begin date, an end date, and a "run" (a 4 letter code for a set of entertainment events). It pulls from 4 tables

dbo.buyer, dbo.event2, dbo.eventpaid, dbo.eventseat

The subreport needs to add together different payments types (cash, check, visa, mc, etc) only from the table dbo.eventpaid, but in order to pull the right records, it has to link to dbo.eventseat to check the date range of the parameters, since dbo.eventpaid has no date field. The problem is, it doesn't seem to even be accepting the date parameters from the main report. When i run the report it still asks for 2 seperate sets of begin date and end date parameters. Does anyone know of a white paper or article that concisely desribes how to set this up and map the parameters correctly? Thanks !
 
have you linked the subreport to the main report ? using the paramaters from the main report ?

In the main report go into Edit-> Subreport Links

In the available fields box select the start date parameter and add this to the Fields to link to box
then in the subreport parameter field to use box select the corresponding parametr from the subreport

repeat this process for each parameter you wish to link

HTH






Gary Parker
MIS Data Analyst
Manchester, England
 
When selecting the subreport parameters, be sure to use the drop down box to select {?yourparm}. Do not use {?pm-?yourparm}.

-LB
 
thanks for responding guys. I have gone through the linking process, but I get the feeling I didn't do it correctly. I'm having difficulty telling how this works exactly. If I link a parameter from the main report to it's corresponding parameter in the subreport, then it SHOULD use that parameter, and not ask for it in the prompt box right? Somehow, that isn't working correctly.
 
Check the record selection formula in your sub report make sure you haven't got 2 sets of paramaters here.

If you're not sure then post the record selection formula here.



Gary Parker
MIS Data Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top