?
Solved

Passing parameter values from main report to subreport

Posted on 2003-10-21
8
Medium Priority
?
1,094 Views
Last Modified: 2007-12-19
I have an unlinked subreport that needs the same parameter values as the main report at runtime. I have tried using shared variables and the values seem to get passed to the subreport OK. However the shared variables are not available to be selected in the formula editor when I am using the selection expert for the subreport.

Any suggestions? Thanks
0
Comment
Question by:slimchance99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 9593693
I haven't used variables very much.  Are local variables available in the select expert?

How are you calling the reports?

mlmcc
0
 
LVL 7

Expert Comment

by:ladylinet
ID: 9594064
Check your declaration for shared variables (this is Basic syntax, Crystal one is similar):

WhilePrintingRecords
Shared intCounter As Number
formula = intCounter

 mlmcc, shared variables are not same as local variables - they are shared between main report and subreport;and  they have to be declared on both places...

Lady Linet
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9595906
I know the difference between shared and local but I haven't had reason to use them so I was wondering if local variables were available in the select expert.

mlmcc
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:slimchance99
ID: 9598266
The shared variable is declared in both the main report and the subreport. The value is getting passed from the main to the subreport OK. The shared variable is not available as a report object in the Select Expert though. How can I use the value of the variable to select records in the unlinked subreport?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 9603591
If it isn't available in the select expert, is it available to a formula?  You could create a formula that just returns the value and maybe use the formula in the select expert.

mlmcc
0
 

Author Comment

by:slimchance99
ID: 9607244
It is already a formula - the formula is not availabe in the select expert, even though the formula exists in the subreport

slimchance99
0
 

Accepted Solution

by:
Max88Can earned 500 total points
ID: 9607651
I may have misunderstood the problem but to me I would recreate the same parameters that are in the main report in the subreport and then use the edit subreport links to join the specific parameters together (making sure that the "Select data in subreport" checkbox is not checked).  The new parameters in the subreport will be available to the select expert and formulas.  

If some these parameter values have to be manipulated and brought back to the main report then that is when I would use shared variables.

0
 

Author Comment

by:slimchance99
ID: 9608641
Perfect! That is exactly what I needed. sometimes it's too easy to look for the complicated solution when a simple on will do.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question