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();
			return true;
			}	// ct block
			return true;
		}						// ins block
			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.


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: Thu Jul 18 03:34:50 GMT 2024

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

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

Back to the top