🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #962

sql and params in reports

#962
From: Jason Ortner
Date: Mon, 08 Jun 1998 00:00
46 lines
2151 bytes
I am lost!!  I am trying to write a report and I need to pass the
limiting dates to the query.  I have found where you can, it says, use
parameters for a query.  Exactly how you do this is less than clear in
the OLH.  Below is the query statement in the report and the sql
statement I attempted to get the query to accept the params.  Nothing
works and the error msgs are to say the least cryptic.  Can anyone
help?  I am posting this in the sql group also, I know that the same
people read all the groups most of the time, I'm just hedgeing my
bets.  I am frustrated.

This is in the report.  I am just trying to get the field pallet
filled, with some chance of the report being limited by the dates
provided.

this.LOG1 = new QUERY()
   this.LOG1.parent = this
   with (this.LOG1)
      left = 6120
      top = 75
      sql = "@log.sql"
      log.params["dt1"] = _app.startdate
      log.params["dt2"] = _app.enddate
      requestLive = false
      active = true
   endwith

This is the query statement from the designer, except for the :dt1 and
:dt2 lines.
I added those.  How do I get this to work??  I'm lost! I feel stupid
and any other things I can think of.  I know  I could set a range, go
through , put it in an array, append to another table, etc,etc.  With
this much power, this should not be this hard.



SELECT LOG_DATE, PURPOSE, TOT_HRS, OP_ID, CLIENT_ID, PROJ_CODE
FROM "log.dbf" Log
where (log_date >= :dt1)
and   (log_date <= :dt2)
--
Jason Ortner         jortnerxxppmm@onramp113.org


--
Jason Ortner         jortnerxxppmm@onramp113.org
Technical Details
Message-ID: <6lga00$4ic2@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,e334d7e5196c99b2,start
X-Google-Attributes: gidff5a1,public
From: "Jason Ortner" <jortner@onramp113.org>
Subject: sql and params in reports
Date: 1998/06/08
Message-ID: <6lga00$4ic2@forums.borland.com>
X-Deja-AN: 360611004
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.vdbase.data.sql