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

Passing parameter value from main report to subreport, 1

Status
Not open for further replies.

sds786

Programmer
Aug 15, 2007
49
US
Hi
I am using crystal XI with SQL, I have problem in passing parameter value from main report to subreport,.
I have the transaction start date and end date parameter in main report and I want to use those in selection criteria of related subreport, I have tried following option but none of them worked,
1. I created two shared variable in the main report and placed my both parameter values there, and then I created two same shared variable in the subreport and placed values in subreport, I can see those value in subreport but when I want to use in my record selection formula they do not appear there.
2. Scondly I created two parameter in the subreport and then tried to join with main report, but in subreport linking option they do not appear in the list.

Currently when I run my report I have to pass four parameter two for main report and two for subreport, I want to skip subreport parameter by using same values of the main report parameters.
Anybody, any idea? Thanks in advance.
 
You say that you have the starting and end date parameter. Does tht mean you have start and end date parameterS, asi in two parameters, or a range value, which would be a singular, as you posted.

Anyway, the trick is to go into the subreports Report->Selection Formula->Record and edit it after you've linked the Main reports parameters to the subreports date field. Don't bother building parameters in the subrepoprt, it will code it out for you, and then you simply change the = to >= and <= respectively.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top