Skip to Content
0
Former Member
Jan 24, 2011 at 02:36 PM

Select multiple field names from a parameter

65 Views

Hi, I have searched SAP forums but can not find an answer to the following:

Is there any way that you can select which fields to report on from a parameter?

I have a report which displays a line chart. The chart can have any number of fields of data to display (between1 and 10 fields) with a timeline on the bottom axis. I want the user to input the field(s) they would like to view from a drop-down list. I then want the value selected from this list to be dynamically inserted into the select statement.

I have been playing with a SQL Command, eg

Select {?Fields} from myTableName

Crystal prompts me for the fields as part as a multi value parameter but I keep getting errors:

error 80040e14 incorrect syntax near ','

I cannot view (or dont know how to view) the SQL statement so I'm not sure where the syntax error is occurring exactly but I can only presume its coming from the ?Fields array.

Does anyone know, firstly if I am trying to achieve the impossible and I should give it up! or secondly if I'm on the right track but need a bit of guidance...

Thanks in advance

Julie P

version used: Crystal Reports Developer 2008 version 12.3.0.601