Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » replacing string with parameter(Replae Funcion)
replacing string with parameter [message #885362] Tue, 12 June 2012 21:54 Go to next message
A R is currently offline A RFriend
Messages: 104
Registered: April 2012
Senior Member
Hi,

I am working on a report design , in which I want to replace a value in where condition (which is read from sql query)with parameter.

Please help me with your inputs and suggestions.

Thanks
AR
Re: replacing string with parameter [message #885605 is a reply to message #885362] Wed, 13 June 2012 10:07 Go to previous messageGo to next message
Dnns . is currently offline Dnns .Friend
Messages: 30
Registered: May 2012
Member
Hi,

first you have to create a Parameter at the "Edit Data Set"-Dialog. Open the dialog and choose "Parameters" at the left side. Then click the "New..." Button. Enter a Name for this parameter at the first line. Then you have to think if you want to use a reportparameter directly, or not. If want to use it directly choose this parameter in the "Linked To Report Parameter" ComboBox. Otherwise you can enter a Default Value (Constant or JavaScript Syntax). You also have to choose the right Data Type!

If you have done this, you can use this parameter by entering a "?" in your Query.

SELECT * FROM table WHERE column = parameter


for parameter you have to use the "?"

SELECT * FROM table WHERE column = ?


I hope you understood my explanation, and it helped you. Otherwise let me know.

Dnns
Re: replacing string with parameter [message #885855 is a reply to message #885605] Wed, 13 June 2012 18:19 Go to previous messageGo to next message
A R is currently offline A RFriend
Messages: 104
Registered: April 2012
Senior Member
Hi Dnns - Thanks for the response.

I am trying to do the same, but getting the following error, attached.

Thanks
AR
Re: replacing string with parameter [message #886086 is a reply to message #885855] Thu, 14 June 2012 08:12 Go to previous message
Dnns . is currently offline Dnns .Friend
Messages: 30
Registered: May 2012
Member
Please let me know, what your SQL Query was. Which datatype you have chosen? (Is it the same datatype than the column has?
Previous Topic:Custom StyleSheet not included when viewed?
Next Topic:Multiple graphs per report
Goto Forum:
  


Current Time: Fri Apr 19 22:51:34 GMT 2024

Powered by FUDForum. Page generated in 0.03114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top