Solved

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

Posted on 2013-11-07
4
3,121 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
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 34

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 100

Accepted Solution

by:
mlmcc earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

21 Experts available now in Live!

Get 1:1 Help Now