Solved

parameter selection based on passed parameter

Posted on 2009-07-05
8
337 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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 …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

863 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

26 Experts available now in Live!

Get 1:1 Help Now