Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Parameter wildcard value(using wildcard in poarameter default value)
Parameter wildcard value [message #1773016] Wed, 20 September 2017 08:28 Go to next message
hatra atrin is currently offline hatra atrinFriend
Messages: 12
Registered: February 2014
Junior Member
Hi experts,

a very urgent question regarding setting parameter default value as wildcard,

I am using sql queries, I have a set of parameters strings and ints, I have applied * and % but it doesn't seem to work,

dataset query:

select x,c,v,b,n

where c= ?

and v=?

b =?

dataset parameter:

param 1 linked c

param2 linked v

param3 linked b



report parameter:

c

type= string

Default value ( here I want to apply a wild card where user can either run and get all Cs or change and write a string where they run the report )



here is more info

BIRT Report Designer 2.6.1 Report Version 3.2.22 ( RCP)



any help appreciate it,

thanks
Re: Parameter wildcard value [message #1773048 is a reply to message #1773016] Wed, 20 September 2017 19:39 Go to previous messageGo to next message
Jerry Sheets is currently offline Jerry SheetsFriend
Messages: 67
Registered: July 2009
Location: Salt Lake City, UT
Member
The way that I handle this is to remove the ? marks and data set parameters and use a 'beforeOpen' script instead. I use something like the following that basically allows you to do almost any thing you can do in SQL

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

// Append Where Clause for Option Status
if (params["rprmStatus"].value != "ALL"){
this.queryText = this.queryText + " and (ROOT.AE_B_OPN_D.ACTIVE is Null or ROOT.AE_B_OPN_D.ACTIVE = 'Y')"
}

// Append Order By Clause
this.queryText = this.queryText + "order by ROOT.AE_B_OPN_D.LEASE_NO,ROOT.AE_B_OPN_D.SEQ_NUM"
Re: Parameter wildcard value [message #1773049 is a reply to message #1773016] Wed, 20 September 2017 19:39 Go to previous messageGo to next message
Jerry Sheets is currently offline Jerry SheetsFriend
Messages: 67
Registered: July 2009
Location: Salt Lake City, UT
Member
The way that I handle this is to remove the ? marks and data set parameters and use a 'beforeOpen' script instead. I use something like the following that basically allows you to do almost any thing you can do in SQL

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

// Append Where Clause for Option Status
if (params["rprmStatus"].value != "ALL"){
this.queryText = this.queryText + " and (ROOT.AE_B_OPN_D.ACTIVE is Null or ROOT.AE_B_OPN_D.ACTIVE = 'Y')"
}

// Append Order By Clause
this.queryText = this.queryText + "order by ROOT.AE_B_OPN_D.LEASE_NO,ROOT.AE_B_OPN_D.SEQ_NUM"
Re: Parameter wildcard value [message #1773478 is a reply to message #1773049] Thu, 28 September 2017 13:39 Go to previous message
hatra atrin is currently offline hatra atrinFriend
Messages: 12
Registered: February 2014
Junior Member
thanks it is working now :)
Previous Topic:Birt 4.6 intergration with Wildfly 10.1.0
Next Topic:Filed colour
Goto Forum:
  


Current Time: Tue Jul 17 19:28:08 GMT 2018

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

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

Back to the top