Skip to main content



      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 06:36 Go to next message
Eclipse UserFriend
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] Tue, 14 May 2013 22:48 Go to previous message
Eclipse UserFriend
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.
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: Wed Apr 30 04:07:24 EDT 2025

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

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

Back to the top