How to define a parameter so I can filter my rows?
Hi, Some years ago I developed using SSRS 2005 and after I leait rned the basics, it was great. Now I am trying to make some reports using SSRS 2008 and it is making me crazy! Please help me clarify some questions! This one is the one I am currently stuck: I want to enable filters in my report, so the user can filter the rows he is interested to do. I would be able to pass the values via querystring and also allow the user to define the filter in the report itself. What I did was add a parameter with no default value nor pre-defined values: When I opened the website, I couldn't find any textbox so the user can filter by a text input: So I tried to add some predefined values: But if I do it this way, the whole report viewer disappears without information. How can I add the parameter so the user can define its value in the report viewer? How can I populate this parameter value through querystring? What am I doing wrong in this approach to set the predefined values? A very short off-topic question: in SSRS 2005, when defining a new datasource, I could be able to define the query in the report itself using the query designer. This seems to be gone: Can I define the query somehow? How? ps: It seems that I didn't put much effort looking for the answer, but I've been searching for tutorials and stuff, but a lot o things I found is using the report designer and some others seems t have these query designer which I can't find. And some, like this seems to have some buttons I don't have! Please help me, I am getting crazy here and the deadline is coming! My Blog - Dicas .NET
March 29th, 2011 6:34pm

Hi The Query designer is now on the "Report Data" snap-in. Go to your Visual Studio menus, select "View"->"Report Data". You should see your dataset listed. From there you can edit the Query and the parameters. Normally if you add a query parameter with a name not yet used, it will also create the equivalent report parameter for you. HTHCraig Bryden - Please mark correct answers
Free Windows Admin Tool Kit Click here and download it now
March 29th, 2011 8:45pm

Hi! Thanks for your fast answer! The Report Data snap-in I already knew, but how to get to the query editor from it? Right-clicking in the dataset I get 3 options: Refresh, delete and properties. Clicking in properties opens the same window in the image. I also have built-in fields, Parameters and Images. But no query editor or query editor option. Am I missing something? (I am using Visual Studio 2010) My Blog - Dicas .NET
March 30th, 2011 4:32am

Hi, create new dataset for the param you want to populate. New dataset will enable you to compose a query. Then choose Get Values from a query on a Report Parameter Properties (and select the newly created dataset). I think if you choose this first (Get Values from a query) you will also be able to create new dataset for populating parameter (just from a nother window). Selecting - Choose specific values, means that you already have static values, that's why you are not able to build a query.
Free Windows Admin Tool Kit Click here and download it now
March 30th, 2011 5:47am

Hi ursshula, Thanks for your answer. I don't want to have a query for my parameter: the parameter should be a free text. The dataset I want to edit is the dataset from the data itself, I want to define a query to get the data to the report :)My Blog - Dicas .NET
March 30th, 2011 1:42pm

Hi Oscarfh, It seems that you would like to use SSRS 2008 to develop your report. From your scenario, I suspect that you are using Visual studio 2010 to design your report, right? If I misunderstand, please let me know. Yes, the Visual studio 2010 includes report viewer controls with an RDLC version that is equivalent to the RDL 2008 schema used in RS 2008. There are some differences between using Visual Studio 2010 to design report and using SQL Server Business Intelligence Development Studio to design your report. For more information about this, please see, Difference between RDL and RDLC: http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/a5f67556-7223-492f-b8d8-77b118b2cb2c When you are using vs2010 to design your report, add a parameter as you mentioned above, this cannot pass the parameter to the report, you should drag a textbox from the Toolbox as a parameter in the webpage, and add a button beside the textbox, and then bind the textbox’s value to the dataset, when click the button, the parameter should be passed to the dataset and return the data. For more details about it, please see, passing parameters values step by step: http://www.visualstudiodev.com/visual-studio-report-controls/passing-parameter-values-step-by-step-24531.shtml I would like to suggest you using BIDS (this is integrate in SQL Server) to develop your report, and then you can add a parameter as you mentioned above, and can find query designer by right-click the dataset. If you want the full BI Development Studio, you could download Microsoft® SQL Server® 2008 Express with Advanced Services: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=b5d1b8c3-fda5-4508-b0d0-1311d670e336, or buy the SQL Server 2008 Developer Edition. If you have any question, please feel free to ask. Thanks, Eileen Zhao
Free Windows Admin Tool Kit Click here and download it now
March 31st, 2011 5:28am

Hi! This answer was great! I know understand why everybody tells to do things I can't find! thanks!!!My Blog - Dicas .NET
March 31st, 2011 3:22pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics