Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Report Subreport pasing formula field from main report to select record in sub report

Posted on 2013-11-07
4
Medium Priority
?
3,447 Views
Last Modified: 2013-11-13
I have main report which I have a formula field that finds code in the field using the MID function (I.E. ABC), I want to use that data to run the sub-report, looking for any data that is LIKE ABC.
Where do UI enter my report parameters so that the Main report passed the info to the sub report.  I tried to use the link report but I not sure if I can add logic for the sub report to run?

Here a better way to put this.

I have a variable that is ABCDEF,   I drop the first 2 characters using the mid function so now it is CDEF.
I pass the CDEF to look over a set of data to see if any of the records have this combination of  characters. using a sub report to display its findings....

I hope I am making sense....
0
Comment
Question by:Scott Johnston
[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
  • 2
4 Comments
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1500 total points
ID: 39632616
You can link the subreport parameters to data in the main report

Insert the subreport
Click the LINK tab
Select the data field or the formula in the main report
Select the parameter in the subreport (it will not be the one they select that starts with pm_)

ENsure all subreport parameters are linked

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 39633032
To add to what mlmcc said ...

 You would open the subreport in the editor and create a parameter in the subreport, and go to Report > Selection Formulas > Record and enter a formula that compares that parameter with the field in the subreport.  If you're passing the entire field from the main report to the subreport, you can use Mid in the subreport to extract the desired characters.  If you're already doing that extraction in the main report, then (obviously) you don't need to do it in the subreport.

 Then you would link your field or formula in the main report to that parameter in the subreport.

 James
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 39633288
If the subreport doesn't already have parameters, you can use the parameters provided by the linking mechanism.  You then have to check the to use the parameter in the filtering.

You can then open the subreport and change the filter since it will be added as an = compare.

mlmcc
0
 

Author Closing Comment

by:Scott Johnston
ID: 39646394
Got it, thanks
0

Featured Post

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.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

597 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