Re: reports 2.5 - dynamic SQL
Date: 1997/10/30
Message-ID: <3458A553.C7464A_at_novo.dk>#1/1
Hi,
In short, use the & prefix as you would with "dynaic" where clauses. What you
can't make dynamic in Reports are the number/name of columns and their
datatype - everything else goes. For instance I have a report that runs
through the dictionary, and writes out the contents of all tables that fulfill
some certain conditions.
Make a placeholder in your master block that will contain the table name. Give the field the default value of a VALID tablename, and make sure to PREFIX the default value with spaces, so it gains the maximum size necessary. Then in your detail block just enter:
select .....
from &<placeholder variable>
where ....
This should do it.
- Peter H. Larsen
arielk_at_exlibris.co.il wrote:
> I am trying to create a master/detail report in which the the name of the
> detail table is derived from the master table.
> My problem is that I do not see any way to dynamically change the
> FROM-Clause of the detail Query according to the data in the master table.
>
> for example, a master table may include the following info:
> library_name, user_id.
> and a separate detail table for each library includes :
> user_id, name, address.
> I would like to display for each user, his full details. The report will
> have to decide automatically which table to query for every user.
>
> I anxiously await any ideas.
>
> Thanks,
> Ariel Kirson.
>
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet
Received on Thu Oct 30 1997 - 00:00:00 CET