Solved

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

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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