Home » Developer & Programmer » Reports & Discoverer » How to run report passing conditional where clause
How to run report passing conditional where clause [message #89216] Sat, 06 December 2003 01:13 Go to next message
Rahman
Messages: 40
Registered: July 2003
Member
hi everyone!
plz help me,
i want to pass where_Clause parameter to run Report from Form based on the Radio button selected by the user
e.g.

Report based on:

1. MRN no
2. Fname, Sname, Lname
3. CivilId no
..
..
etc

now if user select 1 then
where_clause := ' WHERE MRN = '''||:Search.mrn||'''';
if 2
where_clause := ' WHERE fName = '||:Search.fName||' and sName = '||:Search.sName||
' and tName = '||:Search.tName||' and fmlyName = '||:Search.fmlyName;

.....
.....

Search.Mrn etc are text fields & value will be provided at run time

any help will be warmly appreciated

Note:-(i did it in diff. way but it is taking much time to run a single report containing a single record

Rg_Id := Find_Group('RG_FMLYLST');
-- ** Populate group with a query

ErrCode := Populate_Group_With_Query( Rg_Id, Sql_Stat); --Sql_Stat is assigned before
IF ErrCode = 0 then --if query success
Run_Product(REPORTS, 'c:himsMpiFmlyLst', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);

rahman
Re: How to run report passing conditional where clause [message #89217 is a reply to message #89216] Sat, 06 December 2003 04:06 Go to previous message
Rahman
Messages: 40
Registered: July 2003
Member
Anyway thanx to all
problem is solved
i did it using lexical reference
bye
rahman
Previous Topic: Base query returns NO_DATA
Next Topic: Report Server is not starting up
Goto Forum:
  


Current Time: Sat Apr 20 07:00:39 CDT 2024