Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use a parameter in the where close 1

Status
Not open for further replies.

riad12

Programmer
Dec 1, 2005
10
0
0
US
Hi everyone, it's my first question in this forum, I am a new one with Actuate 7.0. My question is about using a parameter in Data source Editor in conditions section:
I want to concatenate the param_name with % sign to have this in the WHERE:
(like param_name%)
I tryed different things and it doesn't work.

Thanks for your help.

 
Hi,

You need to override the ObtainSelectStatement function on the DataStream.

It will need to be something like:

Function ObtainSelectStatement( ) As String
If Not(where="") Then
If Not(WhereClause="") Then
WhereClause = WhereClause & " AND "
End If
WhereClause = WhereClause & where
End If

If Not(param_name="") Then
If Not(WhereClause="") Then
WhereClause = WhereClause & " AND "
End If
WhereClause = WhereClause & "FIELDNAME like '" & param_name & "%'"
End If

'Comment out this line for SQLServer reports
FromClause = parseSchema(FromClause)

ObtainSelectStatement = Super::ObtainSelectStatement( )
End Function

you will need to put the correct field that is being compared with the param_name instead of FIELDNAME.

I hope this helps.

Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top