Solved

parameter selection based on passed parameter

Posted on 2009-07-05
8
336 Views
Last Modified: 2012-05-07
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.


0
Comment
Question by:wolfiegrr
  • 3
  • 3
8 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 24782402
How is the company id passed?

Why do you need the parameter prompt?

mlmcc
0
 

Author Comment

by:wolfiegrr
ID: 24782457
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
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 24786378
I don't believe Crystal can do that.  You need to develop an application to provide the prompts.

mlmcc
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 5

Assisted Solution

by:jgbreeden
jgbreeden earned 250 total points
ID: 24786515
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
 

Author Comment

by:wolfiegrr
ID: 24786543
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 24790875
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
 

Author Comment

by:wolfiegrr
ID: 24842086
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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

23 Experts available now in Live!

Get 1:1 Help Now