Crystal Report list parameters in main header that is fed into sub report

I have a sub report that user feeds in region, skills and certifications.  Skills and Certification parameter are set to multi value  to a sub report.  Main report uses two views that join to the skills and certification multi value  parameters.  Those two parameter values are numeric ID but it has description names.  I'm trying to set up a global variable that is created in sub report that captures the skills the user selected and / or certification user has selected and in the main report have those selections outputted to the top of the main report.  Any assistance would be appreciated.
fhcdaverpresidentAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
If I understand what you want to do, you would have to put the subreport into the report header.

Subreports are run v ery late in the report creation process so the only way to get the subreport results into another section is if the section appears after the subreport.

mlmcc
0
fhcdaverpresidentAuthor Commented:
After discussion with Business Analyst, it's ok to have skills listed at the bottom of report.  After some research, I need to create a global variable and then another formula variable that captures unique skills the user has selected and then create another variable that outputs the latest variable.  I believe there is an afterevaluate function.
0
fhcdaverpresidentAuthor Commented:
I mention the afterevaluate because it's ok to have results after the sub report.  My Question is still open.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

mlmccCommented:
AfterEvaluate is only for functions in the same report.  It is used to control the order of formula evaluation in case one formula depends on another.

If it is ok to have the display in the report footer, you can use SHARED variables to collect the data in the subreport and share it with the main.

Typical method

In the main report Report Header add aformula

WhilePrintingRecords;
Shared StringVar Names;
''

Open in new window


In the subreport - generally the detail section but could be anywhere
WhilePrintingRecords;
Shared StringVar Names;
Names := Names + chr(13) + {STudentNameField};

Open in new window


IN the main report Report Footer to display the value
WhilePrintingRecords;
Shared StringVar Names;
Names

Open in new window


mlmcc
0
fhcdaverpresidentAuthor Commented:
I tried your suggestion and no values came back on report.   I created three formulas and 1st on main report with your code and then I went to sub report and created another formula and placed it in details which is suppressed and then back to main report and created third formula to place it in page footer on main report.
0
mlmccCommented:
Try unsuppressing the sub detail section.  Suppressing a section sometimes causes the formula to not evaluate

mlmcc
0
James0628Commented:
Make sure the format for the formula in the page footer (the one that's supposed to output the values) has the "Can Grow" option checked.  mlmcc's second formula would put a Carriage Return ( Chr (13) ) in front of the first value, meaning that the string will start with a blank line.  If you don't have "Can Grow" checked, the field will appear to be blank.

 You might want to change the last line in the second formula to:

Names := Names + {STudentNameField} + chr(13)

 That just puts the CR after each value from the field, instead of in front of it.

 James
0
fhcdaverpresidentAuthor Commented:
I originally had the values appear by having a formula below that loops through muli parameters from sub report to main report, but I was getting subscript must be between 1 and size of array error.  I've taken a the SQL approach as this is a time sensitive task.  I placed input parameters to be captured in a SQL parameter and then output in the reporting table and then place string value onto report.  I'm all set.
code.txt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fhcdaverpresidentAuthor Commented:
Thanks again guys.  It looks like your solutions would have worked too..  We ended up using the SQL stored procedure to do the heavy lifting and have it return the values we need as a single, simpler variable.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.