MS SQL Reporting Services in dotNet
aside from creating stored procedure to filter data in the database how can we filter data that is inputted from the user...
in MS ACCESS this is the code...
PARAMETERS [Beginning Date] DateTime, [Ending Date] DateTime;
SELECT DISTINCTROW Employees.Country, Employees.LastName, Employees.FirstName, Orders.ShippedDate, Orders.OrderID, [Order Subtotals].Subtotal AS SaleAmount
FROM Employees INNER JOIN (Orders INNER JOIN [Order Subtotals] ON Orders.OrderID = [Order Subtotals].OrderID) ON Employees.EmployeeID = Orders.EmployeeID
WHERE (((Orders.ShippedDate) Between [Beginning Date] And [Ending Date]));
the [Beginning Date] and the [Ending Date] is a user input to querry data from the database...
but in dotNet they no longer support this method... so any help would be great...
What do you mean by saying it isn't supported? How are you trying to use the below SQL statement?
Microsoft MVP (Visual Basic)
what i mean is about this "PARAMETERS [Beginning Date] DateTime, [Ending Date] DateTime;" the MS SQL do not support this method they only use "DECLARE [Beginning date].... i know how to create filter in stored procedure what i want to know is when you filter it in dotNET when you create MS SQL Reporting Services and filter the data which is user defined... i also know that dotNET can filter in the data section but it is not user defined i just wanted to prompt the user what will be displayed... in Visual Basic the code would look like this...
SQL = "Select * From vselInvoice Where dateShip like ' & text1.text & '";
in dotNET what would the could look like if your making an MS SQL Reporting Services... btw have you ever used one? because if you do you'll know what im talking about....
I've not used Reporting Services before but the below link seems to demonstrate how to use query parameters:
Using Parameters in a Report
Microsoft MVP (Visual Basic)
Parameters in MSSQL
I don't really know about Reporting Services, except that the parameters for a report are built into the report, which are filled or selected from while a report is executing, from wizards and menu options while you are building a report. Also, whether sql batch or stored procedure, you are likely to use @ variables as parameters inside sql statements. In MSSQL, for example, parameters look like this:
create procedure test123 as
varchar @aParameter input,
integer @result output
--and so on
I think it is better to send parameters to a SP in sql server.
"What you think doesn't matters! What matters is evidence..."
By David Jones in forum Database
Last Post: 08-31-2001, 01:22 PM
By Adam Dawes in forum VB Classic
Last Post: 12-21-2000, 12:50 PM
By William in forum Database
Last Post: 07-28-2000, 06:00 AM
By Becky in forum Database
Last Post: 07-11-2000, 04:27 PM
By Devaraj in forum Enterprise
Last Post: 05-11-2000, 01:48 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL