Hi Isabel.
you can use instance variable to compare "current value to previous value".
Here's some code that suppresses the "DeptNo" column:
//[[SPIDER_CLASS BEGIN
public class PgResourceAlloc extends spider.visual.CSpPage
//]]SPIDER_CLASS END
{
String _prevVal;
boolean _valueChanged;
boolean _firstTime;
//[[SPIDER_EVENTS BEGIN
//[[SPIDER_EVENT<DeptNo_onBeforeHtmlOutputEvent>
public int DeptNo_onBeforeHtmlOutputEvent(CSpHtmlOutputEvent event)
{
String currVal =
((CSpDisplayField)event.getSource()).getValue().stringValue();
if (firstTime){
_firstTime = false;
}
if (!_firstTime && !currVal.equals(_prevVal)) {
_prevVal = currVal;
_valueChanged = true;
}
else {
((CSpDisplayField)event.getSource()).setHtmlText("");
_valueChanged = false;
_firstTime = false;
}
return (PROCEED);
}
//]]SPIDER_EVENT<DeptNo_onBeforeHtmlOutputEvent>
//[[SPIDER_EVENT<this_onBeforeDisplayEvent>
public int this_onBeforeDisplayEvent(CSpDisplayEvent event)
{
//initialize the variables used to determine suppressed repeats.
_prevVal = "";
_valueChanged = false;
_firstTime = true;
return (PROCEED);
}
//]]SPIDER_EVENT<this_onBeforeDisplayEvent>
//]]SPIDER_EVENTS END
}
(Embedded
image moved "Kaluza, Isabel SLGA" <[EMAIL PROTECTED]>
to file: 07/30/99 11:07 AM
pic07209.pcx)
To: "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
cc: (bcc: Janet Traub/IS/SSC/THD)
Subject: [ND] Supressing field
Hi
I want to know what is the easiest way to supress a field in ND 4.1.3
I have the following being displayed on a page in a repeated group
Isabel 5 06/04/99
Isabel 5 06/06/99
Mark 6 07/01/99
Mark 8 07/01/99
I want the page display to look like
Isabel 5 06/04/99
06/06/99
Mark 6 07/01/99
Mark 8 07/01/99
What is the easiest way using ND 4.1.3 with java to do this
with minimum coding possible??
Isabel Kaluza
Junior Systems Planning Analyst
Saskatchewan Liquor and Gaming Authority
<mailto:[EMAIL PROTECTED]>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
pic07209.pcx