Re: Passing Where Clause from Forms5.0 to Reports3.0 at Runtime,Please help I tried all ways.

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Wed, 21 Apr 1999 14:33:56 +0100
Message-ID: <MMoRBRAEPdH3Ewsb_at_ahardy.demon.co.uk>


In article <7fk36f$ibq$1_at_nnrp1.dejanews.com>, palu_at_my-dejanews.com writes
>Hi,
>
>I have to call Reports 3.0 from Forms 5.0 and pass Where Clause so that i get
>the report based on that clause.
>

I've only used R2.5 and F4.5, so...

>I have got a form with List items in it. I have to select the column in one
>list item and the value/range for that selected column in another list
>item.Depending on this WHERE Clause that is selected and the columns that are
>selected from different list items,i have to get the report in tabular form.
>My problem is that i cannot pass the Where Clause as parameter to reports.I
>created a parameter list & added the Parameter to it.before that i extracted
>the Where Clause in String & passed the string as lexical parameter to the
>reports. My query in the reports looks like this:
>
>
> select &p1 staff_c,&p2 staff_c...... from xyz where &p;
>
>
> Here for all the column parameters it is passing ,but not &p WHERE Clause.

In what way is this failing?

You might be getting caught by the "' and blank" problems if you are using them in your parameters? Due to the way in which these are put together and processed, the parameter needs to be enclosed in double quotes

e.g. if your where clause says: col1 = '99' then the whole parameter should be enclosed in double quotes: "col1 = '99'"

This showed itself on my system as just not running the report at all.

>My second problem is :: in the SELECT statement the column names that i give
>after the lexical parameter remain as it is.What i want is at runtime
>whichever column i select its name should be displayed in the Reports.

Maybe you should have column headings in your report which are just text fields whose values are dependent on the passed parameters?

Andy

-- 
[Quoted] [Quoted] Andy Hardy. PGP key available on request
===============================================================
Received on Wed Apr 21 1999 - 15:33:56 CEST

Original text of this message