?
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,357 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

800 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