generating report based on parametres in Where clause
-
I am trying to generate a report in VB. What the report is generating is the individual product turnover in a given period (ie between 2 date values,obtained from 2textboxes), and grouped by product type. To do this, i have created a data environment, set up a connection and added a command. using the SQL builder, i have tried to create a SQL statement to satisfy the data i am trying to articulate. all the examples i have seen accept parametres in the select clause but not the Where so i dont know the syntax for what i am trying to achieve. here is the SQL: SELECT Product.Description, COUNT(OrderDetail.Quantity) AS Quantity, SUM(OrderDetail.Price) AS Price, ProductType.Description AS TypeDescription FROM Product, ProductType, OrderGenerate, OrderDetail WHERE Product .TypeCode = ProductType.TypeCode AND (OrderGenerate.OrderDate) BETWEEN = ? AND = ? and my code under the command button to generate the report is: deProductTurnover.ProductTurnover_Grouping dStart, dFinish rptProductTurnover.Show i have defined the parametres and the appropriate groups aswell. what am i doing wrong, what is the correct SQL statement? the error being returned is: "unabled to determine the parameter information for the parameters. Use the parameters Tab to specify appropriate info". any help would be greatly appreciated!