Recently started learning Reporting Services using Microsoft SQL Server 2016 Reporting Services, Fifth Edition, Brian Larson. I am creating this one report which uses UNION to create a dataset, FuelType, that will be used for assigning values to a dropdown list.
SELECT 'All' AS Fueltype, '_All' AS SortField UNION SELECT Description, Description FROM Propulsion ORDER BY SortField
Now there exists another dataset that will help generate the chart for me and there.
SELECT Propulsion.Description AS Fueltype, FuelPrice.PriceStartDate, FuelPrice.Price FROM FuelPrice INNER JOIN Propulsion ON FuelPrice.PropulsionID = Propulsion.PropulsionID WHERE (YEAR(FuelPrice.PriceStartDate) = @year) AND (Propulsion.Description = @PropulsionType) OR (YEAR(FuelPrice.PriceStartDate) = @year) AND (@PropulsionType = 'All') ORDER BY Fueltype, FuelPrice.PriceStartDate
I do not understand, how by using "@PropulsionType = 'All'" I am able to pass in all available values to the parameter.
For someone who has the book, this is under Chapter 6 :Fuel Price Chart, Version 2