Article View: borland.public.vdbase.data.sql
Article #964Re: sql and params in reports
From: hirschv at mindspring dot com Ke...
Date: Tue, 09 Jun 1998 00:00
Date: Tue, 09 Jun 1998 00:00
37 lines
2011 bytes
2011 bytes
"Jason Ortner" <jortner@onramp113.org> wrote: >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. First off, stop using the sql designer. Really. You're going to find yourself getting stuck. Second ... it's much easier than you're trying. I assume you are getting the dates from a form (user input), correct? If so, create a single datamodule. Place an instance of the datamodule on your form. Set the SHARED property to ALL. Place an instance of the datamodule on your report. Set the SHARED property to ALL. In the form, set your filter using either the rowset's filter property, or the beginFilter()/applyFilter() methods. Call the report from the form. Doing this will cause the _report_ to be generated using the filter set in the form ... Ken --- Ken Mayer [TeamB] Golden Stag Productions http://www.mindspring.com/~hirschv/homepage.htm http://www.mindspring.com/~hirschv/dbase/dbase.htm Please respond in the newsgroup unless explictly asked otherwise
Technical Details
Message-ID:
<357c821f.1763061@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6lga00$4ic2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,e334d7e5196c99b2 X-Google-Attributes: gidff5a1,public From: hirschv at mindspring dot com (Ken Mayer [TeamB]) Subject: Re: sql and params in reports Date: 1998/06/09 Message-ID: <357c821f.1763061@forums.borland.com> X-Deja-AN: 360855750 References: <6lga00$4ic2@forums.borland.com> Organization: Golden Stag Productions Reply-To: hirschv@nospam.mindspring.com Newsgroups: borland.public.vdbase.data.sql