Solved

Crystal reports 2011 - passing  mult-select parameter values to subreport

Posted on 2013-01-23
7
1,170 Views
Last Modified: 2013-02-26
I have a report where the amount of data that's being return is enomorous when the user chooses to bring back all personnel and their training for their department.  

We have a multi select prompt which allows the user to select the training that they wish to display on the report.  This filter is done in Crystal in selection record formula.

I would like to  pass the selected multiple titles to a subreport and have the query bring back only records that match the titles that were selected.

Main report - have only the multi-select parameter.
Sub report - select from datasource where title_id = multi-select title_id

Can this be done?
0
Comment
Question by:cookiejar
[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
7 Comments
 
LVL 18

Accepted Solution

by:
vasto earned 250 total points
ID: 38811785
You can use Join({?Parameter},',')  to create a concatenated string with the values and pass it to the subreport. Subreport can use this in a command or pass it to the database where it will be parsed and used.

See some examples of joining and parsing the data here:
http://www.r-tag.com/Pages/MultivalueParametersWithSQLSP.aspx

At the very bottom are the samples for Crystal Reports
0
 
LVL 26

Assisted Solution

by:Kurt Reinhardt
Kurt Reinhardt earned 250 total points
ID: 38812093
Based on what you've described, you don't have to use any special functions or formulas.  Just build your subreport with a parameter that allows multiple selection and use it in the subreport's record selection criteria.  Then, link the subreport to the main report based on the parameter field in the main report to the parameter field in the subreport.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 38812720
Agree.  You can link the main report parameter to the subreport parameter?

Is there a reason for doing this as a subreport?

mlmcc
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:cookiejar
ID: 38812750
On the server side, we're filtering by department and returning all training records for that department.  

On the client side is where the user will apply the filter to bring back the training records out of that department they wish to view.

I thought by passing the multi-select values to the query command of the subreport would force the server to filter out the selected training records.  But now, I see this is not possible unless I pass the the values to a stored procedure.   By using that method I have a limit as to the side of the string that can be passed to ORACLE varchar2 field.
0
 
LVL 18

Expert Comment

by:vasto
ID: 38812761
What about CLOB ?
0
 

Author Comment

by:cookiejar
ID: 38812774
I will check with the ORACLE experts to see if this can be done.
0
 
LVL 35

Expert Comment

by:James0628
ID: 38813712
I haven't used the more recent versions of CR, but I think I read that some of them support using a multi-value parameter with a CR Command (CR presumably replaces the parameter with a separate test for each value in the parameter).  Even if that's true, it may not work with Oracle, but it might be worth looking into.

 James
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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. …
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

617 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