Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » BIRT Scripted data source(How to handle nested if conditions in scripted data source)
BIRT Scripted data source [message #1058480] Tue, 14 May 2013 10:36 Go to next message
Hemanth reddy is currently offline Hemanth reddyFriend
Messages: 1
Registered: May 2013
Junior Member
I am confusing about the return statements with if conditions. Say if i have three nested if conditions and if i want to loop through the third if condition till the condition satisifies, what should i do?
If i put return true in third if statements, its going to untermination status(infinite loop).

Given below the example:
if(size1<pol.size()){		// pol block
	ins = pol.get(size1);
		if(size2<ins.size()){ // ins block
		ct = ins.get(size2);
			if(size3<ct.size()){	// ct block
			acce = ct.get(size3);
			row["one"] = acce.firstVal();
			row["two"] = acce.secondVal();
			size3++;
			return true;
			}	// ct block
			size2++;
			return true;
		}						// ins block
		size1++;
			return true;
	}				// pol block
	return false;


My ct block is executed once and going back to pol block and started execution again. How to get rid of this problem?

Does any body have an idea on how to code nested if conditions logic in scripted data source.
Re: BIRT Scripted data source [message #1058774 is a reply to message #1058480] Wed, 15 May 2013 02:48 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You might try doing this in your open method and storing the values into arrays and then stepping through the arrays in your fetch method assigning the values to the rows.

Michael

Developer Evangelist, Silanis
Previous Topic:I use birt 2.3.2 which Tribix xls emitter version should I use?
Next Topic:getting row count of table/dataset
Goto Forum:
  


Current Time: Fri Sep 20 15:24:00 GMT 2024

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

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

Back to the top