tag:blogger.com,1999:blog-6266231010760265271.post1533761551331945450..comments2024-03-29T01:19:51.547-04:00Comments on Bekwam Blog: Adding a Parameter to a Jasper Report WHERE Clause with iReport DesignerCarlhttp://www.blogger.com/profile/15013889141640529637noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-6266231010760265271.post-51571167576256047852023-08-26T17:31:32.440-04:002023-08-26T17:31:32.440-04:00Excellent. You save my day!Excellent. You save my day!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-72572636289172862462016-12-20T05:28:58.606-05:002016-12-20T05:28:58.606-05:00hi, How to create parameters like radio button or ...hi, How to create parameters like radio button or list box in ireport.piyushhttps://www.blogger.com/profile/15128322124677268991noreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-50097662763893100782015-06-16T08:40:51.801-04:002015-06-16T08:40:51.801-04:00Thank you very much sirThank you very much sirAnonymoushttps://www.blogger.com/profile/06227931086564379935noreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-88589636463826097482014-08-11T07:30:20.974-04:002014-08-11T07:30:20.974-04:00Try creating the report without the parameter. As...Try creating the report without the parameter. As a test, hardcode a parameter value in the queries to determine if the problem is in the parameter handling or the report itself.Carlhttps://www.blogger.com/profile/15013889141640529637noreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-87194651919927105962014-08-09T08:56:22.294-04:002014-08-09T08:56:22.294-04:00Hello Carl, I am working on a software with irepor...Hello Carl, I am working on a software with ireport and experiencing a little problem. I have two queries, one being in the main query and the other in the table dataset query. However both query have where clauses which is equal to the table_click. This is to help the software generate it own value for the where clause. When the report is previewed in the software, only the fields from the main query shows but the field from the table dataset does not show. <br />I would be glad if you can help me on this. Thank youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-28503376940425624292014-02-18T10:36:19.882-05:002014-02-18T10:36:19.882-05:00Hi,
Here's a link to a technique you can use ...Hi,<br /><br />Here's a link to a technique you can use if you have SQL Server. http://bekwam.blogspot.com/2012/04/swapping-out-sql-server-table-in-jasper.html<br /><br />I think the $P{} is limited to bind variables. Bind variables are place holders that are swapped in as Jasper Reports uses the query. Bind variables are not text concatenations and that may explain why you're able to use $P{year} in a WHERE clause but not in a FROM or SELECT clause.<br /><br />In the link I'm mentioning, I'm passing $P{year} in as a bind variable to a stored procedure. This is similar to the parameterization of a WHERE clause. Note that the stored procedure name is fixed; I am not dynamically selecting a stored procedure.Carlhttps://www.blogger.com/profile/15013889141640529637noreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-62356244107553058802014-02-18T09:31:32.273-05:002014-02-18T09:31:32.273-05:00hi carl,
i have a table, its syntax as "car_...hi carl, <br />i have a table, its syntax as "car_year".<br /><br />such as, car_2012, car_2013, car_2014 etc.<br /><br />i add a parameter for year. i've added parameters as car_$P{year} or car_:$P{year}<br />or car_+$P{year} or car_||$P{year} etc, what else... <br /><br />it didn't work and i dont know how can i to do. <br /><br />What would you recommend me for this problem? <br />Thanks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-61139266190052842312013-07-31T02:50:31.322-04:002013-07-31T02:50:31.322-04:00Wow! That was quick!
Thank you, the P!{} did the t...Wow! That was quick!<br />Thank you, the P!{} did the trick! Excellent!!<br />And yes, there is no user interaction involved in filling the parameter. Depending on conditions, there will be a where clause or there won't.<br />Thank you very much!Ursnoreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-40558295410053216762013-07-30T12:11:29.850-04:002013-07-30T12:11:29.850-04:00You can try using a special syntax that will not b...You can try using a special syntax that will not bind the value (2013): $P!{}. For example, instead of trying to put "FISCAL_YEAR = 2013" into WHERE ?, try<br /><br />SELECT * FROM sales $P!{FISCAL_YEAR}<br /><br />where FISCAL_YEAR is a parameter defined as "WHERE FISCAL_YEAR = 2013". This will substitute the whole clause in, not just the value. Watch for bad input!Carlhttps://www.blogger.com/profile/15013889141640529637noreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-17337102785761799342013-07-30T12:05:50.951-04:002013-07-30T12:05:50.951-04:00Great stuff. I got that far.
What I would like to ...Great stuff. I got that far.<br />What I would like to do goes a bit further.<br />Instead of WHERE YEAR = $P{year} I would like to use<br />WHERE $P{whereClause}<br />But the problem is that I get something like this sent to the SQL Server:<br />...WHERE 'FISCAL_YEAR = 2013'<br />which is obviously useless.<br />My parameter is of type String, which follows described behavior. I wonder if there is another data type that would allow me to send my parameter without apostrophes.<br />Any idea?Ursnoreply@blogger.comtag:blogger.com,1999:blog-6266231010760265271.post-73009755130254172052013-04-19T14:16:07.721-04:002013-04-19T14:16:07.721-04:00Hello Carl,
Your videos related to Jasper are hel...Hello Carl,<br /><br />Your videos related to Jasper are helping me and many people like me. <br />I am kind of new to jasper and trying to create a report <br />but I am struggling with some issue here<br /><br />Can you please look at <br />http://community.jaspersoft.com/questions/809247/create-multi-select-list-ireport<br /><br />and guide me to fix this issue.<br />Thank you for all the support<br /><br />Anonymousnoreply@blogger.com