Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: passed parameter drop down selection issue Post Reply Post New Topic
Author Message
wolfiegrr
Newbie
Newbie


Joined: 03 Jul 2009
Online Status: Offline
Posts: 3
Quote wolfiegrr Replybullet Topic: passed parameter drop down selection issue
     Posted: 03 Jul 2009 at 3:34pm
I am working on a report that needs to allow the parameter selection of Services only for a specific Company.  In this test instance, there are 5 Companies in the Company Table, and each Company has 5 services each.

CompanyID is being passed via runtime to the application, so as a parameter, we are already getting CompanyID.

When the report is being run through runtime, I need the report to only list services associated with the CompanyID that is being passed at runtime.


Sample Setting.

Company Table (5 records)
-------------
CompanyID
Company_Name

Services Table (25 records)
--------
ServiceID
CompanyID
Service_Name


So far we have only been able to get this to work by setting the CompanyID to a dropdown, and creating a cascading parameter that then lists the services for that company, but this is a major security flaw as it will allow Company A to select Company B's services, and then run the report on their data.

The report is being called via runtime through a .NET and VB application, and its passing CompanyID to the report.  

I will offer a consulting fee through PayPal to anyone who can help us successfully get this to work!  
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 06 Jul 2009 at 6:13am
Ya know, since you already have an application, why not build a form/wizard to select the parameters for the report, and a) pass all the parameters (which allows you to validate them prior to the report ever seeing them) or b) get the dataset via your application and pass that to the report, then it doesn't even have to know about the parameters.
 
That is how my company's report work, the app gets the dataset and passes it to the report...the report never connects the database at all.
 
Just some thoughts, hope they help.
IP IP Logged
wolfiegrr
Newbie
Newbie


Joined: 03 Jul 2009
Online Status: Offline
Posts: 3
Quote wolfiegrr Replybullet Posted: 06 Jul 2009 at 8:15am
The app itself is a closed source program we are licensing, so I am not able to do so.  The user is presented with a report library, a long list of reports they can run.  They select the report, and click Run.  Doing that passes their CompanyID parameter along with it.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Jul 2009 at 6:11am

I am assuming that the ID is being set as a parameter?  If so, you could filter the data based on the parameter.  Use a separate parameter for the company/services cascade.  So, Company A could select Company B services, but the data would be filtered so that only Company A data would be displayed.

this more useful?
IP IP Logged
wolfiegrr
Newbie
Newbie


Joined: 03 Jul 2009
Online Status: Offline
Posts: 3
Quote wolfiegrr Replybullet Posted: 13 Jul 2009 at 10:55am
Yes the company ID is being set as a parameter.  I think my only option here is to list all the companies, then cascade and list all their services, and when run, if an alternate company and services are selected, it will bring up no results.  I was really hoping to eliminate listing all the companies and their services, but it looks like that may be my only option.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 13 Jul 2009 at 2:35pm
last thought, you could select the company and services in a command object and maybe you can filter it there by the company parameter that is passed in.  The cascade would be the same, just off the command object.
 
I just don't know if the passed in parameter can be used in the where clause of a command object (as I probably mentioned, I don't have a need for parameters or the command object as it applies to Crystal)
 
Yeah, I agree, I hate giving users the option to create a blank report as they try to see data that they shouldn't be able to see.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum