I have a report where I want to add a parameter as a drop down. The database has more than 13,000 records and the parameter I want to add is of the building names in the record. There are around 6 different building names. When I add the parameter by taking Values from a query and passing the building name as the value, the drop down repeats the 6 building names of all 13,000 records rather than just the 6 building names.
Is there a way where I can filter it to show the 6 building names and then show the records related to that building name?
SELECT new_studentid, new_studentinformationid, new_firstname, new_lastname, new_building, new_busnumber, new_grade, new_primaryhomeroom,documentbody FROM StudentInformation WHERE(new_building = @new_building) AND (new_primaryhomeroom = @new_primaryhomeroom)
SELECT DISTINCT
in the query of the data source you are using instead of justSELECT
. Also please show us the query so that we can help you. – Mahmoud Gamal