Home » Developer & Programmer » Reports & Discoverer » Dynamic selection of columns for a report
Dynamic selection of columns for a report [message #185603] Wed, 02 August 2006 09:37 Go to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Take into consideration a table having 10 columns

I have a form which has these 10 fields as check boxes. and a print button.

If i select any of the check boxes then only those columns need to be shown in the report when i click on print button.

Ofcourse taking into consideration the sql query and everything else....

Any Ideas people?
Re: Dynamic selection of columns for a report [message #187506 is a reply to message #185603] Mon, 14 August 2006 04:39 Go to previous messageGo to next message
wency
Messages: 450
Registered: April 2006
Location: Philippines
Senior Member

Concatenate values of those checked fields
separated by comma. The outcome must be like this:

'field1, field2, field3'

Pass this string as as parameter before you call the report. For example you pass this on a parameter named 'fld',
then on report SQL write this:

Select &fld
from [table]

This is interpreted as:

Select field1, field2, field3
from [table]


Hope this help.
Re: Dynamic selection of columns for a report [message #187559 is a reply to message #187506] Mon, 14 August 2006 07:52 Go to previous messageGo to next message
mudabbir
Messages: 235
Registered: April 2006
Location: Kuwait
Senior Member

Thanks Wency ... I had already got the answer.. these parameters are called Lexical References.
Re: Dynamic selection of columns for a report [message #251355 is a reply to message #187559] Fri, 13 July 2007 02:58 Go to previous message
robert.joseph
Messages: 3
Registered: July 2007
Junior Member
I am also facing same kind of pblm..
If i pass only 2 fields(actually 3 fields are there,but one is null)how can i remove the blank spaces for the null data field.
I have to move the fields which containing data to the null space.see there are soem 10 fields i am passing thurg lexical parameter.how can i arrange the not null fields together?pls help
Previous Topic: Output Discoverer report vertically rather than in a table??
Next Topic: Show report in the excel
Goto Forum:
  


Current Time: Fri Jul 05 06:08:05 CDT 2024