FR [ 2148808 ] Suppress repeated values in printed tables

https://sourceforge.net/tracker/index.php?func=detail&aid=2148808&group_id=176962&atid=879335
This commit is contained in:
phib 2008-10-06 04:55:25 +00:00
parent c447821639
commit eeda6734f1
7 changed files with 274 additions and 134 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>Adempiere_stable</name> <name>adempiereStable</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>

View File

@ -517,6 +517,19 @@ public interface I_AD_PrintFormatItem
*/ */
public boolean isSuppressNull(); public boolean isSuppressNull();
/** Column name IsSuppressRepeats */
public static final String COLUMNNAME_IsSuppressRepeats = "IsSuppressRepeats";
/** Set Suppress Repeats.
* Suppress repeated elements in column.
*/
public void setIsSuppressRepeats (boolean IsSuppressRepeats);
/** Get Suppress Repeats.
* Suppress repeated elements in column.
*/
public boolean isSuppressRepeats();
/** Column name IsVarianceCalc */ /** Column name IsVarianceCalc */
public static final String COLUMNNAME_IsVarianceCalc = "IsVarianceCalc"; public static final String COLUMNNAME_IsVarianceCalc = "IsVarianceCalc";

View File

@ -1060,6 +1060,30 @@ public class X_AD_PrintFormatItem extends PO implements I_AD_PrintFormatItem, I_
return false; return false;
} }
/** Set Suppress Repeats.
@param IsSuppressRepeats
Suppress repeated elements in column.
*/
public void setIsSuppressRepeats (boolean IsSuppressRepeats)
{
set_Value (COLUMNNAME_IsSuppressRepeats, Boolean.valueOf(IsSuppressRepeats));
}
/** Get Suppress Repeats.
@return Suppress repeated elements in column.
*/
public boolean isSuppressRepeats ()
{
Object oo = get_Value(COLUMNNAME_IsSuppressRepeats);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Calculate Variance (?<EFBFBD>). /** Set Calculate Variance (?<EFBFBD>).
@param IsVarianceCalc @param IsVarianceCalc
Calculate Variance Calculate Variance

View File

@ -1508,6 +1508,7 @@ public class LayoutEngine implements Pageable, Printable, Doc
int[] columnMaxWidth = new int[columnCount]; int[] columnMaxWidth = new int[columnCount];
int[] columnMaxHeight = new int[columnCount]; int[] columnMaxHeight = new int[columnCount];
boolean[] fixedWidth = new boolean [columnCount]; boolean[] fixedWidth = new boolean [columnCount];
boolean[] colSuppressRepeats = new boolean[columnCount];
String[] columnJustification = new String[columnCount]; String[] columnJustification = new String[columnCount];
HashMap<Integer,Integer> additionalLines = new HashMap<Integer,Integer>(); HashMap<Integer,Integer> additionalLines = new HashMap<Integer,Integer>();
@ -1530,6 +1531,7 @@ public class LayoutEngine implements Pageable, Printable, Doc
item.getPrintName(format.getLanguage())); item.getPrintName(format.getLanguage()));
columnMaxWidth[col] = item.getMaxWidth(); columnMaxWidth[col] = item.getMaxWidth();
fixedWidth[col] = (columnMaxWidth[col] != 0 && item.isFixedWidth()); fixedWidth[col] = (columnMaxWidth[col] != 0 && item.isFixedWidth());
colSuppressRepeats[col] = item.isSuppressRepeats();
if (item.isSuppressNull()) if (item.isSuppressNull())
{ {
if (columnMaxWidth[col] == 0) if (columnMaxWidth[col] == 0)
@ -1718,7 +1720,7 @@ public class LayoutEngine implements Pageable, Printable, Doc
data, pk, pkColumnName, data, pk, pkColumnName,
pageNoStart, firstPage, nextPages, repeatedColumns, additionalLines, pageNoStart, firstPage, nextPages, repeatedColumns, additionalLines,
rowColFont, rowColColor, rowColBackground, rowColFont, rowColColor, rowColBackground,
tf, pageBreak); tf, pageBreak, colSuppressRepeats);
table.layout(0,0,false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft); table.layout(0,0,false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft);
if (m_tableElement == null) if (m_tableElement == null)
m_tableElement = table; m_tableElement = table;

View File

@ -32,6 +32,7 @@ import java.awt.geom.Point2D;
import java.text.AttributedCharacterIterator; import java.text.AttributedCharacterIterator;
import java.text.AttributedString; import java.text.AttributedString;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Properties; import java.util.Properties;
import java.util.logging.Level; import java.util.logging.Level;
@ -111,10 +112,11 @@ public class TableElement extends PrintElement
Object[][] data, KeyNamePair[] pk, String pkColumnName, Object[][] data, KeyNamePair[] pk, String pkColumnName,
int pageNoStart, Rectangle firstPage, Rectangle nextPages, int repeatedColumns, HashMap<Integer,Integer> additionalLines, int pageNoStart, Rectangle firstPage, Rectangle nextPages, int repeatedColumns, HashMap<Integer,Integer> additionalLines,
HashMap<Point,Font> rowColFont, HashMap<Point,Color> rowColColor, HashMap<Point,Color> rowColBackground, HashMap<Point,Font> rowColFont, HashMap<Point,Color> rowColColor, HashMap<Point,Color> rowColBackground,
MPrintTableFormat tFormat, ArrayList<Integer> pageBreak) MPrintTableFormat tFormat, ArrayList<Integer> pageBreak, boolean[] colSuppressRepeats)
{ {
super(); super();
log.fine("Cols=" + columnHeader.length + ", Rows=" + data.length); log.fine("Cols=" + columnHeader.length + ", Rows=" + data.length);
m_colSuppressRepeats = colSuppressRepeats;
m_columnHeader = columnHeader; m_columnHeader = columnHeader;
m_columnMaxWidth = columnMaxWidth; m_columnMaxWidth = columnMaxWidth;
m_columnMaxHeight = columnMaxHeight; m_columnMaxHeight = columnMaxHeight;
@ -199,6 +201,8 @@ public class TableElement extends PrintElement
/** Bounds of next Pages */ /** Bounds of next Pages */
private Rectangle m_nextPages; private Rectangle m_nextPages;
private boolean[] m_colSuppressRepeats;
/** repeat first x columns on - X Axis follow pages */ /** repeat first x columns on - X Axis follow pages */
private int m_repeatedColumns; private int m_repeatedColumns;
@ -1369,131 +1373,146 @@ public class TableElement extends PrintElement
// actual data // actual data
Object[] printItems = getPrintItems(row,col); Object[] printItems = getPrintItems(row,col);
float penY = curY; float penY = curY;
for (int index = 0; index < printItems.length; index++)
// suppress repeated values
boolean suppress = false;
if (m_colSuppressRepeats[col] && row > 0 && row != firstRow)
{ {
if (printItems[index] == null) Object[] lastItems = {};
; lastItems = getPrintItems(row-1, col);
else if (printItems[index] instanceof ImageElement) if (Arrays.equals(lastItems,printItems) )
suppress = true;
}
if ( !suppress )
{
for (int index = 0; index < printItems.length; index++)
{ {
Image imageToDraw = ((ImageElement)printItems[index]).getImage(); if (printItems[index] == null )
if (imageToDraw != null) // teo_sarca [ 1674706 ] ;
else if (printItems[index] instanceof ImageElement)
{ {
// Draw image using the scale factor - teo_sarca, [ 1673548 ] Image is not scaled in a report table cell Image imageToDraw = ((ImageElement)printItems[index]).getImage();
double scale = ((ImageElement)printItems[index]).getScaleFactor(); if (imageToDraw != null) // teo_sarca [ 1674706 ]
if (scale != 1.0) {
AffineTransform transform = new AffineTransform();
transform.translate(curX, penY);
transform.scale(scale, scale);
g2D.drawImage(imageToDraw, transform, this);
}
else {
g2D.drawImage(imageToDraw, curX, (int)penY, this);
}
}
}
else if (printItems[index] instanceof BarcodeElement)
{
try {
((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY);
} catch (OutputException e) {
}
}
else if (printItems[index] instanceof Boolean)
{
int penX = curX + (int)((netWidth-LayoutEngine.IMAGE_SIZE.width)/2); // center
if (((Boolean)printItems[index]).booleanValue())
g2D.drawImage(LayoutEngine.IMAGE_TRUE, penX, (int)penY, this);
else
g2D.drawImage(LayoutEngine.IMAGE_FALSE, penX, (int)penY, this);
penY += LayoutEngine.IMAGE_SIZE.height;
}
else if (printItems[index] instanceof HTMLRenderer)
{
HTMLRenderer renderer = (HTMLRenderer)printItems[index];
Rectangle allocation = new Rectangle((int)colWidth, (int)netHeight);
// log.finest( "printColumn HTML - " + allocation);
g2D.translate(curX, penY);
renderer.paint(g2D, allocation);
g2D.translate(-curX, -penY);
penY += allocation.getHeight();
}
else
{
String str = printItems[index].toString();
if (DEBUG_PRINT)
log.fine("row=" + row + ",col=" + col + " - " + str + " 8Bit=" + Util.is8Bit(str));
if (str.length() > 0)
{
usedHeight = 0;
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(str);
for (int lineNo = 0; lineNo < lines.length; lineNo++)
{ {
aString = new AttributedString(lines[lineNo]); // Draw image using the scale factor - teo_sarca, [ 1673548 ] Image is not scaled in a report table cell
aString.addAttribute(TextAttribute.FONT, getFont(row, col)); double scale = ((ImageElement)printItems[index]).getScaleFactor();
if (isView && printItems[index] instanceof NamePair) // ID if (scale != 1.0) {
{ AffineTransform transform = new AffineTransform();
aString.addAttribute(TextAttribute.FOREGROUND, LINK_COLOR); transform.translate(curX, penY);
aString.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL, 0, str.length()); transform.scale(scale, scale);
g2D.drawImage(imageToDraw, transform, this);
} }
else else {
aString.addAttribute(TextAttribute.FOREGROUND, getColor(row, col)); g2D.drawImage(imageToDraw, curX, (int)penY, this);
// }
iter = aString.getIterator(); }
boolean fastDraw = LayoutEngine.s_FASTDRAW; }
if (fastDraw && !isView && !Util.is8Bit(lines[lineNo])) else if (printItems[index] instanceof BarcodeElement)
fastDraw = false; {
measurer = new LineBreakMeasurer(iter, g2D.getFontRenderContext()); try {
while (measurer.getPosition() < iter.getEndIndex()) // print element ((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY);
} catch (OutputException e) {
}
}
else if (printItems[index] instanceof Boolean)
{
int penX = curX + (int)((netWidth-LayoutEngine.IMAGE_SIZE.width)/2); // center
if (((Boolean)printItems[index]).booleanValue())
g2D.drawImage(LayoutEngine.IMAGE_TRUE, penX, (int)penY, this);
else
g2D.drawImage(LayoutEngine.IMAGE_FALSE, penX, (int)penY, this);
penY += LayoutEngine.IMAGE_SIZE.height;
}
else if (printItems[index] instanceof HTMLRenderer)
{
HTMLRenderer renderer = (HTMLRenderer)printItems[index];
Rectangle allocation = new Rectangle((int)colWidth, (int)netHeight);
// log.finest( "printColumn HTML - " + allocation);
g2D.translate(curX, penY);
renderer.paint(g2D, allocation);
g2D.translate(-curX, -penY);
penY += allocation.getHeight();
}
else
{
String str = printItems[index].toString();
if (DEBUG_PRINT)
log.fine("row=" + row + ",col=" + col + " - " + str + " 8Bit=" + Util.is8Bit(str));
if (str.length() > 0)
{
usedHeight = 0;
String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(str);
for (int lineNo = 0; lineNo < lines.length; lineNo++)
{ {
TextLayout layout = measurer.nextLayout(netWidth + 2); aString = new AttributedString(lines[lineNo]);
if (iter.getEndIndex() != measurer.getPosition()) aString.addAttribute(TextAttribute.FONT, getFont(row, col));
fastDraw = false; if (isView && printItems[index] instanceof NamePair) // ID
float lineHeight = layout.getAscent() + layout.getDescent() + layout.getLeading();
if ((m_columnMaxHeight[col] <= 0
|| (usedHeight + lineHeight) <= m_columnMaxHeight[col])
&& (usedHeight + lineHeight) <= netHeight)
{ {
if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Block) && measurer.getPosition() < iter.getEndIndex()) aString.addAttribute(TextAttribute.FOREGROUND, LINK_COLOR);
{ aString.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL, 0, str.length());
layout = layout.getJustifiedLayout(netWidth + 2); }
else
aString.addAttribute(TextAttribute.FOREGROUND, getColor(row, col));
//
iter = aString.getIterator();
boolean fastDraw = LayoutEngine.s_FASTDRAW;
if (fastDraw && !isView && !Util.is8Bit(lines[lineNo]))
fastDraw = false;
measurer = new LineBreakMeasurer(iter, g2D.getFontRenderContext());
while (measurer.getPosition() < iter.getEndIndex()) // print element
{
TextLayout layout = measurer.nextLayout(netWidth + 2);
if (iter.getEndIndex() != measurer.getPosition())
fastDraw = false; fastDraw = false;
} float lineHeight = layout.getAscent() + layout.getDescent() + layout.getLeading();
penY += layout.getAscent(); if ((m_columnMaxHeight[col] <= 0
float penX = curX; || (usedHeight + lineHeight) <= m_columnMaxHeight[col])
if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Center)) && (usedHeight + lineHeight) <= netHeight)
penX += (netWidth-layout.getAdvance())/2; {
else if ((alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight) && layout.isLeftToRight()) if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Block) && measurer.getPosition() < iter.getEndIndex())
|| (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft) && !layout.isLeftToRight()))
penX += netWidth-layout.getAdvance();
//
if (fastDraw)
{ // Bug - set Font/Color explicitly
g2D.setFont(getFont(row, col));
if (isView && printItems[index] instanceof NamePair) // ID
{ {
g2D.setColor(LINK_COLOR); layout = layout.getJustifiedLayout(netWidth + 2);
// TextAttribute.UNDERLINE fastDraw = false;
}
penY += layout.getAscent();
float penX = curX;
if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Center))
penX += (netWidth-layout.getAdvance())/2;
else if ((alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight) && layout.isLeftToRight())
|| (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft) && !layout.isLeftToRight()))
penX += netWidth-layout.getAdvance();
//
if (fastDraw)
{ // Bug - set Font/Color explicitly
g2D.setFont(getFont(row, col));
if (isView && printItems[index] instanceof NamePair) // ID
{
g2D.setColor(LINK_COLOR);
// TextAttribute.UNDERLINE
}
else
g2D.setColor(getColor(row, col));
g2D.drawString(iter, penX, penY);
} }
else else
g2D.setColor(getColor(row, col)); layout.draw(g2D, penX, penY); // -> text
g2D.drawString(iter, penX, penY); if (DEBUG_PRINT)
log.fine("row=" + row + ",col=" + col + " - " + str + " - x=" + penX + ",y=" + penY);
penY += layout.getDescent() + layout.getLeading();
usedHeight += lineHeight;
//
if (m_columnMaxHeight[col] == -1) // FirstLineOny
break;
} }
else } // print element
layout.draw(g2D, penX, penY); // -> text } // for all lines
if (DEBUG_PRINT) } // length > 0
log.fine("row=" + row + ",col=" + col + " - " + str + " - x=" + penX + ",y=" + penY); } // non boolean
penY += layout.getDescent() + layout.getLeading(); } // for all print items
usedHeight += lineHeight; } // not suppressed
//
if (m_columnMaxHeight[col] == -1) // FirstLineOny
break;
}
} // print element
} // for all lines
} // length > 0
} // non boolean
} // for all print items
curY += netHeight + V_GAP; curY += netHeight + V_GAP;
curX += netWidth + H_GAP; curX += netWidth + H_GAP;

