Solved

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

Posted on 2013-11-07
4
3,059 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
  • 2
4 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
Comment Utility
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 34

Expert Comment

by:James0628
Comment Utility
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 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
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
Comment Utility
Got it, thanks
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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. …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now