2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@page import="java.util.Map"%>
21 <%@page import="java.util.HashMap"%>
22 <%@page import="org.openecomp.portalsdk.analytics.model.ReportLoader"%>
23 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.DataColumnType" %>
24 <%@ page import="org.openecomp.portalsdk.analytics.util.AppConstants" %>
25 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportDefinition" %>
26 <%@ page import="org.openecomp.portalsdk.analytics.system.AppUtils" %>
27 <%@ page import="org.openecomp.portalsdk.analytics.controller.WizardSequence" %>
28 <%@ page import="java.util.Vector" %>
29 <%@ page import="java.util.List" %>
30 <%@ page import="org.openecomp.portalsdk.analytics.model.DataCache" %>
31 <%@ page import="java.util.Iterator" %>
32 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.DataSourceType" %>
33 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.DBColumnInfo" %>
34 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.TableSource" %>
35 <%@ page import="org.openecomp.portalsdk.analytics.model.base.IdNameValue" %>
36 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType" %>
37 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.FormFieldType" %>
39 ReportDefinition rdef = (ReportDefinition) request.getAttribute(AppConstants.SI_REPORT_DEFINITION);
40 WizardSequence ws = rdef.getWizardSequence();
41 String curSubStep = ws.getCurrentSubStep();
42 boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB);
43 boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED);
45 dbInfo = rdef.getDBInfo();
46 boolean isEdit = curSubStep.equals(AppConstants.WSS_EDIT) || curSubStep.equals(AppConstants.WA_MODIFY);
47 DataColumnType currColumn = null;
49 currColumn = rdef.getColumnById(AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID));
50 Vector reportTableSources = DataCache.getReportTableSources((String) session.getAttribute("remoteDB"));
52 List reportCols = rdef.getAllColumns();
54 HashMap actionImgMap = ReportLoader.loadActionImgLookUp();
56 String[] numberFormats = { "9999999990", "9,999,999,990", "9999999990.99", "9,999,999,990.99", "$9,999,999,990.99", "$9,999,999,990.999" };
57 String[] dateFormats = { "MM/DD/YYYY", "MM/YYYY", "DD-MON-YYYY", "Month DD, YYYY", "Month, YYYY", "MM/DD/YYYY HH24:MI:SS", "YYYY" };
58 String[] charFormats = { "N/A" };
61 String dbColType = "";
64 dbColType = currColumn.getDbColType();
65 colType = currColumn.getColType();
68 String dependsOnFormField = currColumn.getDependsOnFormField();
70 <script language="JavaScript" src="<%= AppUtils.getBaseFolderURL() %>js/editabledropdown.js"></script>
71 <script language="JavaScript">
73 var tableDrillDownCount = 0;
75 function verifyCrossTabDrillDown() {
76 <% if(isCrossTab) { %>
77 if( (document.forma.crossTabValue.options[document.forma.crossTabValue.selectedIndex].value!="<%= AppConstants.CV_VALUE %>")
78 &&(document.forma.drillDownCtl.selectedIndex!=0)) {
79 alert("You cannot assign drill-down to this column unless the Column Usage in Cross-Tab is Report values.");
80 document.forma.drillDownURL.value = "";
81 document.forma.drillDownParams.value = "";
82 document.forma.drillDownSuppress.value = "";
83 document.forma.drillDownRequest.value = "";
84 document.forma.drillDownCtl.selectedIndex = 0;
89 } // verifyCrossTabDrillDown
91 function showDrillDownPopup(resetParams) {
92 if(! verifyCrossTabDrillDown())
96 document.forma.drillDownParams.value = "";
97 document.forma.drillDownSuppress.value = "";
98 document.forma.drillDownRequest.value = "";
101 if(document.forma.drillDownCtl.selectedIndex==0) {
102 document.forma.drillDownURL.value = "";
107 ddValue = document.forma.drillDownCtl.options[document.forma.drillDownCtl.selectedIndex].value;
110 if(document.forma.drillDownCtl.selectedIndex<=tableDrillDownCount) {
111 document.forma.drillDownURL.value = ddValue;
112 url = "<%= AppUtils.getRaptorActionURL() %>report.popup.drilldown.table&<%= AppConstants.RI_VIEW_ACTION %>="+ddValue;
114 document.forma.drillDownURL.value = ddValue;
115 url = "<%= AppUtils.getRaptorActionURL() %>report.popup.drilldown.report&<%= AppConstants.RI_REPORT_ID %>="+ddValue+"&drillDownParams="+escape(document.forma.drillDownParams.value)+"&drillDownSuppress="+escape(document.forma.drillDownSuppress.value)+"&drillDownRequest="+escape(document.forma.drillDownRequest.value);
117 var w = window.open(url, "drillDownPopup", "width=450,height=330,location=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes");
122 function setDrillDownValuesSuppress(newParams, newSuppress) {
123 document.forma.drillDownParams.value = newParams;
124 document.forma.drillDownSuppress.value = newSuppress;
125 } // setDrillDownValuesSuppress
127 function setDrillDownValues(newParams) {
128 setDrillDownValuesSuppress(newParams, "")
129 } // setDrillDownValues
131 function setTotalDropDownValues(canHaveTotal) {
132 <% if(! isSQLBased) { %>
134 if(document.forma.displayTotal.options.length>1)
137 if(document.forma.displayTotal.options.length==1)
141 document.forma.displayTotal.options.length = 0;
142 document.forma.displayTotal.options[0] = new Option("--- Do Not Display (Faster Report Execution) ---", "");
143 <% if(isCrossTab) { %>
144 document.forma.displayTotalPerRow.options.length = 0;
145 document.forma.displayTotalPerRow.options[0] = new Option("--- Do Not Display (Faster Report Execution) ---", "");
149 <% for(int i=0; i<AppConstants.TOTAL_FUNCTIONS.getCount(); i++) {
150 IdNameValue tValue = AppConstants.TOTAL_FUNCTIONS.getValue(i); %>
151 document.forma.displayTotal.options[<%= (i+1) %>] = new Option("<%= tValue.getName() %>", "<%= tValue.getId() %>");
152 <% if(isCrossTab) { %>
153 document.forma.displayTotalPerRow.options[<%= (i+1) %>] = new Option("<%= tValue.getName() %>", "<%= tValue.getId() %>");
159 document.forma.displayTotal.selectedIndex = 0;
160 <% if(isCrossTab) { %>
161 document.forma.displayTotalPerRow.selectedIndex = 0;
165 <% } // if(! isSQLBased)
167 } // setTotalDropDownValues
169 <% if(! isSQLBased) { %>
171 function showFormatPopup() {
172 if((document.forma.colType.value!="< %= AppConstants.CT_NUMBER % >")&&(document.forma.colType.value!="< %= AppConstants.CT_DATE % >")) {
173 alert("Display Format is not applicable to this column");
177 var w = window.open("", "formatHint", "width=200,height=300,location=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes");
180 w.document.writeln("<html><head>");
181 w.document.writeln("<title>Display Formats</title>");
182 //w.document.writeln("<link rel=stylesheet type=text/css href='< %= AppUtils.getBaseFolderURL() % >css/raptor.css'>");
183 w.document.writeln("<script language=JavaScript>");
184 w.document.writeln("function setValue(newValue) {");
185 w.document.writeln(" window.opener.document.forma.displayFormat.value=newValue;");
186 w.document.writeln(" window.close();");
187 w.document.writeln("} // setValue");
188 w.document.writeln("</"+"script>");
189 w.document.writeln("</head><body>");
190 if(document.forma.colType.value=="< %= AppConstants.CT_NUMBER % >") {
191 w.document.writeln("<font face='Arial, Helvetica, sans-serif' size=2><b>Number formats:</b></font><ul>");
192 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('9999999990.99')\">9999999990.99</a></b></font></li>");
193 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('9,999,999,990.99')\">9,999,999,990.99</a></b></font></li>");
194 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('$9,999,999,990.99')\">$9,999,999,990.99</a></b></font></li>");
195 w.document.writeln("</ul>");
196 } else if(document.forma.colType.value=="< %= AppConstants.CT_DATE % >") {
197 w.document.writeln("<font face='Arial, Helvetica, sans-serif' size=2><b>Date formats:</b></font><ul>");
198 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('MM/DD/YYYY')\">MM/DD/YYYY</a></b></font></li>");
199 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('MM/YYYY')\">MM/YYYY</a></b></font></li>");
200 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('DD-MON-YYYY')\">DD-MON-YYYY</a></b></font></li>");
201 w.document.writeln("<li><font face='Arial, Helvetica, sans-serif' size=2><b><a href=\"javascript:setValue('MONTH DD, YYYY')\">MONTH DD, YYYY</a></b></font></li>");
202 w.document.writeln("</ul>");
204 w.document.writeln("</body></html>");
209 function showFormFieldPopup() {
210 var w = window.open("", "fieldPopup", "width=400,height=400,location=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes");
214 w.document.writeln("<html><head>");
215 w.document.writeln("<title>Form Fields</title>");
216 w.document.writeln("<link rel=stylesheet type=text/css href='<%= AppUtils.getBaseFolderURL() %>css/raptor.css'>");
217 w.document.writeln("<script language=JavaScript>");
218 w.document.writeln("function setValue(newValue) {");
219 w.document.writeln(" window.opener.document.forma.exprFormula.selectedIndex = 12;");
220 w.document.writeln(" window.opener.exprFormulaChange(true);");
221 w.document.writeln(" window.opener.document.forma.exprText.value += newValue;");
222 w.document.writeln(" window.close();");
223 w.document.writeln("} // setValue");
224 w.document.writeln("</"+"script>");
225 w.document.writeln("</head><body>");
227 w.document.writeln("<table width=94% border=0 cellspacing=1 align=center>");
228 w.document.writeln(" <tr class=rbg1>");
229 w.document.writeln(" <td height=30> </td>");
230 w.document.writeln(" <td><b class=rtableheader>Report Form Fields</b></td>");
231 w.document.writeln(" </tr>");
233 if(rdef.getFormFieldList()!=null)
234 for(Iterator iter=rdef.getFormFieldList().getFormField().iterator(); iter.hasNext(); iCnt++) {
235 FormFieldType fft = (FormFieldType) iter.next(); %>
236 w.document.writeln(" <tr<%= (iCnt%2==0)?" class=rbg8":"" %>>");
237 w.document.writeln(" <td align=center valign=middle height=30><font class=rtabletext><%= (iCnt+1) %></font></td>");
238 w.document.writeln(" <td valign=middle>");
239 w.document.writeln(" <b class=rtabletext><a href=\"javascript:setValue('[<%= fft.getFieldName() %>]')\"><%= fft.getFieldName() %></a></b>");
240 w.document.writeln(" </td>");
241 w.document.writeln(" </tr>");
244 w.document.writeln(" <tr class=rbg3 height=30>");
245 w.document.writeln(" <td colspan=2 align=center valign=middle><b class=rtabletext>There are no form fields defined</b></td>");
246 w.document.writeln(" </tr>");
247 w.document.writeln(" <tr>");
248 w.document.writeln(" <td colspan=2 align=center><br><input type=Submit class=button value=Close onClick=\"window.close();\"></td>");
249 w.document.writeln(" </tr>");
251 w.document.writeln(" <tr class=rbg1 height=30>");
252 w.document.writeln(" <td> </td>");
253 w.document.writeln(" <td> </td>");
254 w.document.writeln(" </tr>");
257 w.document.writeln("</table>");
259 w.document.writeln("</body></html>");
261 } // showFormFieldPopup
263 function exprFormulaChange(handleText) {
265 exprValue = document.forma.exprFormula.options[document.forma.exprFormula.selectedIndex].value;
268 if(exprValue!='_exprText_') {
269 document.forma.exprText.value = '';
270 document.forma.exprText.disabled = true;
272 document.forma.exprText.disabled = false;
275 oldColType = document.forma.colType.value;
277 if((exprValue=="")||(exprValue=="MAX(")||(exprValue=="MIN(")||(exprValue=="_exprText_"))
278 document.forma.colType.value = document.forma.dbColType.value;
280 document.forma.colType.value = "<%= AppConstants.CT_NUMBER %>";
282 if(document.forma.colType.value!=oldColType) {
283 // Updating displayFormat select list
284 document.forma.displayFormat.options.length = 0;
286 if(document.forma.colType.value=="<%= AppConstants.CT_NUMBER %>") {
287 <% for(int i=0; i<numberFormats.length; i++) { %>
288 document.forma.displayFormat.options[<%= i %>] = new Option("<%= numberFormats[i] %>", "<%= numberFormats[i] %>");
290 } else if(document.forma.colType.value=="<%= AppConstants.CT_DATE %>") {
291 <% for(int i=0; i<dateFormats.length; i++) { %>
292 document.forma.displayFormat.options[<%= i %>] = new Option("<%= dateFormats[i] %>", "<%= dateFormats[i] %>");
295 <% for(int i=0; i<charFormats.length; i++) { %>
296 document.forma.displayFormat.options[<%= i %>] = new Option("<%= charFormats[i] %>", "<%= charFormats[i].equals("N/A")?"":charFormats[i] %>");
300 document.forma.displayFormat.selectedIndex = 0;
301 <% if(! isCrossTab) { %>
302 setTotalDropDownValues(document.forma.colType.value=="<%= AppConstants.CT_NUMBER %>");
307 } // exprFormulaChange
310 function columnDetailsChange() {
312 selText = document.forma.columnDetails.options[document.forma.columnDetails.selectedIndex].text;
313 document.forma.displayName.value = selText.substr(selText.indexOf('.')+1);
316 selValue = document.forma.columnDetails.options[document.forma.columnDetails.selectedIndex].value;
317 document.forma.dbColType.value = selValue.substr(selValue.lastIndexOf('|')+1);
319 exprFormulaChange(false);
321 document.forma.displayFormat.selectedIndex = 0;
322 } // columnDetailsChange
325 function showMapPopup() {
326 var colType = document.forma.colType.value;
327 var displayName = document.forma.displayName.value;
328 var displayFormat = document.forma.displayFormat.options[document.forma.displayFormat.selectedIndex].value;
330 var colName = "<%= currColumn.getDbColName() %>";
331 var tableId = "<%= rdef.getColumnTableById(currColumn.getColId()).getTableId() %>";
334 selValue = document.forma.columnDetails.options[document.forma.columnDetails.selectedIndex].value;
335 var colName = selValue.substr(selValue.indexOf('|')+1, selValue.lastIndexOf('|')-selValue.indexOf('|')-1);
336 var tableId = selValue.substr(0, selValue.indexOf('|'));
338 var w = window.open("<%= AppUtils.getRaptorActionURL() %>report.popup.map&colName="+colName+"&colType="+colType+"&displayName="+escape(displayName)+"&displayFormat="+escape(displayFormat)+"&tableId="+tableId, "mapPopup", "width=400,height=400,location=no,menubar=no,toolbar=no,status=no,resizable=yes,scrollbars=yes");
342 <% } // if(! isSQLBased)
345 function verifyCrossTabSemaphore() {
346 <% if(isCrossTab) { %>
347 if( (document.forma.crossTabValue.options[document.forma.crossTabValue.selectedIndex].value!="<%= AppConstants.CV_VALUE %>")
348 &&(document.forma.semaphore.selectedIndex!=0)) {
349 alert("You cannot assign Advanced Formatting to this column unless the Column Usage in Cross-Tab is Report values.");
350 document.forma.semaphore.selectedIndex = 0;
355 } // verifyCrossTabSemaphore
357 function showSemaphorePopup() {
358 var semaphoreId = "";
359 semaphoreId = document.forma.semaphore.options[document.forma.semaphore.selectedIndex].value;
360 var w = window.open("<%= AppUtils.getRaptorActionURL() %>report.popup.semaphore&semaphoreId="+semaphoreId, "semaphorePopup", "width=720,height=400,location=no,menubar=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes");
363 } // showSemaphorePopup
365 function updateSemaphoreList(semId, semName) { // Returns the position of the current semaphore in the list
368 lSize = document.forma.semaphore.options.length;
369 selIdx = document.forma.semaphore.selectedIndex;
370 for(var i=0; i<lSize; i++)
371 if(document.forma.semaphore.options[i].value==semId) {
372 if(document.forma.semaphore.options[i].text!=semName) {
373 document.forma.semaphore.options[i] = new Option(semName, semId);
374 document.forma.semaphore.selectedIndex = selIdx;
380 document.forma.semaphore.options[lSize] = new Option(semName, semId);
382 } // updateSemaphoreList
384 function showSemaphoreImportPopup() {
385 if(document.forma.drillDownCtl.selectedIndex==0||document.forma.drillDownCtl.selectedIndex<=tableDrillDownCount) {
386 alert("You need to select a report from the list, and then click this button\n"+
387 "to import all the Advanced Display Formattings from selected report into\n"+
388 "this report. No Advanced Display Formattings have been imported.");
393 ddValue = document.forma.drillDownCtl.options[document.forma.drillDownCtl.selectedIndex].value;
394 var w = window.open("<%= AppUtils.getRaptorActionURL() %>report.popup.import.semaphore&<%= AppConstants.RI_REPORT_ID %>="+ddValue, "semaphoreImportPopup", "width=400,height=250,location=no,menubar=no,toolbar=no,status=yes,resizable=yes,scrollbars=yes");
397 } // showSemaphoreImportPopup
399 function showImageOptions() {
400 var selectionType= document.forma.anchor.options[document.forma.anchor.selectedIndex].value;
401 if (selectionType == "IMAGE") {
402 //document.getElementById("imageSelectionDiv").style.display='block';
404 document.getElementById("imageSelectionDiv").style.display='none';
408 function showDisplayFormats() {
410 var colType= document.forma.colType.options[document.forma.colType.selectedIndex].value;
411 if (colType == "<%=AppConstants.CT_HYPERLINK%>") {
412 document.getElementById("dataFormatDiv").style.display='none';
413 //document.getElementById("hyperlinkDiv").style.display='block';
415 document.getElementById("hyperlinkDiv").style.display='none';
416 //document.getElementById("dataFormatDiv").style.display='block';
418 var dataFormat = document.forma.colDataFormat;
419 dataFormat.options.length = 0;
421 dataFormat.options[dataFormat.options.length] = new Option('Select', -1);
422 if (colType == "<%=AppConstants.CT_NUMBER%>") {
423 dataFormat.options[dataFormat.options.length] = new Option('9999999990','9999999990');
424 dataFormat.options[dataFormat.options.length] = new Option('9,999,999,990','9,999,999,990');
425 dataFormat.options[dataFormat.options.length] = new Option('9999999990.99','9999999990.99');
426 dataFormat.options[dataFormat.options.length] = new Option('9,999,999,990.99','9,999,999,990.99');
427 dataFormat.options[dataFormat.options.length] = new Option('$9,999,999,990.99','$9,999,999,990.99');
428 dataFormat.options[dataFormat.options.length] = new Option('$9,999,999,990.999','$9,999,999,990.999');
429 var lSize = dataFormat.options.length;
430 for(var i=0; i<lSize; i++) {
431 if(dataFormat.options[i].value=="<%=currColumn.getColFormat()%>") {
432 dataFormat.options[i].selected = true;
435 if(document.getElementById("filterDateColumn")) document.getElementById("filterDateColumn").style.display = "none";
438 if (colType == "<%=AppConstants.CT_DATE%>") {
439 dataFormat.options[dataFormat.options.length] = new Option('MM/DD/YYYY','MM/DD/YYYY');
440 dataFormat.options[dataFormat.options.length] = new Option('MM/YYYY','MM/YYYY');
441 dataFormat.options[dataFormat.options.length] = new Option('DD-MON-YYYY','DD-MON-YYYY');
442 dataFormat.options[dataFormat.options.length] = new Option('Month DD, YYYY','Month DD, YYYY');
443 dataFormat.options[dataFormat.options.length] = new Option('Month, YYYY','Month, YYYY');
444 dataFormat.options[dataFormat.options.length] = new Option('MM/DD/YYYY HH24:MI:SS','MM/DD/YYYY HH24:MI:SS');
445 dataFormat.options[dataFormat.options.length] = new Option('YYYY/MM/DD HH24:MI:SS','YYYY/MM/DD HH24:MI:SS');
446 dataFormat.options[dataFormat.options.length] = new Option('YYYY','YYYY');
447 var lSize = dataFormat.options.length;
448 for(var i=0; i<lSize; i++) {
449 if(dataFormat.options[i].value=="<%=currColumn.getColFormat()%>") {
450 dataFormat.options[i].selected = true;
453 //if(document.getElementById("filterDateColumn")) document.getElementById("filterDateColumn").style.display = "block";
456 if (colType == "<%=AppConstants.CT_CHAR%>") {
457 dataFormat.options[dataFormat.options.length] = new Option('N/A','N/A');
458 if(document.getElementById("filterDateColumn")) document.getElementById("filterDateColumn").style.display = "none";
466 <table width="100%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
468 <td class=rbg1 colspan=2 valign="Middle"><b class=rtableheader>Step <%= ws.getCurrentStepIndex() %> of <%= ws.getStepCount() %> - Report <%= ws.getCurrentStep() %> - <%= curSubStep %></b></td>
470 <% if(isSQLBased) { %>
472 <td class=rbg2 align="right" width="25%" height="30" style="background-image:url(<%= AppUtils.getImgFolderURL() %>required.gif); background-position:top right; background-repeat:no-repeat;"><font class=rtabletext>Column ID: </font></td>
473 <td class=rbg3 align="left" width="50%"><font class=rtabletext>
474 <%= currColumn.getColId() %>
478 <td class=rbg2 align="right" width="25%" height="30" style="background-position:top right; background-repeat:no-repeat;"><font class=rtabletext>Depends on formfield: </font></td>
479 <td class=rbg3 align="left" width="50%"><font class=rtabletext>
480 <input type="text" style="width: 200px;" name="dependsOnFormField" value="<%= nvl(dependsOnFormField,"")%>"></input> </tr>
481 <% } // if(! isSQLBased)
483 <% if(isCrossTab) { %>
485 <td class=rbg2 align="right" width="25%" height="30" style="background-image:url(<%= AppUtils.getImgFolderURL() %>required.gif); background-position:top right; background-repeat:no-repeat;"><font class=rtabletext>Column Usage in Cross-Tab: </font></td>
486 <td class=rbg3 align="left" width="50%"><font class=rtabletext>
487 <select name="crossTabValue"onChange="setTotalDropDownValues(this.options[this.selectedIndex].value=='<%= AppConstants.CV_VALUE %>')">
488 <option value="<%= AppConstants.CV_ROW %>"<%= isEdit?(nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_ROW)?" selected":""):" selected" %>><%= rdef.getCrossTabDisplayValue(AppConstants.CV_ROW) %>
489 <option value="<%= AppConstants.CV_COLUMN %>"<%= (isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_COLUMN))?" selected":"" %>><%= rdef.getCrossTabDisplayValue(AppConstants.CV_COLUMN) %>
490 <option value="<%= AppConstants.CV_VALUE %>"<%= (isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_VALUE))?" selected":"" %>><%= rdef.getCrossTabDisplayValue(AppConstants.CV_VALUE) %>
491 <option value=""<%= (isEdit&&(nvl(currColumn.getCrossTabValue()).length()==0))?" selected":"" %>>Invisible/Filter
492 </select></font></td>
495 <% if(! isSQLBased) { %>
497 <td class=rbg2 align="right" width="25%" height="30" style="background-image:url(<%= AppUtils.getImgFolderURL() %>required.gif); background-position:top right; background-repeat:no-repeat;"><font class=rtabletext>Table Column: </font></td>
498 <td class=rbg3 align="left" width="50%"><font class=rtabletext>
500 <%= nvl(rdef.getColumnLabel(currColumn), currColumn.getDbColName()) /*currColumn.getColName()*/ %>
502 <select name="columnDetails" onChange="columnDetailsChange();">
504 String remoteDbPrefix = dbInfo;
505 for(Iterator iter=rdef.getDataSourceList().getDataSource().iterator(); iter.hasNext(); ) {
506 DataSourceType dst = (DataSourceType) iter.next();
508 Vector dbColumns = DataCache.getReportTableDbColumns(dst.getTableName().toUpperCase(),remoteDbPrefix);
510 for(int i=0; i<dbColumns.size(); i++) {
511 DBColumnInfo dbCol = (DBColumnInfo) dbColumns.get(i);
512 //if(dst.getTableName().toUpperCase().equals(dbCol.getTableName())) {
514 <option value="<%= dst.getTableId() %>|<%= dbCol.getColName() %>|<%= dbCol.getColType() %>"<%= (icnt==0)?" selected":"" %>>[<%= dst.getDisplayName() %>].<%= dbCol.getLabel() %>
516 dispName = dbCol.getLabel();
517 dbColType = dbCol.getColType();
527 <input type="hidden" name="dbColType" value="<%= dbColType %>">
528 <input type="hidden" name="colType" value="<%= colType %>">
531 <% } // if(! isSQLBased)
534 <% if(isSQLBased) { %>
536 <td class=rbg2 align="right" height="30"><font class=rtabletext>Datatype: </font></td>
537 <td class=rbg3 align="left" nowrap><font class=rtabletext>
538 <select name="colType" style="width: 100px;" onChange="showDisplayFormats();">
539 <option value="0"> Select</option>
540 <option value="<%=AppConstants.CT_NUMBER%>" <%=currColumn.getColType().equals(AppConstants.CT_NUMBER)?" selected": ""%>> Number </option>
541 <option value="<%=AppConstants.CT_DATE%>" <%=currColumn.getColType().equals(AppConstants.CT_DATE)?" selected": ""%>> Date</option>
542 <option value="<%=AppConstants.CT_CHAR%>" <%=currColumn.getColType().equals(AppConstants.CT_CHAR)?" selected": ""%>> Character</option>
543 <option value="<%=AppConstants.CT_HYPERLINK%>" <%=currColumn.getColType().equals(AppConstants.CT_HYPERLINK)?" selected": ""%>> Hyperlink</option>
549 <td class=rbg2 align="right" height="30"><font class=rtabletext>Group By Pos: </font></td>
550 <td class=rbg3 align="left" nowrap><font class=rtabletext>
551 <select name="groupByPos" style="width: 100px;">
552 <option value="0"> Select</option>
553 <option value="1" <%=(currColumn.getGroupByPos()!=null && currColumn.getGroupByPos()==1)?" selected": ""%>> 1 </option>
559 <td class=rbg2 align="right" height="30"><font class=rtabletext>Custom Text for Sub-Total: </font></td>
560 <td class=rbg3 align="left" nowrap><font class=rtabletext>
561 <font class=rtabletext>
562 <input type="text" size="30" maxlength="500" style="width: 100px;" class=rtabletext name="subTotalCustomText" value="<%= isEdit?(currColumn.getSubTotalCustomText()!=null?currColumn.getSubTotalCustomText():"Sub Total"):"Sub Total" %>"/>
568 <td class=rbg2 align="right" height="30"><font class=rtabletext>Hide Repeated Values : </font></td>
569 <td class=rbg3 width="50%" align="left" nowrap><font class=rtabletext>
570 <input type="checkbox" name="hideRepeatedKeys" value="Y" <%=(currColumn.isHideRepeatedKey()!=null && currColumn.isHideRepeatedKey().booleanValue())?" checked":"" %>>
577 <td class=rbg2 align="right" height="30"><font class=rtabletext>Multi group Column Level: </font></td>
578 <td class=rbg3 align="left" nowrap><font class=rtabletext>
579 <select name="multiGroupColLevel" style="width: 100px;">
580 <option value="0"> Select</option>
581 <option value="-1" <%=(currColumn.getLevel()!=null && currColumn.getLevel()==-1)?" selected": ""%>> AUXILIARY-COLUMN </option>
582 <option value="1" <%=(currColumn.getLevel()!=null && currColumn.getLevel()==1)?" selected": ""%>> 1 </option>
583 <option value="2" <%=(currColumn.getLevel()!=null && currColumn.getLevel()==2)?" selected": ""%>> 2 </option>
584 <option value="3" <%=(currColumn.getLevel()!=null && currColumn.getLevel()==3)?" selected": ""%>> 3 </option>
585 <option value="4" <%=(currColumn.getLevel()!=null && currColumn.getLevel()==4)?" selected": ""%>> 4 </option>
592 <td class=rbg2 align="right" height="30"><font class=rtabletext>Multi group Column Range : </font>
593 <font class=rtabletext>Colspan : </font>
595 <td class=rbg3 align="left" nowrap>
596 <font class=rtabletext>
597 <input type="text" size="30" style="width: 100px;" maxlength="500" class=rtabletext name="colspan" value="<%= isEdit?(currColumn.getColspan()!=null?currColumn.getColspan():""):"" %>"/>
603 <tr id ="dataFormatDiv">
604 <td colspan="2" class=rbg2>
605 <table width="100%" cellspacing="1" cellpadding="3" align=center>
607 <td class=rbg2 width="25%" align="right" height="30"><font class=rtabletext>Dataformat: </font></td>
608 <td class=rbg3 width="50%" align="left" nowrap><font class=rtabletext>
609 <select name="colDataFormat" style="width: 100px;">
614 <% if(!isCrossTab) { %>
615 <tr id="filterDateColumn">
616 <td class=rbg2 width="25%" align="right" height="30"><font class=rtabletext>Enhanced Pagination: </font></td>
617 <td class=rbg3 width="50%" align="left" nowrap><font class=rtabletext>
618 <input type="checkbox" name="enhancedPagination" value="Y" <%=(currColumn.isEnhancedPagination()!=null && currColumn.isEnhancedPagination().booleanValue())?" checked":"" %> />
627 <tr id ="hyperlinkDiv">
629 <table width="100%" cellspacing="1" cellpadding="3" align=center>
631 <td class=rbg2 width="25%" align="right" height="30"><font class=rtabletext>URL: </font></td>
632 <td class=rbg3 width="50%" align="left" nowrap><font class=rtabletext>
633 <input type="text" size="30" maxlength="500" class=rtabletext name="hyperlinkURL" value="<%= isEdit?currColumn.getHyperlinkURL():"" %>"/>
639 <td class=rbg2 width="25%" align="right" height="30"><font class=rtabletext>Anchor: </font></td>
640 <td class=rbg3 width="50%" align="left" nowrap><font class=rtabletext>
641 <select name="anchor" onChange="showImageOptions()">
642 <option value="0"> Select</option>
643 <option value="VALUE" <%=nvl(currColumn.getHyperlinkType()).equals("VALUE")?" selected": ""%>> Value Of the Column </option>
644 <option value="IMAGE" <%=nvl(currColumn.getHyperlinkType()).equals("IMAGE")?" selected": ""%>> IMAGE</option>
649 <tr id="imageSelectionDiv" style="display:none;">
650 <td class=rbg2 width="25%" height="30" align="right">
651 <font class=rtabletext>Select Image for anchor: </font>
653 <td width="50%" align="left">
654 <font class=rtabletext>
655 <select id = "actionImg" name="actionImg" >
656 <option value=''> <!-- SELECT --></option>
658 if(!actionImgMap.isEmpty()) {
659 for( Iterator itr=actionImgMap.entrySet().iterator(); itr.hasNext(); ) {
660 Map.Entry e = (Map.Entry)itr.next();
661 String image_id = (String)e.getKey();
662 String image_loc = (String)e.getValue();
665 if (nvl(AppUtils.getRequestNvlValue(request, "actionImg")).length()>0 && !(AppUtils.getRequestNvlValue(request, "pdfImg").equals(currColumn.getActionImg())) ) {
666 if(image_loc .equals (AppUtils.getRequestNvlValue(request, "actionImg"))) {
669 <option value='<%= image_loc %>' selected> <%=image_id %></option>
673 <option value='<%= image_loc %>'> <%=image_id %></option>
677 if(image_loc .equals (currColumn.getActionImg())) {
680 <option value='<%= image_loc %>' selected> <%=image_id %> </option>
685 <option value='<%= image_loc %>'> <%=image_id %></option>
703 <td class=rbg2 align="right" height="30" style="background-image:url(<%= AppUtils.getImgFolderURL() %>required.gif); background-position:top right; background-repeat:no-repeat;"><font class=rtabletext>Display Name: </font></td>
704 <td class=rbg3 align="left"><font class=rtabletext>
705 <input type="text" style="width: 100px;" size="30" maxlength="60" class=rtabletext name="displayName" value="<%= isEdit?currColumn.getDisplayName():dispName %>"></font></td>
707 <% if(! isSQLBased) { %>
709 <td class=rbg2 align="right" height="30"><font class=rtabletext>Display Format: </font></td>
710 <td class=rbg3 align="left" nowrap><font class=rtabletext>
711 <!--input type="text" size="20" maxlength="30" name="displayFormat" value="< %= isEdit?nvl(currColumn.getColFormat()):"" % >" onFocus="blur();"></font>
712 <a href="javascript:showFormatPopup()"><img border="0" src="<%= AppUtils.getImgFolderURL() %>shareicon.gif" alt="Select from list" width="12" height="12"></a-->
713 <select name="displayFormat" style="width: 100px;" >
715 if(colType.equals(AppConstants.CT_NUMBER))
717 else if(colType.equals(AppConstants.CT_DATE))
721 for(int i=0; i<fmt.length; i++) { %>
722 <option value="<%= fmt[i].equals("N/A")?"":(fmt[i].startsWith("Month")?("fm"+fmt[i]):fmt[i]) %>"<%= (isEdit&&(nvl(currColumn.getColFormat()).toUpperCase().equals(fmt[i].toUpperCase())||("fm"+nvl(currColumn.getColFormat())).toUpperCase().equals(fmt[i].toUpperCase())))?" selected":"" %>><%= fmt[i] %>
724 </select></font></td>
726 <% } // if(! isSQLBased)
731 <td class=rbg2 align="right" height="30"><font class=rtabletext>Display Width: </font></td>
732 <td class=rbg3 align="left"><font class=rtabletext>
733 <% if (currColumn.getDisplayWidth()<=0) { currColumn.setDisplayWidth(10); } %>
734 <select name="displayWidth" style="width: 100px;" onKeyDown="fnKeyDownHandler(this, event);" onKeyUp="fnKeyUpHandler_A(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A(this, event);" onChange="fnChangeHandler_A(this, event);">
735 <option value="" style="COLOR:#ff0000;BACKGROUND-COLOR:#ffff00;">Custom</option> <!-- This is the Editable Option -->
736 <option value="10"<%= (isEdit&&(currColumn.getDisplayWidth()<=0 || currColumn.getDisplayWidth()==10))?"":" selected" %>>10%
737 <option value="20"<%= (isEdit&&(currColumn.getDisplayWidth()==20))?" selected":"" %>>20%
738 <option value="30"<%= (isEdit&&(currColumn.getDisplayWidth()==30))?" selected":"" %>>30%
739 <option value="40"<%= (isEdit&&(currColumn.getDisplayWidth()==40))?" selected":"" %>>40%
740 <option value="50"<%= (isEdit&&(currColumn.getDisplayWidth()==50))?" selected":"" %>>50%
741 <option value="60"<%= (isEdit&&(currColumn.getDisplayWidth()==60))?" selected":"" %>>60%
742 <option value="70"<%= (isEdit&&(currColumn.getDisplayWidth()==70))?" selected":"" %>>70%
743 <option value="80"<%= (isEdit&&(currColumn.getDisplayWidth()==80))?" selected":"" %>>80%
744 <option value="90"<%= (isEdit&&(currColumn.getDisplayWidth()==90))?" selected":"" %>>90%
745 <option value="100"<%= (isEdit&&(currColumn.getDisplayWidth()==100))?" selected":"" %>>100%
746 <% if(!((currColumn.getDisplayWidth()%10 == 0) && (currColumn.getDisplayWidth() > 100)) ) {
748 <option value="<%=currColumn.getDisplayWidth()%>" selected><%=currColumn.getDisplayWidth()%>%</option>
753 </select></font></td>
756 <% System.out.println("WidthInPxls " + currColumn.getDisplayWidthInPxls()); %>
758 <td class=rbg2 align="right" height="30"><font class=rtabletext>Display Width (In Pxls): </font></td>
759 <td class=rbg3 align="left"><font class=rtabletext>
760 <input type="text" style="width: 100px;" class="rtabletext" size="40" maxlength="100" id="widthInPxls" name="widthInPxls" value="<%= (nvl(AppUtils.getRequestNvlValue(request, "widthInPxls")).length() > 0)?
761 (!(AppUtils.getRequestNvlValue(request, "widthInPxls").equals(currColumn.getDisplayWidthInPxls()))?
762 AppUtils.getRequestNvlValue(request, "widthInPxls"):currColumn.getDisplayWidthInPxls()):
763 currColumn.getDisplayWidthInPxls() %>">
768 <td class=rbg2 align="right" height="30"><font class=rtabletext>No Wrap ? </font></td>
769 <td class=rbg3 align="left"><font class=rtabletext>
770 <select name="nowrap" style="width: 100px;" >
771 <option value="Y"<%= isEdit?(nvl(currColumn.getNowrap(),"N").startsWith("Y")?" selected":(!nvl(currColumn.getNowrap(),"False").startsWith("N") && org.openecomp.portalsdk.analytics.system.Globals.IsGlobalNoWrap()?" selected": "")):"" %>>Yes
772 <option value="N"<%= (isEdit&&(nvl(currColumn.getNowrap(),"False").startsWith("N")))?" selected":"" %>>No
773 </select></font></td>
777 <td class=rbg2 height="30" align="right"><font class=rtabletext>Indent Parameter to display value </font>
779 <td class=rbg3 align="left">
780 <select name="indentation" style="width: 100px;" >
781 <option value="0"> Select</option>
782 <option value="1" <%= AppUtils.getRequestNvlValue(request, "indentation").equals("1") ? " selected":((AppUtils.getRequestNvlValue(request, "indentation").length()<=0)?(currColumn.getIndentation()!=null && currColumn.getIndentation().intValue()==1?" selected":""):"") %>> 1 </option>
783 <option value="2" <%= AppUtils.getRequestNvlValue(request, "indentation").equals("2") ? " selected":((AppUtils.getRequestNvlValue(request, "indentation").length()<=0)?(currColumn.getIndentation()!=null && currColumn.getIndentation().intValue()==2?" selected":""):"") %>> 2 </option>
784 <option value="3" <%= AppUtils.getRequestNvlValue(request, "indentation").equals("3") ? " selected":((AppUtils.getRequestNvlValue(request, "indentation").length()<=0)?(currColumn.getIndentation()!=null && currColumn.getIndentation().intValue()==3?" selected":""):"") %>> 3 </option>
790 <td class=rbg2 align="right" height="30"><font class=rtabletext>Display Alignment: </font></td>
791 <td class=rbg3 align="left"><font class=rtabletext>
792 <select name="displayAlign" style="width: 100px;" >
793 <option value="Left"<%= isEdit?(nvl(currColumn.getDisplayAlignment(), "Left").equals("Left")?" selected":""):" selected" %>>Left
794 <option value="Center"<%= (isEdit&&nvl(currColumn.getDisplayAlignment()).equals("Center"))?" selected":"" %>>Center
795 <option value="Right"<%= (isEdit&&nvl(currColumn.getDisplayAlignment()).equals("Right"))?" selected":"" %>>Right
796 </select></font></td>
800 <td class=rbg2 align="right" height="30"><font class=rtabletext>Display (Header) Alignment: </font></td>
801 <td class=rbg3 align="left"><font class=rtabletext>
802 <select name="displayHeaderAlign" style="width: 100px;" >
803 <option value="Left"<%= isEdit?(nvl(currColumn.getDisplayHeaderAlignment(), "Left").equals("Left")?" selected":""):" selected" %>>Left
804 <option value="Center"<%= (isEdit&&nvl(currColumn.getDisplayHeaderAlignment()).equals("Center"))?" selected":"" %>>Center
805 <option value="Right"<%= (isEdit&&nvl(currColumn.getDisplayHeaderAlignment()).equals("Right"))?" selected":"" %>>Right
806 </select></font></td>
809 <td class=rbg2 align="right" height="30"><font class=rtabletext>Sortable? </font></td>
810 <td class=rbg3 align="left"><font class=rtabletext>
811 <select name="sortable" style="width: 100px;" >
812 <option value="N"<%= isEdit?((currColumn.isIsSortable()!=null && !currColumn.isIsSortable())?" selected":""):" selected" %>>No
813 <option value="Y"<%= (isEdit&&currColumn.isIsSortable()!=null && currColumn.isIsSortable())?" selected":"" %>>Yes
814 </select></font></td>
818 <% if(! isCrossTab) { %>
820 <td class=rbg2 align="right" height="30"><font class=rtabletext>Visible? </font></td>
821 <td class=rbg3 align="left"><font class=rtabletext>
822 <select name="visible" style="width: 100px;" >
823 <option value="Y"<%= isEdit?(currColumn.isVisible()?" selected":""):" selected" %>>Yes
824 <option value="N"<%= (isEdit&&(! currColumn.isVisible()))?" selected":"" %>>No
825 </select></font></td>
827 <% if(! isSQLBased) { %>
829 <td class=rbg2 align="right" height="30"><font class=rtabletext>Group By? </font></td>
830 <td class=rbg3 align="left"><font class=rtabletext>
831 <select name="groupBreak" style="width: 100px;" >
832 <option value="Y"<%= (isEdit&&currColumn.isGroupBreak())?" selected":"" %>>Yes
833 <option value="N"<%= isEdit?(currColumn.isGroupBreak()?"":" selected"):" selected" %>>No
834 </select></font></td>
839 <td class=rbg2 height="30" align="right" width="25%"><font face="Arial, Helvetica, sans-serif" size="1" class=rtabletext>Column Type </font></td>
840 <td align="left" width="50%" class=rbg3><font face="Arial, Helvetica, sans-serif" size="1" class=rtabletext>
841 <select name="calculated">
842 <option value="N"< %= (isEdit&&currColumn.isCalculated())?"":" selected" % >>Table Column
843 <option value="Y"< %= (isEdit&&currColumn.isCalculated())?" selected":"" % >>Expression
844 </select></font></td>
846 <% if(! isSQLBased) { %>
848 boolean isOtherExpr = isEdit&&currColumn.isCalculated()&&
849 (! nvl(currColumn.getColName()).startsWith("SUM( "))&&
850 (! nvl(currColumn.getColName()).startsWith("MAX( "))&&
851 (! nvl(currColumn.getColName()).startsWith("MIN( "))&&
852 (! nvl(currColumn.getColName()).startsWith("COUNT(*)"))&&
853 (! nvl(currColumn.getColName()).startsWith("COUNT(ALL "))&&
854 (! nvl(currColumn.getColName()).startsWith("COUNT(DISTINCT "))&&
855 (! nvl(currColumn.getColName()).startsWith("AVG(ALL "))&&
856 (! nvl(currColumn.getColName()).startsWith("AVG(DISTINCT "))&&
857 (! nvl(currColumn.getColName()).startsWith("STDDEV(ALL "))&&
858 (! nvl(currColumn.getColName()).startsWith("STDDEV(DISTINCT "))&&
859 (! nvl(currColumn.getColName()).startsWith("VARIANCE(ALL "))&&
860 (! nvl(currColumn.getColName()).startsWith("VARIANCE(DISTINCT "));
863 <td class=rbg2 align="right" height="30"><font class=rtabletext>Expression: </font></td>
864 <td class=rbg3 align="left"><font class=rtabletext>
865 <select name="exprFormula" onChange="exprFormulaChange(true);" style="width: 100px;" >
866 <option value=""<%= (isEdit&&currColumn.isCalculated())?"":" selected" %>>
867 <option value="SUM("<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("SUM( "))?" selected":"" %>>Sum
868 <option value="MAX("<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("MAX( "))?" selected":"" %>>Max
869 <option value="MIN("<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("MIN( "))?" selected":"" %>>Min
870 <option value="COUNT(*)"<%= (isEdit&&currColumn.isCalculated()&&(nvl(currColumn.getColName()).startsWith("COUNT(*)")||nvl(currColumn.getColName()).startsWith("COUNT(ALL ")))?" selected":"" %>>Count All
871 <option value="COUNT(DISTINCT"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("COUNT(DISTINCT "))?" selected":"" %>>Count Distinct
872 <option value="AVG(ALL"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("AVG(ALL "))?" selected":"" %>>Average All
873 <option value="AVG(DISTINCT"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("AVG(DISTINCT "))?" selected":"" %>>Average Distinct
874 <option value="STDDEV(ALL"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("STDDEV(ALL "))?" selected":"" %>>Standard Deviation All
875 <option value="STDDEV(DISTINCT"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("STDDEV(DISTINCT "))?" selected":"" %>>Standard Deviation Distinct
876 <option value="VARIANCE(ALL"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("VARIANCE(ALL "))?" selected":"" %>>Variance All
877 <option value="VARIANCE(DISTINCT"<%= (isEdit&&currColumn.isCalculated()&&nvl(currColumn.getColName()).startsWith("VARIANCE(DISTINCT "))?" selected":"" %>>Variance Distinct
878 <option value="_exprText_"<%= isOtherExpr?" selected":"" %>>---------- Other ----------
879 </select></font></td>
882 <td class=rbg2 align="right" height="30"><font class=rtabletext>Expression Other: </font></td>
883 <td class=rbg3 align="left" nowrap><font class=rtabletext>
884 <input type="text" size="30" name="exprText"<%= isOtherExpr?" value=\""+nvl(currColumn.getColName())+"\"":" value=\"\" disabled" %> onFocus="if(document.forma.exprFormula.options[document.forma.exprFormula.selectedIndex].value!='_exprText_') blur();"></font>
885 <a href="javascript:showMapPopup()"><img border="0" src="<%= AppUtils.getImgFolderURL() %>shareicon.gif" alt="Define custom values mapping" width="12" height="12"></a>
886 <a href="javascript:showFormFieldPopup()"><font class=rtabletext>Form Fields</font></a>
889 <% } // if(! isSQLBased)
891 <%-- if(! isCrossTab) { --%>
893 <td class=rbg2 align="right" height="30"><font class=rtabletext>Drill-down Link: </font></td>
894 <td class=rbg3 align="left"><font class=rtabletext>
895 <input type="hidden" name="drillDownURL" value="<%= isEdit?nvl(currColumn.getDrillDownURL()):"" %>">
896 <input type="hidden" name="drillDownParams" value="<%= isEdit?nvl(currColumn.getDrillDownParams()):"" %>">
897 <input type="hidden" name="drillDownSuppress" value="<%= isEdit?nvl(currColumn.getDrillDownType()):"" %>">
898 <input type="hidden" name="drillDownRequest" value="<%= isEdit?getRequestParam(currColumn.getDrillDownParams()):"" %>">
899 <input type="hidden" name="drillDownPopUp" value="<%= isEdit?(currColumn.isDrillinPoPUp()!=null?currColumn.isDrillinPoPUp():""):"" %>">
900 <select name="drillDownCtl" onChange="showDrillDownPopup(true)" style="width: 300px;" >
901 <option value=""<%= (isEdit&&nvl(currColumn.getDrillDownURL()).length()>0)?"":" selected" %>>----- No Drill-down -----
902 <% int tableDrillDownCount = 0;
904 for(int i=0; i<reportTableSources.size(); i++) {
905 TableSource tableSource = (TableSource) reportTableSources.get(i);
906 if(nvl(tableSource.getViewAction()).length()>0&&rdef.getTableByDBName(tableSource.getTableName())!=null) {
907 tableDrillDownCount++; %>
908 <option value="<%= tableSource.getViewAction() %>"<%= (isEdit&&nvl(currColumn.getDrillDownURL()).equals(AppUtils.getBaseActionURL()+tableSource.getViewAction()))?" selected":"" %>><%= tableSource.getDisplayName() %> Record Details
912 Vector publicReportIdNames = DataCache.getPublicReportIdNames();
913 for(int i=0; i<publicReportIdNames.size(); i++) {
914 IdNameValue reportIdName = (IdNameValue) publicReportIdNames.get(i); %>
915 <option value="<%= reportIdName.getId() %>"<%= (isEdit&&nvl(currColumn.getDrillDownURL()).equals(reportIdName.getId()))?" selected":"" %>>Public Report: <%= reportIdName.getName() %>
919 //if(!AppUtils.isSuperUser(request)) {
920 Vector groupReportIdNames = DataCache.getGroupAccessibleReportIdNames(AppUtils.getUserID(request),AppUtils.getUserRoles(request));
921 for(int j=0; j<groupReportIdNames.size(); j++) {
922 IdNameValue reportIdName = (IdNameValue) groupReportIdNames.get(j); %>
923 <option value="<%= reportIdName.getId() %>"<%= (isEdit&&nvl(currColumn.getDrillDownURL()).equals(reportIdName.getId()))?" selected":"" %>>Group Report: <%= reportIdName.getName() %>
928 //if(!AppUtils.isSuperUser(request)) {
929 Vector privateReportIdNames = DataCache.getPrivateAccessibleReportIdNames(AppUtils.getUserID(request),AppUtils.getUserRoles(request));
930 for(int j=0; j<privateReportIdNames.size(); j++) {
931 IdNameValue reportIdName = (IdNameValue) privateReportIdNames.get(j); %>
932 <option value="<%= reportIdName.getId() %>"<%= (isEdit&&nvl(currColumn.getDrillDownURL()).equals(reportIdName.getId()))?" selected":"" %>>Private Report: <%= reportIdName.getName() %>
937 <a href="javascript:showDrillDownPopup(false)"><img border="0" src="<%= AppUtils.getImgFolderURL() %>shareicon.gif" alt="Set new parameters configuration" width="12" height="12"></a>
939 <a href="javascript:showSemaphoreImportPopup()"><img border="0" src="<%= AppUtils.getImgFolderURL() %>lookup_arrow.gif" alt="Import advanced formatting from selected report" width="17" height="17"></a>
942 <script language="JavaScript">
944 tableDrillDownCount = <%= tableDrillDownCount %>;
947 <% String curSemId = "";
949 curSemId = nvl(currColumn.getSemaphoreId()); %>
951 <td class=rbg2 align="right" height="30"><font class=rtabletext>Advanced Display Formatting: </font></td>
952 <td class=rbg3 align="left" nowrap><font class=rtabletext>
953 <select name="semaphore"" onChange="verifyCrossTabSemaphore()" style="width: 300px;" >
954 <option value=""<%= (curSemId.length()==0)?" selected":"" %>>----- Do Not Use Advanced Formatting -----
955 <% if(rdef.getSemaphoreList()!=null)
956 for(Iterator iter=rdef.getSemaphoreList().getSemaphore().iterator(); iter.hasNext(); ) {
957 SemaphoreType semaphore = (SemaphoreType) iter.next(); %>
958 <option value="<%= semaphore.getSemaphoreId() %>"<%= curSemId.equals(semaphore.getSemaphoreId())?" selected":"" %>><%= semaphore.getSemaphoreName() %>
962 <input type="hidden" name="semaphoreTypeHidden" value=""/>
963 <a href="javascript:showSemaphorePopup()"><img border="0" src="<%= AppUtils.getImgFolderURL() %>shareicon.gif" alt="Define advanced formatting" width="12" height="12"></a>
968 <% boolean canHaveTotal = false;
970 //canHaveTotal = (! isCrossTab);
971 canHaveTotal = (!isCrossTab)||(isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_VALUE));
974 canHaveTotal = (isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_VALUE));
976 canHaveTotal = colType.equals(AppConstants.CT_NUMBER);
979 String colTotalRow = "";
980 String colTotal = isEdit?nvl(currColumn.getDisplayTotal()):"";
981 if(isCrossTab&&colTotal.indexOf('|')>=0) {
982 colTotalRow = colTotal.substring(colTotal.indexOf('|')+1);
983 colTotal = colTotal.substring(0, colTotal.indexOf('|'));
986 <td class=rbg2 align="right" height="30"><font class=rtabletext>Total for <%= isCrossTab?"each":"the" %> column: </font></td>
987 <td class=rbg3 align="left"><font class=rtabletext>
988 <select name="displayTotal" style="width: 300px;" >
989 <option value=""<%= (colTotal.length()>0)?"":" selected" %>>--- Do Not Display (Faster Report Execution) ---
990 <% if(canHaveTotal) {
991 for(int i=0; i<AppConstants.TOTAL_FUNCTIONS.getCount(); i++) {
992 IdNameValue tValue = AppConstants.TOTAL_FUNCTIONS.getValue(i); %>
993 <option value="<%= tValue.getId() %>"<%= (colTotal.startsWith(tValue.getId()))?" selected":"" %>><%= tValue.getName() %>
997 </select></font></td>
999 <% if(isCrossTab) { %>
1001 <td class=rbg2 align="right" height="30"><font class=rtabletext>Total for each row </font></td>
1002 <td class=rbg3 align="left"><font class=rtabletext>
1003 <select name="displayTotalPerRow">
1004 <option value=""<%= (colTotalRow.length()>0)?"":" selected" %>>--- Do Not Display (Faster Report Execution) ---
1005 <% if(canHaveTotal) {
1006 for(int i=0; i<AppConstants.TOTAL_FUNCTIONS.getCount(); i++) {
1007 IdNameValue tValue = AppConstants.TOTAL_FUNCTIONS.getValue(i); %>
1008 <option value="<%= tValue.getId() %>"<%= (colTotalRow.startsWith(tValue.getId()))?" selected":"" %>><%= tValue.getName() %>
1012 </select></font></td>
1014 <% } // if(isCrossTab)
1016 <% if(isSQLBased) { %>
1018 <td class=rbg2 align="right" height="30"><font class=rtabletext> </font></td>
1019 <td class=rbg3 align="left"><font class=rtabletext>
1020 <input type="Checkbox" name="no_parse_date" value="Y"<%= (isEdit&&rdef.getColumnNoParseDateFlag(currColumn))?" checked":"" %>>
1021 Do not attempt to parse values as date</font></td>
1027 <script language="JavaScript">
1029 function dataValidate() {
1031 /*if(rdef.getCrossTabColColumns().size()>0) {
1032 // Col headings column already defined
1035 if(document.forma.crossTabValue.options[document.forma.crossTabValue.selectedIndex].value=="<%= AppConstants.CV_VALUE %>") {
1036 <% DataColumnType valueCol = rdef.getCrossTabValueColumn();
1037 if((valueCol!=null)&&((currColumn==null)||(! currColumn.getColId().equals(valueCol.getColId())))) {
1038 // Report data column already defined
1040 alert("There is a column already designated for the report values.\nYou cannot have more than one column for that purpose.\nPlease change the Column Usage in Cross-Tab.");
1041 document.forma.crossTabValue.focus();
1044 <% } else if(! isSQLBased) { %>
1045 if(document.forma.exprFormula.selectedIndex==0) {
1046 alert("The column designated for the report values must be an expression.\nPlease change the Column Type and select Expression.");
1047 document.forma.exprFormula.focus();
1053 verifyCrossTabDrillDown();
1054 verifyCrossTabSemaphore();
1058 if(document.forma.displayWidth!=null && document.forma.displayWidth.options.selectedIndex == 0) {
1059 if(!checkNonNegativeInteger(document.forma.displayWidth.options[document.forma.displayWidth.options.selectedIndex].text)) {
1060 alert("Please enter positive number greater than 1% in \"Display Width\". No Characters are allowed.");
1063 /* if(eval(document.forma.displayWidth.options[document.forma.displayWidth.options.selectedIndex].text) < 10) {
1064 alert("Please enter positive number less than 10% in \"Desired Container Height\". No Characters are allowed.");
1068 if(eval(document.forma.displayWidth.options[document.forma.displayWidth.options.selectedIndex].text) > 100) {
1069 alert("Please enter positive number less than 100% in \"Display Width\". No Characters are allowed.");
1072 document.forma.displayWidth.options[document.forma.displayWidth.options.selectedIndex].value=document.forma.displayWidth.options[document.forma.displayWidth.options.selectedIndex].text;
1076 if(document.forma.displayName.value=="")
1078 document.forma.displayName.value = "<%= currColumn.getDisplayName() %>";
1080 document.forma.displayName.value = document.forma.tableName.options[document.forma.tableName.selectedIndex].text.substr(document.forma.tableName.options[document.forma.tableName.selectedIndex].text.indexOf('.')+1);
1083 <% if(reportCols.size()>0) { %>
1085 <% for(Iterator iter=reportCols.iterator(); iter.hasNext(); ) {
1086 DataColumnType dc = (DataColumnType) iter.next();
1088 if(! (isEdit&&dc.getColId().equals(currColumn.getColId()))) { %>
1089 ||(document.forma.displayName.value=="<%= dc.getDisplayName() %>")
1093 alert("A column with display name "+document.forma.displayName.value+" already exists.\nPlease select another name.");
1094 document.forma.displayName.focus();
1095 document.forma.displayName.select();
1104 showDisplayFormats();
1109 private String nvl(String s) { return (s==null)?"":s; }
1110 private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; }
1111 private String getRequestParam(String s) {
1112 if(nvl(s).equals("")) return s;
1114 String requestParam="";
1117 while(s.indexOf("#",pos)!=-1) {
1119 if(iCnt>1) requestParam += "|";
1120 pos = s.indexOf("#",pos)+1;
1121 requestParam += s.substring(s.indexOf("#")+1,s.indexOf("]",pos));
1123 return requestParam;