Question : default value in parameter of reporting services

In reporting services I have a report with parameters.
one of the parameters is a select from list and when I run it I get

Answer : default value in parameter of reporting services

In the report parameters screen (when in Data or Layout tab, click the 'Report' menu then 'Report Parameters'), you need to set the default there.
You'll see a 'Default Values' section.
You can hard code a default value - if this is to do with your previous question about Countries, you could put 0 in there to get '(All)'.
Alternatively, you can put a dynamic value in using VB.Net expressions, todays date for example;
    =Today()

Then, the most powerful option is to default the data from a dataset. A common scenario is the current financial period date.
So the SQL query in the dataset may look something like;
   Select StartDate From myFinancialPeriods Where GetDate() Between StartDate And EndDate

In the parameter properties, in the default values section, select 'From Query' then set the data set accordingly, then set the field to StartDate. That's it.

FYI: 'GetDate()' is a SQL function to get todays date and time.

Cheers
Chris
Random Solutions  
 
programming4us programming4us