简体   繁体   中英

SSRS 2008 Report Builder 3.0: Optional User Entered Parameters

My program allows the user to enter in the parameters Start Date , End Date , and Shift .

I am going to add another one that is called VCN . This allowed the user to enter in a specific part number and the program will search for the data related to it.

However, when I do this I want to be able to shut off the other 3 parameters. This means the user can either enter in the first 3 parameters OR a VCN number. When a user enters a VCN number I do not want the search to be bound by my other 3 parameters.

At first glance it would seem you are better off with two reports and this would be my preference.

I haven't found a way to disable a parameter based on another but I would suggest to use the VCN parameter as an override. In this I would:

  1. Set VCN up as optional and allow nulls.
  2. Have VCN have a default and set to null and allow the report to run as normal.
  3. If the user enters anything in the VCN then use this and ignore anything in the other parameters.
  4. Then use if VCN is null then disble the other queries or do as you need.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM