Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. generating report based on parametres in Where clause

generating report based on parametres in Where clause

Scheduled Pinned Locked Moved Visual Basic
helpquestiondatabaseworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcm
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups