Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325070 - facing problem in creating null parameter or optional parameter
Summary: facing problem in creating null parameter or optional parameter
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7.0   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard: Obsolete
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 02:33 EDT by Eswar CLA
Modified: 2011-05-26 13:32 EDT (History)
2 users (show)

See Also:


Attachments
sample report (69.45 KB, text/xml)
2010-09-17 03:20 EDT, Xiaoying Gu CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eswar CLA 2010-09-13 02:33:03 EDT
Build Identifier: Version: 3.4.2 Build id: M20090211-1700

Hi. I have focused to create optional parameter .such that if i didn't give the values of the parameters the default query has to run.
here is my query :
select * from APPA.APPA_JOURNAL_VOUCHERS where APPA.APPA_JOURNAL_VOUCHERS.JV_DATE > = ?
and
APPA.APPA_JOURNAL_VOUCHERS.JV_DATE < = ?  
and
APPA.APPA_JOURNAL_VOUCHERS.BRANCH_CODE is NULL 



andd i have used beforeopen script for dataset as :
if(params["branch_code"].value)
{
this.queryText = " select * from APPA.APPA_JOURNAL_VOUCHERS where APPA.APPA_JOURNAL_VOUCHERS.JV_DATE > = ? and APPA.APPA_JOURNAL_VOUCHERS.JV_DATE < = ?   and branch_code = " + params["branch_code"];
}



error i got is :
org.eclipse.birt.report.engine.api.EngineException: Cannot get the result set metadata. SQL statement does not return a ResultSet object. SQL error #1: ORA-00904: "HYD": invalid identifier 


Reproducible: Always
Comment 1 Xiaoying Gu CLA 2010-09-17 03:19:33 EDT
Hi,

Which BIRT version were you using?

I can not reproduce this issue in the 2.6.0 RCP release build.

Please refer to the attached report design which is same to the design you described.
Comment 2 Xiaoying Gu CLA 2010-09-17 03:20:06 EDT
Created attachment 179087 [details]
sample report
Comment 3 Xiaoying Gu CLA 2010-11-03 01:46:11 EDT
Set as worksforme based on comment #1.

Please feel free to reopen if these is any issues.