Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » birt parameters sql
birt parameters sql [message #1724232] Mon, 22 February 2016 12:13 Go to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 47
Registered: August 2014
Member
Hi,

Is it possible to make one birt parameter as string...

use query in birt "SELECT * FROM sometable WHERE 1 = ?"

and then in birt parameter attach next query...like:
test.rptdesign&query="1 AND is admin = true AND username LIKE .... "

thanks
Re: birt parameters sql [message #1724256 is a reply to message #1724232] Mon, 22 February 2016 15:04 Go to previous messageGo to next message
Jerry Sheets is currently offline Jerry SheetsFriend
Messages: 76
Registered: July 2009
Location: Salt Lake City, UT
Member
I'm not sure what you are trying to accomplish. If you are just trying to build the 'Where' Clause, I do it in the beforeOpen method of the DataSet with something like the following:

// Append Where Clause for Project Manager
if (params["rprmProjectManager"].value != "ALL"){
this.queryText = this.queryText + " and ROOT.V_AE_CP_PRJ_ACTIVITY2.MGR_EMPLOYEE_ID = '" + params["rprmProjectManager"]+"'"
}

// Append Where Clause for Agency
if (params["rprmAgency"].value != "ALL"){
this.queryText = this.queryText + " and ROOT.V_AE_CP_PRJ_ACTIVITY2.AGENCY = '" + params["rprmAgency"]+"'"
}

// Append Order By Clause
this.queryText = this.queryText + " ORDER BY ROOT.V_AE_CP_PRJ_ACTIVITY2.CAPITAL_PROJECT"
Re: birt parameters sql [message #1728229 is a reply to message #1724232] Fri, 01 April 2016 08:54 Go to previous message
Nils Faupel is currently offline Nils FaupelFriend
Messages: 2
Registered: April 2016
Junior Member
Are you asking if it is possible to SQL-Inject an Query via Report-Parameters? No, this is not possible. I have tested it right now.
Previous Topic:Birt source code
Next Topic:Pushing group trailer to page footer ?
Goto Forum:
  


Current Time: Thu Mar 28 09:21:45 GMT 2024

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

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

Back to the top