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 values in 2textboxes

generating report based on values in 2textboxes

Scheduled Pinned Locked Moved Visual Basic
databasequestionworkspace
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 had generated a report from a query in access (ie using the query as a datasource), and that worked fine. However, now i want to run the report based on the query in the database and 2 values (ie between 2 dates) in textboxes so i have hardcoded the following SQL statement behind the command button to generate the report. However, i do not know what to do from here - the SQL statement will be a datasource and datamember for what - the data environment? the command? the report? Thanking you! SELECT DISTINCT Client.Company, OrderGenerate.OrderNumber, Sum(OrderDetail.Price) AS SumOfPrice FROM (Client INNER JOIN OrderGenerate ON Client.ClientCode=OrderGenerate.ClientCode) INNER JOIN OrderDetail ON OrderGenerate.OrderNumber=OrderDetail.OrderNo WHERE Date Between ' " & txtDateFrom.Text & "' and ' " & txtDateTo.Text & "' GROUP BY Client.Company, OrderGenerate.OrderNumber

    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