Bug 331279 - Scripted Data Set Parameters dont work in Viewer 2.6.1
Summary: Scripted Data Set Parameters dont work in Viewer 2.6.1
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Birt-DataAccess CLA
QA Contact: Xiaoying Gu CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-28 00:31 EST by Ramesh Chandra CLA
Modified: 2010-11-29 02:54 EST (History)
1 user (show)

See Also:


Attachments
ScriptedParameterTest.rptdesign - having Scripted Data Set based report parameters, not dependent on any external data (5.71 KB, application/xml)
2010-11-28 00:34 EST, Ramesh Chandra CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ramesh Chandra CLA 2010-11-28 00:31:57 EST
Build Identifier: 20100917-0705

A report parameter which is configured as dynamic and based on a Scripted Data Set does not populate data from the data set in the parameter page.  However, other types of data sets (flat, jdbc) etc. are working well as per expectation.
So, I am not able to build reports that need data as input parameters. 
This is not the same as bug#331032

Reproducible: Always

Steps to Reproduce:
1. Create a new Java Project
2. Create a new report in this java project
3. Create a new Data Source of type "Scripted Data Source", say "SomeDS"
4. Create a new Data Set with Data Source as "SomeDS", say "SomeDSet"
5. Create 2 output columns - id (String), name (String)
6. Create the open method as given below:
	totalRows = 3;
	currentRow = 0;
7. Create the fetch method as follows:
	if(currentRow == totalRows) return false;
	row["id"] = "" + id;
	row["name"] = "name " + id;
	currentRow++;
	return true;
8. Create a new report parameter, "whichId" with the following configuration:
	Name: whichId
	Prompt Text: Select Id
	Data type: String
	Display type: List box
	Selection list values: Dynamic
	Data Set: SomeDSet
	Select column value id: id
	Select display text: name
9. Save the report
10. Run the report
11. In the paramter page the list box is empty, instead of showing 3 values to pick from
Comment 1 Ramesh Chandra CLA 2010-11-28 00:34:13 EST
Created attachment 183989 [details]
ScriptedParameterTest.rptdesign - having Scripted Data Set based report parameters, not dependent on any external data
Comment 2 Xiaoying Gu CLA 2010-11-29 02:53:41 EST
If you preview the dataset, you will see that there is 0 record found. So actually the empty parameter list is correct.
 
But the empty dataset result is because there is an error in the script of data set and exceptions were thrown out. If you check the workspace\.metadata\.plugins\org.eclipse.birt.report.viewer\logs\, you will see the detailed error message.

I think the issue here might be that error dialog should pop up when you preview the dataset.