parameter selection based on passed parameter

We use a software system (VB / .NET) that calls Crystal Reports from within the application to produce a report based on the selected report.  When the report is called, CompanyID is automatically passed to the report so that we can run reports specific to that company.

What we are having extreme difficulty doing, is having a parameter selection based on the CompanyID being passed.  

For example, there are 5 companies within the DB.  Each company has 5 services specific to that company we would like to run reports on.  We are getting passed the CompanyID, and we want to only display services in a parameter selection box that go along with that CompanyID.

We tested with cascading parameters, using a dropdown to pick the CompanyID, and we can successfully get it to only display that specific company's services, but this won't work as it allows company A to look at Company B's service reports.  It needs to only be specific to the passed CompanyID.


wolfiegrrAsked:
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:
How is the company id passed?

Why do you need the parameter prompt?

mlmcc
0
wolfiegrrAuthor Commented:
I'm not sure how the actual parameter is being passed to the crystal reports runtime.  I do know that if I have, for example, 3 parameters

CompanyID
Start Date
End Date

when I make CompanyID the first parameter, the Crystal Reports runtime will automatically pick it up, and only ask for Start Date and End Date, not showing the prompt for CompanyID.  But if I run Crystal Reports standalone app, all three parameters, as designed, show up.

I am successfully able to use that CompanyID i receive from the app, and use it as a regular parameter for processing.  Ie., I can write a report based on that to list all service entries in the database between a start date or end date.  I just cant create a parameter prompt based on data from the CompanyID.

What I am looking to do, is once I receive the CompanyID, create a prompt in crystal reports that allows the user to select only the services they deal with.

A good example would be, two companys use our system.  a hair cut salon, and a florist.   If the Florist were to login, and from within the app, click to run the Client List report, their CompanyID would get passed to the crystal reports runtime.  From there, I would want a prompt that only shows the Florists services they can select from.  ie., A dozen Roses, basket arrangement, etc.  So if the Florist clicks on A Dozen Roses as the service, only clients in the report would be displayed that received that service.  I would not want to display the hair salon's service in my prompt, as they have nothing to do with the florists services... and I'm hoping I can do this, because the CompanyID is being passed to the report parameter as CompanyID.  I hope this gives it a bit of context?

I'm attaching a sample screen shot.. right now in our demo system, its listing all services there for every company. I only want it to display services for the specific company based on the passed CompanyID.

Thanks!

service-list.jpg
0
mlmccCommented:
I don't believe Crystal can do that.  You need to develop an application to provide the prompts.

mlmcc
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
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

jgbreedenCommented:
It sounds like you want to control all of this from Crystal, but I think you will need to make changes in the .net app to get the results you want.  Ideally, you would have the service selection box programmed into the app, and pass their selection to the report in the same way the company ID is being passed to the report.
0
wolfiegrrAuthor Commented:
Ouch.  Unfortunately, the app we are using is a licensed closed source app, and the reports are in a Report Library, which is basically a list of reports you can place, and then just click Run on them.  No ability to enter additional data before processing the report.

I have been able to get close to the functionality by using Cascading Parameters, ie., create a Company drop-down, and when the company is selected, it only shows the services for that company.  Is there maybe a way of using another field to trigger the cascading parameter to display that company's services and just reference the stored CompanyID so it can pull based on that?  
0
mlmccCommented:
You might be able to limit access by using 2 parameters for the company.  Pass the company id in and use it for record selection and then also use the cascade to limit the records.

Otherwise I think you probably are stuck with what you have unless you can change the application.

mlmcc
0
wolfiegrrAuthor Commented:
Ahh, owell.  Thanks for your help!  Was really hoping I could make the passed parameter trigger the cascading parameter, but looks like this won't be possible.  Thanks again for your input!
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.