View File

@ -0,0 +1,41 @@
-- 3/10/2008 16:15:23
-- Financial reporting improvements
INSERT INTO AD_Element (AD_Org_ID,AD_Client_ID,AD_Element_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,0,53691,'IsSuppressRepeats',TO_DATE('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Suppress Repeats','Suppress Repeats',TO_DATE('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 3/10/2008 16:15:23
-- Financial reporting improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53691 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
-- 3/10/2008 16:15:52
-- Financial reporting improvements
INSERT INTO AD_Column (AD_Org_ID,AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,0,56359,53691,20,489,'IsSuppressRepeats',TO_DATE('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D',1,'Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Suppress Repeats',0,TO_DATE('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,1)
;
-- 3/10/2008 16:15:52
-- Financial reporting improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56359 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 3/10/2008 16:19:40
-- Financial reporting improvements
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Client_ID,AD_Field_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (56359,0,0,56378,426,TO_DATE('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.',1,'@IsForm@=N & @PrintFormatType@=F','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','Y','N','N','N','N','Y','Suppress Repeats',115,TO_DATE('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 3/10/2008 16:19:40
-- Financial reporting improvements
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
-- 3/10/2008 16:33:36
-- Financial reporting improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2008-10-03 16:33:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359
;
-- 3/10/2008 16:33:41
-- Financial reporting improvements
UPDATE AD_Column SET DefaultValue='N',Updated=TO_DATE('2008-10-03 16:33:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359
;
alter table ad_printformatitem add column IsSuppressRepeats CHAR(1) DEFAULT 'N' CHECK (IsSuppressRepeats IN ('Y','N')) NOT NULL;

View File

@ -0,0 +1,41 @@
-- 3/10/2008 16:15:23
-- Financial reporting improvements
INSERT INTO AD_Element (AD_Org_ID,AD_Client_ID,AD_Element_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,0,53691,'IsSuppressRepeats',TO_TIMESTAMP('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Suppress Repeats','Suppress Repeats',TO_TIMESTAMP('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 3/10/2008 16:15:23
-- Financial reporting improvements
INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53691 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID)
;
-- 3/10/2008 16:15:52
-- Financial reporting improvements
INSERT INTO AD_Column (AD_Org_ID,AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,0,56359,53691,20,489,'IsSuppressRepeats',TO_TIMESTAMP('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D',1,'Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Suppress Repeats',0,TO_TIMESTAMP('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,1)
;
-- 3/10/2008 16:15:52
-- Financial reporting improvements
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56359 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID)
;
-- 3/10/2008 16:19:40
-- Financial reporting improvements
INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Client_ID,AD_Field_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (56359,0,0,56378,426,TO_TIMESTAMP('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.',1,'@IsForm@=N & @PrintFormatType@=F','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','Y','N','N','N','N','Y','Suppress Repeats',115,TO_TIMESTAMP('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 3/10/2008 16:19:40
-- Financial reporting improvements
INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID)
;
-- 3/10/2008 16:33:36
-- Financial reporting improvements
UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2008-10-03 16:33:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359
;
-- 3/10/2008 16:33:41
-- Financial reporting improvements
UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2008-10-03 16:33:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359
;
alter table ad_printformatitem add column IsSuppressRepeats CHAR(1) DEFAULT 'N' CHECK (IsSuppressRepeats IN ('Y','N')) NOT NULL;