Notices


Reply
 
LinkBack Thread Tools Display Modes

Old 07-14-2008, 09:44 AM   #1 (permalink)
Junior Member

Join Date: Jan 2008
Posts: 12
Rep Power: 0 pravs is on a distinguished road

Blackbaud Products

Passing parameter from main to subreport

I have a parameter in the main report that is for a date range and returns the cost within the date range selected. Now i want to compare the costs between the selected date range and a year before. So i want to pass this parameter to the sub report and subtract a year so i can compare the two costs. Please could you help me to pass the parameter from the main report to the sub report is there a way to do it?

Thank you so much for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-14-2008, 09:58 AM   #2 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

In the sub-report, create a parameter by adding "pm-?" to the beginning of your main report parameter's name. So if your main parameter is {?Date} then your sub-report parameter would be {?pm-?Date}. Then link you sub-report to the main report using the two parameters.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-14-2008, 10:53 AM   #3 (permalink)
Junior Member

Join Date: Jan 2008
Posts: 12
Rep Power: 0 pravs is on a distinguished road

Blackbaud Products

i have created the parameter in the subreport as you mentioned but am not able to link the main report to the subreport with the parameters. Right now they work as individual parameters. The one on the main report is called {?posting year} and on the subreport is called {?pm-?posting year} - it prompts twice for the two parameters. How can i link it to the main parameter. Please let me know.

Thanks a lot for your quick response!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-14-2008, 10:57 AM   #4 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

Right-click on the sub-report and select "Change Sub-Report Links". Add the parameter to the list of fields to link on. It should show the name of the parameter it will use to link in the lower left corner. If this doesn't match your sub-report parameter, change the sub-report parameter to match it.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-14-2008, 01:58 PM   #5 (permalink)
Junior Member

Join Date: Jan 2008
Posts: 12
Rep Power: 0 pravs is on a distinguished road

Blackbaud Products

Thank you it works!!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-15-2008, 10:11 AM   #6 (permalink)
Junior Member

Join Date: Jul 2008
Posts: 2
Rep Power: 0 wagoneer is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Hi - I'm attempting to do exactly the same thing and having some troubles as well...the main report parameter has {?Start_Date} and {?End_Date}, in the subreport, I added the parameters {?Pm-?Start_Date} and {?Pm-?End_Date}. If I attempt to go and link the start_date and End_Date from the main to the sub report, the parameters from the subreport are not available in the dropdown for 'fields to link to'. In the Subreport editing, if I expand the 'Parameter Fields' the pm-?Start_Date and Pm-?End_Date are present. The only available field to link to is Employee Number, which I am already linking to get the information to break on each employee.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-15-2008, 11:39 AM   #7 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

The "Fields to Link To" will only show fields and parameters from the main report. There is another box in the lower left hand corner labeled "Subreport parameter field to use". When you select {?Start_Date} in the "Fields to Link To", the parameter {?Pm-?Start_Date} will automatically appear in the "Subreport parameter field to use." When you select a parameter, the "Select data in subreport based on field" will be grayed out. If it's not, then you are not selecting a parameter from the main report.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 07-15-2008, 03:03 PM   #8 (permalink)
Junior Member

Join Date: Jul 2008
Posts: 2
Rep Power: 0 wagoneer is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Thanks for the help! it worked like a charm!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Cheap Electricity - Credit Cards - Mobile Phones - Internet Marketing
All times are GMT -6. The time now is 05:50 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64