Re: reports from forms

From: <rtproffitt_at_my-deja.com>
Date: Thu, 28 Oct 1999 17:15:29 GMT
Message-ID: <7va0bc$4o2$1_at_nnrp1.deja.com>


You could send the customer number as a parameter to the report, then use the parameter to build a lexical substitution...

ParmCustomer = passed
ParmWhere = built by program.

A Before/After Parameter trigger would build the lexical If :parmcustomer is null then

   :ParmWhere := NULL;
else

   :ParmWhere := ' Where customer = '||:ParmCustomer; end if;

The query block uses the lexical

     Select x,x,x,x,x
     From Custable
     &ParmWhere

If multiple tables are used, then building the lexical is more tricky...for example, you would not have the 'Where' modifier.

You can get quite slick and pass multiple customers, etc... but start simple...

HTH,
Robert Proffitt
Brea CA

In article <59ZR3.2145$49.188205_at_news.flash.net>,   "Brian Howard" <bkhoward_at_flash.net> wrote:
> I have a report that I access from a form via a button. I have
noticed that
> if it is strictly based upon a single block, I can generate the
report based
> on the queried info only; however, if the report is based upon
multiple
> blocks, it runs based upon entire query rather than on queried info
only.
> How can I overcome this?
>
> Quite simply, I have a form with several blocks and relationships. If
I run
> a query on one customer as an example. I want the report to print
simply
> that one customer as opposed to the entire database. I want it to
print only
> according to queried info only. How do you go about doing this?
Please give
> step-by-step.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Oct 28 1999 - 19:15:29 CEST

Original text of this message