Solved

Crystal reports unlinked sub report with Parameter generates error on main report

Posted on 2014-01-28
7
2,246 Views
Last Modified: 2014-03-24
I don't know if what I'm trying to do is even possible.  I'm fairly new at Crystal, and am using Crystal in conjunction with Epicor.

I have a sub report that I want to print on a main report.  The two reports have nothing in common.  The main report is grouped on three fields, and the data appears in the group footer #3.  The records are selected based on an option field's input.


The sub report is grouped on one field, and the data appears in that group footer.  The subreport requests a Job Number parameter, which will return the appropriate material information for that job.  There is a record selection formula that includes the parameter.

I want this to print in the group footer #3 for the main report (like a continuation of the grouped data).  The sub report works perfectly on its own.  The main report works perfectly on its own.  

When I put the sub report in the main report, and test the report, I put in the main report option (a shipper number).  Then the request for the parameter input pops up, and I put in the Job Number, and then I get an error message telling me that there is an error in the record selection formula because the field name is not known.

First, is what I'm trying to do even possible?  
If it is, I'd truly appreciate any direction.  I have been fussing with this off and on for weeks, and I am clearly spinning my wheels.

Thanks in advance!
0
Comment
Question by:Jason Tabor
  • 3
  • 2
7 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 39816239
If you are able to run the report in Crystal Designer but it fails in Epicor the problem is in Epicor. Did you try to run the report with another viewer ?

Also, it is a better practice to define the subreport parameters  on main report level and pass them down to the subreport ( by linking the subreport parameter to the main report parameter)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39816332
WHat version of Crystal are you using?

Is it a stand-alone version or is it an Epicor OEM version?

mlmcc
0
 

Author Comment

by:Jason Tabor
ID: 39817996
vasto - I am able to run both reports in Epicor, but not once I put the subreport in the report.

How do I link the subreport parameter to the main report parameter?

mlmcc - I have Crystal Reports 2008, and I can use it stand alone, but mostly I access it through Epicor, due to that automatically putting the reports in the desired locations.
0
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.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39818474
To link to a subreport parameter

When you link a subreport you can choose any field from the main report including main report parameters.

After selecting the main report field/parameter 2 new boxes appear.
The left box is the mechanism for passing the value.
By default Crystal creates a parameter and names it ?pm_FieldName
If you have a subreport parameter you need to click the combo box and scroll down to it.  It will be named ?ParameterName.
When you do that the box on the right is no longer available because it assumes you have used the parameter in the subreport as it is needed.

Step
Right click the subreport
Click CHANGE SUBREPORT LINKS
Select the field/parameter from the main report
Use the new left hand dropdown/combobox to select the parameter from the subreports
    Don't use the one Crystal provides
Click OK

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 39950071
I've requested that this question be closed as follows:

Accepted answer: 500 points for mlmcc's comment #a39818474

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 

Author Closing Comment

by:Jason Tabor
ID: 39950072
With testing, I found this worked.
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

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…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

919 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