Static variables in Breakouts

Discussions relating to breakout scripting, .NET and COM programming with Jiwa objects.

Static variables in Breakouts

Postby jeromeh » Mon Jun 02, 2014 12:00 pm

In Jiwa 6.5.13 in the breakout script text for the 'Sales Order Entry' form in the 'Form GridLines Row Change' script what are the Static1 to Static6 representing. Specifically I want to know what Static2 is and if I can effect its value from a value stored in the database?
jeromeh
Occasional Contributor
Occasional Contributor
 
Posts: 17
Joined: Wed Apr 08, 2009 9:53 am

Re: Static variables in Breakouts

Postby Mike.Sheen » Fri Jun 06, 2014 7:08 pm

jeromeh wrote:In Jiwa 6.5.13 in the breakout script text for the 'Sales Order Entry' form in the 'Form GridLines Row Change' script what are the Static1 to Static6 representing. Specifically I want to know what Static2 is and if I can effect its value from a value stored in the database?


Hi Jerome,

Static1, Static2, etc are fairly redundant - they were originally intended to be variables you could set to pass information between breakouts. A more elegant and powerful solution is to simply declare a variable as public in the Form Loaded breakout - after the End Sub, and then you can reference that variable and the value will be persisted for all breakouts - so the scope is global

eg: in the Form Loaded breakout of sales orders:

Code: Select all
End Sub

Public myVariable


Then, in any breakout you can read and write into that variable.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical / Programming

Who is online

Users browsing this forum: No registered users and 6 guests