Solved

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

Posted on 2014-01-28
7
2,273 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
Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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. …
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 …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

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