Initial OpenECOMP policy/engine commit
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / WEB-INF / fusion / raptor / wizard_definition.jsp
1 <%--
2   ================================================================================
3   eCOMP Portal SDK
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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   ================================================================================
19   --%>
20 <%--
21  Name: wizard_definition.jsp
22  Use : Shows edit page of the meta information of the report. 
23  
24  Change Log
25  ==========
26  
27  14-Jul-2009 : Version 8.4 (Sundar); 
28                                 
29                                 <UL> 
30                                 <LI> Schedule functionality is available for Dashboard.</LI>
31                                 </UL>
32 --%>
33 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.DataColumnType" %>
34 <%@ page import="org.openecomp.portalsdk.analytics.util.AppConstants" %>
35 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportDefinition" %>
36 <%@ page import="org.openecomp.portalsdk.analytics.system.AppUtils" %>
37 <%@ page import="org.openecomp.portalsdk.analytics.controller.WizardSequence" %>
38 <%@ page import="java.util.List" %>
39 <%@ page import="java.util.Iterator" %>
40 <%@ page import="org.openecomp.portalsdk.analytics.system.Globals" %>
41 <%@ page import="org.openecomp.portalsdk.analytics.util.Utils" %>
42 <%@ page import="java.util.Vector" %>
43 <%@ page import="org.openecomp.portalsdk.analytics.model.ReportLoader" %>
44 <%@ page import="org.openecomp.portalsdk.analytics.model.base.IdNameValue" %>
45 <%@ page import="java.util.HashMap" %>
46 <%@ page import="java.util.Map" %>
47 <%@ page import="java.util.Set" %>
48 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.Reports"%>
49 <%      
50     ReportDefinition rdef = (ReportDefinition) request.getAttribute(AppConstants.SI_REPORT_DEFINITION);
51     WizardSequence ws = rdef.getWizardSequence();
52     String curSubStep = ws.getCurrentSubStep();
53         String reportID   = rdef.getReportID();
54         String dbInfo = null;
55         dbInfo = rdef.getDBInfo();
56         HashMap hashMap = ReportLoader.loadReportsToAddInDashboard(request);
57         Set mapSet = hashMap.entrySet();
58         Map.Entry me;
59         
60         HashMap pdfImgMap = ReportLoader.loadPDFImgLookUp();
61 %>
62 <% /*boolean displayAdditionalFields = AppUtils.getRequestNvlValue(request, "showAdditionalFields").equals("Y")||
63                                                                                 AppUtils.getRequestNvlValue(request, "additionalFieldsShown").equals("Y")||
64                                                                                 rdef.isRuntimeColSortDisabled()||
65                                                                                 rdef.isDisplayOptionHideForm()||
66                                                                                 rdef.isDisplayOptionHideChart()||
67                                                                                 rdef.isDisplayOptionHideData()||
68                                                                                 rdef.isDisplayOptionHideBtns()||
69                                                                                 (rdef.getNumFormColsAsInt()>1)||
70                                                                                 (nvl(rdef.getReportTitle()).length()>0)||
71                                                                                 (nvl(rdef.getReportSubTitle()).length()>0)||
72                                                                                 (nvl(rdef.getReportHeader()).length()>0)||
73                                                                                 (nvl(rdef.getReportFooter()).length()>0); */%>
74                                                                                 
75                                                                                 
76 <% 
77    boolean displayDashboard =  false;
78    /*displayDashboard =         AppUtils.getRequestNvlValue(request, "showDashboardOptions").equals("Y")||
79                                                 AppUtils.getRequestNvlValue(request, "dashboardOptionsShown").equals("Y")||
80                                                 rdef.isDashboardOptionHideBtns()||
81                                                 rdef.isDashboardOptionHideChart()||
82                                                 rdef.isDashboardOptionHideData();
83    */
84    //displayDashboard =         AppUtils.getRequestNvlValue(request, "showDashboardOptions").equals("Y");
85    boolean dashboard = rdef.isDashboardType();
86    //if(AppUtils.getRequestNvlValue(request, "showDashboardOptions").length()>0) dashboard=displayDashboard;
87 %>      
88 <script language="JavaScript" src="<%= AppUtils.getBaseFolderURL() %>js/script.js"></script>
89 <script language="JavaScript" src="<%= AppUtils.getBaseFolderURL() %>js/raptor.js"></script>
90 <script language="JavaScript" src="<%= AppUtils.getBaseFolderURL() %>js/editabledropdown.js"></script>
91
92 <script type="text/javascript" language="JavaScript">
93 <!-- Copyright 2006,2007 Bontrager Connection, LLC
94 // http://bontragerconnection.com/ and http://willmaster.com/
95 // Version: July 28, 2007
96 var cX = 0; var cY = 0; var rX = 0; var rY = 0;
97 function UpdateCursorPosition(e){ cX = e.pageX; cY = e.pageY;}
98 function UpdateCursorPositionDocAll(e){ cX = event.clientX; cY = event.clientY;}
99 if(document.all) { document.onmousemove = UpdateCursorPositionDocAll; }
100 else { document.onmousemove = UpdateCursorPosition; }
101 function AssignPosition(d) {
102 if(self.pageYOffset) {
103         rX = self.pageXOffset;
104         rY = self.pageYOffset;
105         }
106 else if(document.documentElement && document.documentElement.scrollTop) {
107         rX = document.documentElement.scrollLeft;
108         rY = document.documentElement.scrollTop;
109         }
110 else if(document.body) {
111         rX = document.body.scrollLeft;
112         rY = document.body.scrollTop;
113         }
114 if(document.all) {
115         cX += rX; 
116         cY += rY;
117         }
118 d.style.left = (cX+10) + "px";
119 d.style.top = (cY+10) + "px";
120 }
121 function HideContent(d) {
122 if(d.length < 1) { return; }
123 document.getElementById(d).style.display = "none";
124 }
125 function HideAllContent() {
126         var uniquearrays = new Array();
127         uniquearrays[0] = "uniquename1";
128         uniquearrays[1] = "uniquename2";
129         uniquearrays[2] = "uniquename3";
130         uniquearrays[3] = "uniquename4";
131
132         for (i=0;i<uniquearrays.length;i++)     {
133             document.getElementById(uniquearrays[i]).style.display = "none";
134         }
135 }
136 function ShowContent(d) {
137         var uniquearrays = new Array();
138         uniquearrays[0] = "uniquename1";
139         uniquearrays[1] = "uniquename2";
140         uniquearrays[2] = "uniquename3";
141         uniquearrays[3] = "uniquename4";
142         
143         for (i=0;i<uniquearrays.length;i++)     {
144              //if(uniquearrays[i]==d) {
145               document.getElementById(uniquearrays[i]).style.display = "none";
146              //}
147         }
148 if(d.length < 1) { return; }
149 var dd = document.getElementById(d);
150 AssignPosition(dd);
151 dd.style.display = "block";
152 }
153 function ShowContentWAssign(d) {
154 if(d.length < 1) { return; }
155 var dd = document.getElementById(d);
156 dd.style.display = "block";
157 }
158 function ReverseContentDisplay(d) {
159 if(d.length < 1) { return; }
160 var dd = document.getElementById(d);
161 AssignPosition(dd);
162 if(dd.style.display == "none") { dd.style.display = "block"; }
163 else { dd.style.display = "none"; }
164 }
165 //var popupwin ;
166 function showPreview(src)
167 {
168         try{
169                 
170                 //if(popupwin != null){popupwin.focus();popupwin.close();}
171                 /*
172             var ww = 300, hh = 300;
173                 var LeftPosition = (screen.width) ? (screen.width-ww)/2 : 0;
174                 var TopPosition = (screen.height) ? (screen.height-hh)/2 : 0;
175                 var popupwin = window.open ('about:blank',"fusionPopupWindow","menubar=0,resizable=0,height="+hh+",width="+ww+",top="+TopPosition+",left="+LeftPosition+",scrollbars=yes");
176         
177                 
178                 popupwin.document.write('<html><body align=center>');
179                 popupwin.document.write('<style>table{border-width:thin; border-color:black}');
180                 popupwin.document.write('</style>');
181                 
182                 popupwin.document.write($('dashboardPreview').value);
183                 popupwin.document.write('</body></html>');
184                 
185                 popupwin.document.title = 'Preview';
186                 popupwin.focus();
187                 */
188
189                 if($('PreviewButton').value == 'Preview')
190                 {
191                 $('tempHidden').innerHTML = $('editingArea').innerHTML;
192
193                 $('editingArea').innerHTML = $('dashboardPreview').value;
194
195                 $('PreviewButton').value = 'Edit';
196                 }else if($('PreviewButton').value == 'Edit')
197                 {
198                         $('editingArea').innerHTML = $('tempHidden').innerHTML;
199                         $('PreviewButton').value = 'Preview';
200
201                 }
202         }catch(e){alert(e.message);}
203     return false;
204
205 }
206
207 function insertAtCursor(myField, myValue) {
208           //IE support
209           if (document.selection) {
210             myField.focus();
211             sel = document.selection.createRange();
212             sel.text = myValue;
213           }
214           //MOZILLA/NETSCAPE support
215           else if (myField.selectionStart || myField.selectionStart == '0') {
216             var startPos = myField.selectionStart;
217             var endPos = myField.selectionEnd;
218             myField.value = myField.value.substring(0, startPos)
219                           + myValue
220                           + myField.value.substring(endPos, myField.value.length);
221           } else {
222             myField.value += myValue;
223           }
224         }
225
226
227 function udpateTemplate(val)
228 {
229         $('dashboardPreview').value = layoutTemplates[val];
230 }
231 function addType(type)
232 {
233         try{
234
235         //alert($('dashboardTemplateReports').selectedIndex);
236         
237         if($('dashboardTemplateReports').selectedIndex == 0){ return; }
238
239         insertAtCursor($('dashboardPreview'),'['+type+'#'+$('dashboardTemplateReports').value+']');
240                 
241         }catch(e){alert(e.message);}
242         return false;
243 }
244 var layoutTemplates = {
245                 "empty": " ",
246                 "2x2": "<table border=1 width='100%' height='100%'><tr><td>[Report]</td><td>[Report]</td></tr><tr><td>[Report]</td><td>[Report]</td></tr></table>",
247                 "2x1": "<table border=1 width='100%' height='100%'><tr><td>[Report]</td></tr><tr><td>[Report]</td></tr></table>",
248                 "1x2": "<table border=1 width='100%' height='100%'><tr><td>[Report]</td><td>[Report]</td></tr></table>",
249                 "3x1": "<table border=1  width='100%' height='100%'><tr><td>[Report]</td></tr><tr><td>[Report]</td></tr><tr><td>[Report]</td></tr></table>",
250                 "custom1": "<table border=1  width='100%' height='100%'><tr><td colspan='2'>[Report]</td></tr><tr><td>[Report]</td><td>[Report]</td></tr></table>",
251                 "custom2": "<table border=1  width='100%' height='100%'><tr rowspan='2'><td>[Report]</td></tr><tr><td>[Report]</td><td>[Report]</td></tr></table>",
252                 "custom3": "<table border=1  width='100%' height='100%'><tr><td>[Report]</td></tr><tr><td>[Report]</td></tr></table>"
253 }
254 //-->
255 </script>
256 <script type="text/javascript">
257         function show(object,val) {
258                 document.getElementById(object).style.visibility = val;
259         }
260 </script>
261 <table width="100%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
262         <tr>
263                 <td class=rbg1 colspan=2 valign="Middle"><b class=rtableheader>Step <%= ws.getCurrentStepIndex() %> of <%= ws.getStepCount() %> - Report <%= ws.getCurrentStep() %></b></td>
264         </tr>
265         <% if(nvl(rdef.getReportID()).length()>0 && (! rdef.getReportID().equals("-1"))) { %>
266         <tr>
267                 <td class=rbg2 height="30" align="right" width="35%">
268                         <font class=rtabletext>Report ID: </font>
269                 </td> 
270                 <td align="left" width="65%" class=rbg3>
271                         <font class=rtabletext><%= rdef.getReportID() %></font>
272                 </td>
273         </tr> 
274                 <% } %>
275         <tr>
276                 <td class=rbg2 height="30" align="right" width="35%" style="background-image:url(<%= AppUtils.getImgFolderURL() %>required.gif); background-position:top right; background-repeat:no-repeat;">
277                         <font class=rtabletext>Report Name: </font>
278                 </td> 
279                 <td align="left" width="65%" class=rbg3>
280                         <input type="text" class="rtabletext" size="40" style="width: 200px;" maxlength="100" id="reportName" name="reportName" value="<%= (nvl(AppUtils.getRequestNvlValue(request, "reportName")).length() > 0)? 
281                         (!(AppUtils.getRequestNvlValue(request, "reportName").equals(rdef.getReportName()))?
282                             AppUtils.getRequestNvlValue(request, "reportName"):rdef.getReportName()):
283                                  rdef.getReportName() %>">
284                 </td>
285         </tr> 
286         <input type="hidden" name="folder_id" 
287                            value="<%= (nvl(AppUtils.getRequestNvlValue(request, "folder_id")).length() > 0)? 
288                                              (!(AppUtils.getRequestNvlValue(request, "folder_id").equals(rdef.getFolderId()))?
289                                                           AppUtils.getRequestNvlValue(request, "folder_id"):rdef.getFolderId()):
290                                                                   rdef.getFolderId() %>">
291         <tr>
292                 <td class=rbg2 height="30" align="right">
293                         <font class=rtabletext>Report Description: </font>
294                 </td> 
295                 <td class=rbg3 align="left">
296                         <textarea name="reportDescr" class="rtabletext" style="width: 200px;" cols="40" rows="3"><%= (nvl(AppUtils.getRequestNvlValue(request, "reportDescr")).length() > 0)? 
297                                              (!(AppUtils.getRequestNvlValue(request, "reportDescr").equals(rdef.getReportDescr()))?
298                                                           AppUtils.getRequestNvlValue(request, "reportDescr"):rdef.getReportDescr()):
299                                                               rdef.getReportDescr() %></textarea>
300                 </td>
301         </tr>
302         
303         <tr>
304                 <td class=rbg2 height="30" align="right">
305                         <font class=rtabletext>Report Type </font>
306                 </td> 
307                 <td class=rbg3 align="left">
308                 <% if(nvl(rdef.getReportType()).length()>0) { %>
309                         <font class=rtabletext><%= rdef.getReportType().equals(AppConstants.RT_LINEAR)?"Linear":(rdef.getReportType().equals(AppConstants.RT_CROSSTAB)?"Cross-tab":(rdef.getReportType().equals(AppConstants.RT_DASHBOARD)?"Dashboard":rdef.getReportType())) %></font>
310                         <input type="hidden" id="reportType"  name="reportType" value="<%= rdef.getReportType() %>">
311                 <% } else { %>
312                         <select id="reportType"  name="reportType" style="width: 200px;" onChange="document.forma.<%= AppConstants.RI_GO_TO_STEP %>.value='<%= rdef.getWizardSequence().getCurrentStep() %>'; document.forma.submit();">
313                             <option value="-1"> Select Type </option>
314                                 <option value="<%= AppConstants.RT_LINEAR %>" <%= AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_LINEAR) ? " selected":"selected" %>> Linear </option>
315 <!--                            <option value="<%= AppConstants.RT_CROSSTAB %>"<%= AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_CROSSTAB) ? " selected":"" %>> Cross-tab </option>
316                                 <option value="<%= AppConstants.RT_DASHBOARD %>"<%= AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_DASHBOARD) ? " selected":"" %>> Dashboard </option>
317                                 <option value="<%= AppConstants.RT_HIVE %>"<%= AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_HIVE) ? " selected":"" %>> Hive Based Report </option>                         
318  -->                                                            
319                         </select>
320                 <% } %>
321                 </td>
322         </tr>
323         <% if((AppUtils.getRequestNvlValue(request, "reportType").length() > 0) || (rdef.getReportType().length() > 0)) { %>
324         <!-- Dashboard Begin -->
325     <% if (AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_DASHBOARD) || rdef.getReportType().equals(AppConstants.RT_DASHBOARD))  { %>
326         <tr>
327                 <td class=rbg2 height="30" align="right"><font class=rtabletext>Select HTML Template:</font></td>
328                 <td><select id="dashboardTemplate" style="width: 200px;" name="dashboardTemplate" onchange="return udpateTemplate(this.value);">
329                         <option value="empty">-- select --</option>
330                         <option value="2x2">2 Rows x 2 Columns</option>
331                         <option value="2x1">2 Rows x 1 Column</option>
332                         <option value="1x2">1 Row x 2 Columns</option>
333                         <option value="3x1">3 Rows x 1 Column</option>
334                         <option value="custom1">2 Rows with 1st Row with 1 column and 2nd Row with 2 Columns</option>
335                         <option value="custom2">2 Rows with 1st Column expanded to 2 rows</option>
336                         <option value="custom3">Hybrid Layout</option>
337                 </select></td>
338         </tr>       
339        <tr>
340                 <td class=rbg2 height="30" align="right"><font class=rtabletext>Dashboard HTML:</font></td>
341
342                 <td>
343                 <div id='editingArea' style="width: 600px; height: 200px; overflow: none">
344                 <textarea id='dashboardPreview' name="dashboardLayoutHTML" style="width: 200px; height: 100%">
345                  <% if(rdef != null && nvl(rdef.getDashboardLayoutHTML()).length()>0 ) {%><%= rdef.getDashboardLayoutHTML().trim() %><%} %>
346                  </textarea></div>
347                 <div id='tempHidden' style="display: none;"></div>
348                 <br/><select name="dashboardTemplateReports">
349                         <option value="-1" selected>-->select report <--</option>
350                         <%
351                                 for (Iterator iter = mapSet.iterator(); iter.hasNext();) {
352                                                         me = (Map.Entry) iter.next();
353                         %>
354                         <%
355                                 if (rdef != null && rdef.getDashBoardReports() != null && (rdef.getDashBoardReports().getReportsList().get(0) != null)
356                                                                         && (((Reports) rdef.getDashBoardReports().getReportsList().get(0)).getReportId().equals((String) me.getKey()))) {
357                         %>
358                         <option value="<%=(String) me.getKey()%>" selected><%=(String) me.getValue()%></option>
359                         <%
360                                 } else {
361                         %>
362                         <option value="<%=(String) me.getKey()%>"><%=(String) me.getValue()%></option>
363                         <%
364                                 }
365                         %>
366                         <%
367                                 }
368                         %>
369                 </select>
370                 &nbsp;<input type="button" class='button' onclick="return addType();" value='Insert Report Id' />
371                 &nbsp;<input id='PreviewButton' style="width: 100px" type='button' class='button' value="Preview" onclick="return showPreview(this);" />
372                 <br />
373                 </td>
374         </tr>
375     
376            
377            <!-- Dashboard Ends -->
378   <% } else {  %>                 
379
380         
381                 <tr>
382                 <td class=rbg2 height="30" align="right">
383                         <font class=rtabletext>Data Source:</font>
384                 </td> 
385                 <td align="left" class=rbg3>
386                   <% 
387                          org.openecomp.portalsdk.analytics.util.RemDbInfo remDbInfo = new org.openecomp.portalsdk.analytics.util.RemDbInfo();
388                          HashMap remDbMap = remDbInfo.getDbHash();
389                   
390                   %>
391                   <% if (dbInfo != null && dbInfo.length()>0 && !dbInfo.equalsIgnoreCase("null") && !remDbMap.isEmpty()) { %>
392                                  <font class=rtabletext><%= (AppUtils.nvl(remDbInfo.getDesc(dbInfo)).length()>0)?remDbInfo.getDesc(dbInfo):" No Desc " %></font>
393           <%
394                   }
395                   else { 
396                   %>
397                   <%-- dbInfo.equals(AppConstants.DB_PROD)? "selected":""  --%>
398                   <select id = "selectDS" name="dataSource" style="width: 200px;">
399                   <%
400                         if(!remDbMap.isEmpty()) {
401                                 for( Iterator itr=remDbMap.entrySet().iterator(); itr.hasNext(); ) {
402                                         Map.Entry e = (Map.Entry)itr.next();
403                                         String prefix = (String)e.getKey();
404                                         String desc = (String)e.getValue();
405            %>
406                                     <option value='<%= prefix %>' 
407                                      <% if(prefix.equals(nvl(AppUtils.getRequestNvlValue(request, "dataSource")))) { %>
408                                       <%=(nvl(AppUtils.getRequestNvlValue(request, "dataSource")).length()>0?
409                                                   (
410                                                    prefix.equals(nvl(AppUtils.getRequestNvlValue(request, "dataSource")))?"selected ":
411                                                                 (prefix.equals(AppConstants.DB_LOCAL)?"selected ":"")
412                                                    )
413                                                         :prefix.equals(AppConstants.DB_LOCAL)?"selected ":"")%>
414                                     <% } %>             
415                                         ><%= desc%>
416                    <%
417                                 }
418                         
419                   %>
420            <% } else { %>
421                        <option value='<%= AppConstants.DB_LOCAL%>' selected>Default
422                    <% } %>
423                    
424                         </select>
425                    <% if(!remDbMap.isEmpty() && nvl(AppUtils.getRequestNvlValue(request, "dataSource")).length() <= 0){ %>
426                          <script language="Javascript">
427                            var selectDS = document.getElementById("selectDS");
428                            var flag = 0;
429                            for (i = selectDS.length - 1; i>=0; i--) {
430                      if (selectDS.options[i].selected) {
431                         flag = 2;
432                         break;
433                      }
434                    }
435                    if(flag==2) {
436                     for (i = selectDS.length - 1; i>=0; i--) {
437                       if(selectDS.options[i].value == '<%= AppConstants.DB_LOCAL%>' ){
438                         selectDS.options[i].selected = true;
439                       }
440                     } 
441                    }
442                          </script>
443                        
444                    <% } %>
445                         
446        <% } %>
447                 </td>
448         </tr> 
449         <tr>
450                 <td class=rbg2 height="30" align="right">
451                         <font class=rtabletext>Form Help Text: </font>
452                 </td> 
453                 <td class=rbg3 align="left">
454                         <textarea name="formHelp" style="width: 200px;" cols="40" rows="3"><%=rdef.getFormHelpText()%></textarea>
455                 </td>
456         </tr>
457
458         <% if(Globals.getAllowSQLBasedReports()||AppUtils.isAdminUser(request)) { %>
459         <tr>
460                 <td class=rbg2 height="30" align="right">
461                         <font class=rtabletext>Report Definition: </font>
462                 </td> 
463                 <td class=rbg3 align="left">
464                         <font class=rtabletext>
465                         <% if(rdef.getReportDefType().length()>0) { %>
466                                 <%= rdef.getReportDefType().equals(AppConstants.RD_VISUAL)?"Visual":(rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED)?"SQL-based":rdef.getReportDefType()) %>
467                         <% } else { %>
468                                 <!-- <input type=radio name="reportDefType" value="<%= AppConstants.RD_VISUAL %>" <%= AppUtils.getRequestNvlValue(request, "reportDefType").equals(AppConstants.RD_VISUAL)?" checked": ((AppUtils.getRequestNvlValue(request, "reportDefType").length()<=0)?" checked":"") %>>Visual -->
469                                 <input type=radio name="reportDefType" checked value="<%= AppConstants.RD_SQL_BASED %>" <%= AppUtils.getRequestNvlValue(request, "reportDefType").equals(AppConstants.RD_SQL_BASED) ? " checked":"" %>>SQL-based
470                                 <!-- <input type=radio name="reportDefType" value="<%= AppConstants.RD_SQL_BASED_DATAMIN %>" <%= AppUtils.getRequestNvlValue(request, "reportDefType").equals(AppConstants.RD_SQL_BASED_DATAMIN) ? " checked":"" %>>Data Forecasting -->
471                         <% } %>
472                         </font>
473                 </td>
474         </tr>
475         <% }    // if 
476         %>
477         <tr>
478                 <td class=rbg2 height="30" align="right">
479                         <font class=rtabletext>Page Size: </font>
480                 </td> 
481                 <td class=rbg3 align="left">
482                         <select name="pageSize" style="width: 200px;" onKeyDown="fnKeyDownHandler(this, event);" onKeyUp="fnKeyUpHandler_A(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A(this, event);"  onChange="fnChangeHandler_A(this, event);">
483                                 <option value="" style="COLOR:#ff0000;BACKGROUND-COLOR:#ffff00;">Custom</option> <!-- This is the Editable Option -->
484                                 <option value="10"<%=  (rdef.getPageSize()==10 )?" selected":"" %>>10
485                                 <option value="25"<%=  (rdef.getPageSize()==25 )?" selected":"" %>>25
486                                 <option value="50"<%=  (rdef.getPageSize()==50 )?" selected":"" %>>50
487                                 <option value="100"<%= (rdef.getPageSize()==100)?" selected":"" %>>100
488                                 <option value="500"<%= (rdef.getPageSize()==500)?" selected":"" %>>500
489                                 <% if(rdef.getPageSize()!=10 && rdef.getPageSize()!=20 && rdef.getPageSize()!=50
490                                      && rdef.getPageSize()!=100 && rdef.getPageSize()!=500) {
491                                 %>
492                                 <option value="<%=rdef.getPageSize()%>" selected><%=rdef.getPageSize()%></option> <!-- This is the Editable Option -->
493                 <%                              
494                                          } 
495                 %>                                              
496                         </select>
497                 </td>
498         </tr>
499         <tr>
500                 <td class=rbg2 height="30" align="right">
501                         <font class=rtabletext>Display Area: </font>
502                 </td> 
503                 <td class=rbg3 align="left" valign="top" nowrap>
504                         <select name="menuID" size="3" multiple style="width: 100px;">
505                         <!--  need one more blank to deselect since approval checkbox is taken out -->
506                         <option value="">
507                         <% for(int i=0; i<AppUtils.getQuickLinksMenuIDs().size(); i++) {
508                                         String qMenu = (String) AppUtils.getQuickLinksMenuIDs().get(i); %>
509                                 <option value="<%= qMenu %>"<%= rdef.checkMenuIDSelected(qMenu)?" selected":"" %>><%= AppUtils.getMenuLabel(qMenu) %>
510                         <% }    // for 
511                         %>
512                         </select>
513 <%--                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
514                         <input type="checkbox" name="menuApproved" value="Y"<%= rdef.isMenuApproved()?" checked":"" %><%= AppUtils.isAdminUser(request)?"":" disabled onClick='checked="+(rdef.isMenuApproved()?"true":"false")+"';" %>>
515                         <font class=rtabletext>Approved?</font> --%>
516                 </td>
517         </tr>
518 <%--    <tr>
519                 <td class=rbg2 height="30" align="right">
520                         <font class=rtabletext>Generate report in a New Window?</font>
521                 </td> 
522                 <td class=rbg3 align="left" nowrap>
523                         <input type="checkbox" name="reportInNewWindow" value="Y" 
524                         <%= rdef.isReportInNewWindow()? " checked " : "" %>>    
525                 </td>
526         </tr> --%>
527
528         <tr>
529                 <td class=rbg2 height="30" align="right">
530                         <font class=rtabletext>Hide Form fields after run?</font>
531                 </td> 
532                 <td class=rbg3 align="left" nowrap>
533                         <input type="checkbox" name="hideFormFieldsAfterRun" value="Y" 
534                         <%= rdef.isHideFormFieldAfterRun()? " checked " : "" %>>        
535                 </td>
536         </tr>
537
538 <%--    <tr>
539                 <td class=rbg2 height="30" align="right">
540                         <font class=rtabletext>Display Folder Tree?</font>
541                 </td> 
542                 <td class=rbg3 align="left" nowrap>
543                         <input type="checkbox" name="displayFolderTree" value="Y" 
544             <%= rdef.isDisplayFolderTree()? " checked " : "" %>                 
545                         > 
546                 </td>
547         </tr> --%>
548
549         <tr>
550                 <td class=rbg2 height="30" align="right">
551                         <font class=rtabletext> Max Rows in Excel/CSV Download  </font>
552                 </td> 
553                 <td class=rbg3 align="left">
554                         <select name="excelDownloadSize" style="width: 80px;">
555                             <option value="500"<%=  (rdef.getMaxRowsInExcelDownload()==500 )?" selected":"" %>>500
556                                 <option value="1000"<%=  (rdef.getMaxRowsInExcelDownload()==1000 )?" selected":"" %>>1000
557                                 <option value="2000"<%=  (rdef.getMaxRowsInExcelDownload()==2000 )?" selected":"" %>>2000
558                                 <option value="3000"<%=  (rdef.getMaxRowsInExcelDownload()==3000 )?" selected":"" %>>3000
559                                 <option value="4000"<%=  (rdef.getMaxRowsInExcelDownload()==4000 )?" selected":"" %>>4000
560                                 <option value="5000"<%=  (rdef.getMaxRowsInExcelDownload()==5000 )?" selected":"" %>>5000
561                                 <option value="10000"<%=  (rdef.getMaxRowsInExcelDownload()==10000 )?" selected":"" %>>10000
562                                 <option value="15000"<%=  (rdef.getMaxRowsInExcelDownload()==15000 )?" selected":"" %>>15000
563                                 <option value="20000"<%=  (rdef.getMaxRowsInExcelDownload()==20000 )?" selected":"" %>>20000
564                                 <option value="25000"<%=  (rdef.getMaxRowsInExcelDownload()==25000 )?" selected":"" %>>25000
565                                 <option value="30000"<%=  (rdef.getMaxRowsInExcelDownload()==30000 )?" selected":"" %>>30000
566                                 <option value="35000"<%=  (rdef.getMaxRowsInExcelDownload()==35000 )?" selected":"" %>>35000
567                                 <option value="40000"<%=  (rdef.getMaxRowsInExcelDownload()==40000)?" selected":"" %>>40000
568                                 <option value="45000"<%=  (rdef.getMaxRowsInExcelDownload()==45000 )?" selected":"" %>>45000
569                                 <option value="50000"<%=  (rdef.getMaxRowsInExcelDownload()==50000)?" selected":"" %>>50000
570                                 <option value="65000"<%=  (rdef.getMaxRowsInExcelDownload()==65000)?" selected":"" %>>65000
571                         </select>
572                 </td>
573         </tr>
574         
575         <tr>
576                 <td class=rbg2 height="30" align="right">
577                         <font class=rtabletext>Columns to be Frozen: </font>
578                 </td> 
579                 <td class=rbg3 align="left">
580                         <select name="frozenColumns" style="width: 50px;" onKeyDown="fnKeyDownHandler(this, event);" onKeyUp="fnKeyUpHandler_A(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A(this, event);"  onChange="fnChangeHandler_A(this, event);">
581                                 <option value="" style="COLOR:#ff0000;BACKGROUND-COLOR:#ffff00;">Custom</option> <!-- This is the Editable Option -->
582                                 <option value="0"<%=  (rdef.getFrozenColumns()==0 )?" selected":"" %>>0
583                                 <option value="1"<%=  (rdef.getFrozenColumns()==1 )?" selected":"" %>>1
584                                 <option value="2"<%=  (rdef.getFrozenColumns()==2 )?" selected":"" %>>2
585                                 <option value="3"<%= (rdef.getFrozenColumns()==3)?" selected":"" %>>3
586                                 <option value="4"<%= (rdef.getFrozenColumns()==4)?" selected":"" %>>4
587                                 <% if(rdef.getFrozenColumns()!=0 && rdef.getFrozenColumns()!=1 && rdef.getFrozenColumns()!=2
588                                      && rdef.getFrozenColumns()!=3 && rdef.getFrozenColumns()!=4) {
589                                 %>
590                                 <option value="<%=rdef.getFrozenColumns()%>" selected><%=rdef.getFrozenColumns()%></option> <!-- This is the Editable Option -->
591                 <%                              
592                                          } 
593                 %>                                              
594                         </select>
595                 </td>
596         </tr>
597         
598         <% if(rdef.getReportType().equals(AppConstants.RT_CROSSTAB)) { %>
599         
600                                 <tr>
601                                         <td class=rbg2 height="30" align="right">
602                                                 <font class=rtabletext>Record # column width: </font>
603                                         </td> 
604                                         <td class=rbg3 align="left">
605                                                 <input type="text" class="rtabletext" style="width: 100px;" size="40" maxlength="100" id="widthNo" name="widthNo" value="<%= (nvl(AppUtils.getRequestNvlValue(request, "widthNo")).length() > 0)? 
606                         (!(AppUtils.getRequestNvlValue(request, "widthNo").equals(rdef.getWidthNoColumn()))?
607                             AppUtils.getRequestNvlValue(request, "widthNo"):rdef.getWidthNoColumn()):
608                                 rdef.getWidthNoColumn() %>">
609                                         </td>
610                                 </tr>
611                                 
612                 
613         
614         <% } %>
615         
616         
617                                 <tr>
618                                         <td class=rbg2 height="30" align="right">
619                                                 <font class=rtabletext>Data Grid Align: </font>
620                                         </td> 
621                                         <td class=rbg3 align="left">
622                                                 <select name="dataGridAlign" style="width: 100px;">
623                                                         <option value="left"<%=  (nvl(rdef.getDataGridAlign()).length()>0 ? (rdef.getDataGridAlign().equals("left")  ? " selected": ""):" selected ")%>> Left
624                                                         <option value="right"<%=  (nvl(rdef.getDataGridAlign()).length()>0 ? (rdef.getDataGridAlign().equals("right")  ? " selected": ""):"")%>> Right
625                                                         <option value="center"<%=  (nvl(rdef.getDataGridAlign()).length()>0 ? (rdef.getDataGridAlign().equals("center")  ? " selected": ""):"")%>> Center
626                                                 
627                                                 </select>
628                                         </td>
629                                 </tr>
630
631         <% 
632           if(pdfImgMap.size() > 0) {
633         %>
634         
635                   <%-- dbInfo.equals(AppConstants.DB_PROD)? "selected":""  --%>
636                   <tr> 
637                         <td class=rbg2 height="30" align="right">
638                                 <font class=rtabletext>Select logo for PDF download: </font>
639                         </td> 
640                         <td>              
641                   <select id = "pdfImg" name="pdfImg" style="width: 100px;">
642                     <option value=''> <!-- SELECT --></option>
643                   <%
644                         if(!pdfImgMap.isEmpty()) {
645                                 for( Iterator itr=pdfImgMap.entrySet().iterator(); itr.hasNext(); ) {
646                                         Map.Entry e = (Map.Entry)itr.next();
647                                         String image_id = (String)e.getKey();
648                                         String image_loc = (String)e.getValue();
649            %>
650            <%
651                         if (nvl(AppUtils.getRequestNvlValue(request, "pdfImg")).length()>0 && !(AppUtils.getRequestNvlValue(request, "pdfImg").equals(rdef.getPdfImg())) ) {
652                                 if(image_loc .equals (AppUtils.getRequestNvlValue(request, "pdfImg"))) {
653                         %>
654                         
655                         <option value='<%= image_loc %>' selected> <%=image_id %></option>
656                         <%      
657                                 } else {
658             %>                                  
659                                         <option value='<%= image_loc %>'> <%=image_id %></option>
660                         <%              
661                         } 
662                         } else {
663                                 if(image_loc .equals (rdef.getPdfImg())) {
664                                 %>
665                                 
666                                 <option value='<%= image_loc %>' selected> <%=image_id %> </option>
667                                 <%      
668                                 
669                             } else {
670                             %>                                  
671                                         <option value='<%= image_loc %>'> <%=image_id %></option>
672                         <%              
673                             }
674                         }
675            %>
676            </select>
677            </td>
678                    <% }
679                      }
680                    %>
681                   </tr>
682                  <% 
683                 }
684 %>
685  
686         <tr>
687                 <td class=rbg2 height="30" align="right" width="35%">
688                         <font class=rtabletext>Empty message: </font>
689                 </td> 
690                 <td align="left" width="65%" class=rbg3>
691                         <input type="text" class="rtabletext" style="width: 200px;" size="40" maxlength="100" id="emptyMessage" name="emptyMessage" value="<%= (nvl(AppUtils.getRequestNvlValue(request, "emptyMessage")).length() > 0)? 
692                         (!(AppUtils.getRequestNvlValue(request, "emptyMessage").equals(rdef.getEmptyMessage()))?
693                             AppUtils.getRequestNvlValue(request, "emptyMessage"):rdef.getEmptyMessage()):
694                                  rdef.getEmptyMessage() %>">
695                 </td>
696         </tr> 
697  
698  <% } %>
699         <tr>
700                 <td class=rbg2 height="30" align="right">
701                         <font class=rtabletext> Height of the Data Container  </font>
702                 </td> 
703                 <td class=rbg3 align="left">
704                     <% if (nvl(rdef.getDataContainerHeight(), "100").equals ("auto") || nvl(rdef.getDataContainerHeight(), "100").equals ("100")) { rdef.setDataContainerHeight("100"); } %> 
705                         <select name="heightContainer" style="width: 70px;" onKeyDown="fnKeyDownHandler(this, event);" onKeyUp="fnKeyUpHandler_A(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A(this, event);"  onChange="fnChangeHandler_A(this, event);">
706                                 <option value="" style="COLOR:#ff0000;BACKGROUND-COLOR:#ffff00;">Custom</option> <!-- This is the Editable Option -->
707                                 <option value="200" <%=  (nvl(rdef.getDataContainerHeight(),"200").equals("200"))?" selected":"" %>>200%</option> 
708                                 <option value="190" <%=  (nvl(rdef.getDataContainerHeight(),"190").equals("190"))?" selected":"" %>>190%</option> 
709                                 <option value="180" <%=  (nvl(rdef.getDataContainerHeight(),"180").equals("180"))?" selected":"" %>>180%</option> 
710                                 <option value="170" <%=  (nvl(rdef.getDataContainerHeight(),"170").equals("170"))?" selected":"" %>>170%</option> 
711                                 <option value="160" <%=  (nvl(rdef.getDataContainerHeight(),"160").equals("160"))?" selected":"" %>>160%</option> 
712                                 <option value="150" <%=  (nvl(rdef.getDataContainerHeight(),"150").equals("150"))?" selected":"" %>>150%</option> 
713                                 <option value="140" <%=  (nvl(rdef.getDataContainerHeight(),"140").equals("140"))?" selected":"" %>>140%</option> 
714                                 <option value="130" <%=  (nvl(rdef.getDataContainerHeight(),"130").equals("130"))?" selected":"" %>>130%</option> 
715                                 <option value="120" <%=  (nvl(rdef.getDataContainerHeight(),"120").equals("120"))?" selected":"" %>>120%</option> 
716                                 <option value="110" <%=  (nvl(rdef.getDataContainerHeight(),"110").equals("110"))?" selected":"" %>>110%</option> 
717                                 <option value="100" <%=  (nvl(rdef.getDataContainerHeight(),"100").equals("100"))?" selected":"" %>>100%</option> 
718                                 <option value="90" <%=  (nvl(rdef.getDataContainerHeight(),"90").equals("90"))?" selected":"" %>>90%</option> 
719                                 <option value="80" <%=  (nvl(rdef.getDataContainerHeight(),"80").equals("80"))?" selected":"" %>>80%</option> 
720                                 <option value="70" <%=  (nvl(rdef.getDataContainerHeight(),"70").equals("70"))?" selected":"" %>>70%</option> 
721                                 <option value="60" <%=  (nvl(rdef.getDataContainerHeight(),"60").equals("60"))?" selected":"" %>>60%</option> 
722                                 <option value="50" <%=  (nvl(rdef.getDataContainerHeight(),"50").equals("50"))?" selected":"" %>>50%</option> 
723                                 <option value="40" <%=  (nvl(rdef.getDataContainerHeight(),"40").equals("40"))?" selected":"" %>>40%</option> 
724                                 <option value="30" <%=  (nvl(rdef.getDataContainerHeight(),"30").equals("30"))?" selected":"" %>>30%</option> 
725                                 <option value="20" <%=  (nvl(rdef.getDataContainerHeight(),"20").equals("20"))?" selected":"" %>>20%</option> 
726                                 <option value="10" <%=  (nvl(rdef.getDataContainerHeight(),"10").equals("10"))?" selected":"" %>>10%</option>
727                                 
728                                  
729                                 <% if(!((new Integer(nvl(rdef.getDataContainerHeight(), "100")).intValue()%10 == 0) && (new Integer(nvl(rdef.getDataContainerHeight(), "100")).intValue() <= 200)) ) {
730                                 %>
731                                 <option value="<%=rdef.getDataContainerHeight()%>" selected><%=rdef.getDataContainerHeight()%>%</option> 
732                 <%                              
733                                          } 
734                 %>                                              
735                 </td>
736         </tr>   
737
738         <tr>
739                 <td class=rbg2 height="30" align="right">
740                         <font class=rtabletext> Width of the Data Container  </font>
741                 </td> 
742                 <td class=rbg3 align="left">
743                     <% if (nvl(rdef.getDataContainerWidth(), "100").equals ("auto") || nvl(rdef.getDataContainerWidth(), "100").equals ("100")) { rdef.setDataContainerWidth("100"); } %> 
744                         <select name="widthContainer" style="width: 70px;" onKeyDown="fnKeyDownHandler(this, event);" onKeyUp="fnKeyUpHandler_A(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A(this, event);"  onChange="fnChangeHandler_A(this, event);">
745                                 <option value="" style="COLOR:#ff0000;BACKGROUND-COLOR:#ffff00;">Custom</option> <!-- This is the Editable Option -->
746                                 <option value="200" <%=  (nvl(rdef.getDataContainerWidth(),"200").equals("200"))?" selected":"" %>>200%</option> 
747                                 <option value="190" <%=  (nvl(rdef.getDataContainerWidth(),"190").equals("190"))?" selected":"" %>>190%</option> 
748                                 <option value="180" <%=  (nvl(rdef.getDataContainerWidth(),"180").equals("180"))?" selected":"" %>>180%</option> 
749                                 <option value="170" <%=  (nvl(rdef.getDataContainerWidth(),"170").equals("170"))?" selected":"" %>>170%</option> 
750                                 <option value="160" <%=  (nvl(rdef.getDataContainerWidth(),"160").equals("160"))?" selected":"" %>>160%</option> 
751                                 <option value="150" <%=  (nvl(rdef.getDataContainerWidth(),"150").equals("150"))?" selected":"" %>>150%</option> 
752                                 <option value="140" <%=  (nvl(rdef.getDataContainerWidth(),"140").equals("140"))?" selected":"" %>>140%</option> 
753                                 <option value="130" <%=  (nvl(rdef.getDataContainerWidth(),"130").equals("130"))?" selected":"" %>>130%</option> 
754                                 <option value="120" <%=  (nvl(rdef.getDataContainerWidth(),"120").equals("120"))?" selected":"" %>>120%</option> 
755                                 <option value="110" <%=  (nvl(rdef.getDataContainerWidth(),"110").equals("110"))?" selected":"" %>>110%</option> 
756                                 <option value="100" <%=  (nvl(rdef.getDataContainerWidth(),"100").equals("100"))?" selected":"" %>>100%</option> 
757                                 <option value="90" <%=  (nvl(rdef.getDataContainerWidth(),"90").equals("90"))?" selected":"" %>>90%</option> 
758                                 <option value="80" <%=  (nvl(rdef.getDataContainerWidth(),"80").equals("80"))?" selected":"" %>>80%</option> 
759                                 <option value="70" <%=  (nvl(rdef.getDataContainerWidth(),"70").equals("70"))?" selected":"" %>>70%</option> 
760                                 <option value="60" <%=  (nvl(rdef.getDataContainerWidth(),"60").equals("60"))?" selected":"" %>>60%</option> 
761                                 <option value="50" <%=  (nvl(rdef.getDataContainerWidth(),"50").equals("50"))?" selected":"" %>>50%</option> 
762                                 <option value="40" <%=  (nvl(rdef.getDataContainerWidth(),"40").equals("40"))?" selected":"" %>>40%</option> 
763                                 <option value="30" <%=  (nvl(rdef.getDataContainerWidth(),"30").equals("30"))?" selected":"" %>>30%</option> 
764                                 <option value="20" <%=  (nvl(rdef.getDataContainerWidth(),"20").equals("20"))?" selected":"" %>>20%</option> 
765                                 <option value="10" <%=  (nvl(rdef.getDataContainerWidth(),"10").equals("10"))?" selected":"" %>>10%</option>
766                                 
767                                  
768                                 <% if(!((new Integer(nvl(rdef.getDataContainerWidth(), "100")).intValue()%10 == 0) && (new Integer(nvl(rdef.getDataContainerWidth(), "100")).intValue() <= 200)) ) {
769                                 %>
770                                 <option value="<%=rdef.getDataContainerWidth()%>" selected><%=rdef.getDataContainerWidth()%>%</option> 
771                 <%                              
772                                          } 
773                 %>                                              
774                 </td>
775         </tr>   
776
777  
778         <tr>
779                 <td class=rbg2 height="30" align="right">
780                         <font class=rtabletext> Allow Schedule?  </font>
781                 </td> 
782                 <td class=rbg3 align="left">
783            <input type="checkbox" class ="rtabletext" size="4" name="allowSchedule" value="Y" <%=((rdef.getAllowSchedule()!=null)?(rdef.getAllowSchedule().toUpperCase().charAt(0)== 'Y' ?" checked":""): (ReportLoader.isReportsAlreadyScheduled(rdef.getReportID())?" checked":"")) %>/>
784                 </td>
785         </tr>   
786
787 <%--    <tr>
788                 <td class=rbg2 height="30" align="right">
789                         <font class=rtabletext> Column Multi Group?  </font>
790                 </td> 
791                 <td class=rbg3 align="left">
792            <input type="checkbox" class ="rtabletext" size="4" name="multiGroupColumn" value="Y" <%=(rdef.getMultiGroupColumn()!=null)?(rdef.getMultiGroupColumn().toUpperCase().charAt(0)== 'Y' ?" checked":""): "" %>/>
793                 </td>
794         </tr> --%>      
795    </tr>
796
797   <% if (!(AppUtils.getRequestNvlValue(request, "reportType").equals(AppConstants.RT_DASHBOARD) || rdef.getReportType().equals(AppConstants.RT_DASHBOARD)))  { %>       
798
799 <%--    <tr>
800                 <td class=rbg2 height="30" align="right">
801                         <font class=rtabletext> Render Top - Down  </font>
802                 </td> 
803                 <td class=rbg3 align="left">
804            <input type="checkbox" class ="rtabletext" size="4" name="topDown" value="Y" <%=(rdef.getTopDownOption()!=null)?(rdef.getTopDownOption().toUpperCase().charAt(0)== 'Y' ?" checked":""):(AppUtils.getRequestNvlValue(request, "topDown").equals("Y")?" checked":"") %>/>
805                 </td>
806         </tr>    --%>
807
808         <tr>
809                 <td class=rbg2 height="30" align="right">
810                         <font class=rtabletext> Sized By Content  </font>
811                 </td> 
812                 <td class=rbg3 align="left">
813            <input type="checkbox" class ="rtabletext" size="4" name="sizedByContent" value="Y" <%=(rdef.getSizedByContentOption()!=null)?(rdef.getSizedByContentOption().toUpperCase().charAt(0)== 'Y' ?" checked":""):(AppUtils.getRequestNvlValue(request, "sizedByContent").equals("Y")?" checked":"") %>/>
814                 </td>
815         </tr>   
816
817         <tr>
818                 <td class=rbg2 height="30" align="right">
819                         <font class=rtabletext>Display Options: </font>
820                 </td> 
821                 <td class=rbg3 align="left" nowrap>
822                         <input type="checkbox" name="hideForm" value="Y"<%= rdef.isDisplayOptionHideForm()?" checked":"" %>>
823                         <font class=rtabletext>Hide Form Fields</font>
824                         <input type="checkbox" name="hideChart" value="Y"<%= rdef.isDisplayOptionHideChart()?" checked":"" %>>
825                         <font class=rtabletext>Hide Chart</font>
826                         <input type="checkbox" name="hideData" value="Y"<%= rdef.isDisplayOptionHideData()?" checked":"" %>>
827                         <font class=rtabletext>Hide Report Data</font>
828                         <input type="checkbox" name="hideBtns" value="Y"<%= rdef.isDisplayOptionHideBtns()?" checked":"" %>>
829                         <font class=rtabletext>Hide Download Buttons</font>
830                         <input type="checkbox" name="hideMap" value="Y"<%= rdef.isDisplayOptionHideMap()?" checked":"" %>>
831                         <font class=rtabletext>Hide Map</font>
832                         <input type="checkbox" name="hideExcelIcons" value="Y"<%= rdef.isDisplayOptionHideExcelIcons()?" checked":"" %>>
833                         <font class=rtabletext>Hide Excel Icons</font>
834                         <input type="checkbox" name="hidePDFIcons" value="Y"<%= rdef.isDisplayOptionHidePDFIcons()?" checked":"" %>>
835                         <font class=rtabletext>Hide PDF Icons</font>
836                 </td>
837         </tr>
838
839         <tr>
840                 <td class=rbg2 height="30" align="right">
841                         <font class=rtabletext>&nbsp; </font>
842                 </td> 
843                 <td class=rbg3 align="left" nowrap>
844                         <input type="checkbox" name="runtimeColSortDisabled" value="Y"<%= rdef.isRuntimeColSortDisabled()?" checked":"" %>>
845                         <font class=rtabletext>Disable column sort at runtime?</font>
846                 </td>
847         </tr>
848         
849         
850         <tr>
851                 <td class=rbg2 height="30" align="right">
852                         <font class=rtabletext>Run-time Form Number Columns: </font>
853                 </td> 
854                 <td class=rbg3 align="left">
855                         <select name="numFormCols" style="width: 70px;">
856                                 <option value="1"<%= (rdef.getNumFormColsAsInt()==1)?" selected":"" %>>1
857                                 <option value="2"<%= (rdef.getNumFormColsAsInt()==2)?" selected":"" %>>2
858                                 <option value="3"<%= (rdef.getNumFormColsAsInt()==3)?" selected":"" %>>3
859                                 <option value="4"<%= (rdef.getNumFormColsAsInt()==4)?" selected":"" %>>4
860                         </select>
861                 </td>
862         </tr>
863         <tr>
864                 <td class=rbg2 height="30" align="right">
865                         <font class=rtabletext>Report Title<br>(if blank, the Report Name will be displayed): </font>
866                 </td> 
867                 <td class=rbg3 align="left">
868                         <textarea name="reportTitle" style="width: 200px;" cols="40" rows="3"><%= nvl(rdef.getReportTitle()) %></textarea>
869                 </td>
870         </tr>
871         <tr>
872                 <td class=rbg2 height="30" align="right">
873                         <font class=rtabletext>Report Sub-Title: </font>
874                 </td> 
875                 <td class=rbg3 align="left">
876                         <textarea name="reportSubTitle" style="width: 200px;" cols="40" rows="3"><%= nvl(rdef.getReportSubTitle()) %></textarea>
877                 </td>
878         </tr>
879 <%--    <tr>
880                 <td class=rbg2 height="30" align="right">
881                         <font class=rtabletext>Page Header (HTML): </font>
882                 </td> 
883                 <td class=rbg3 align="left">
884                         <textarea name="reportHeader" style="width: 200px;" cols="40" rows="3"><%= Utils.htmlEncode(nvl(rdef.getReportHeader())) %></textarea>
885                 </td>
886         </tr>
887         <tr>
888                 <td class=rbg2 height="30" align="right">
889                         <font class=rtabletext>Page Footer (HTML): </font>
890                 </td> 
891                 <td class=rbg3 align="left">
892                         <textarea name="reportFooter" style="width: 200px;" cols="40" rows="3"><%= Utils.htmlEncode(nvl(rdef.getReportFooter())) %></textarea>
893                 </td>
894         </tr> --%>
895         <tr>
896                 <td class=rbg2 height="30" align="right">
897                         <font class=rtabletext>Allowed Recurrance in Schedule: </font>
898                 </td> 
899                 <td class=rbg3 align="left">
900                         <input type="checkbox" name="isOneTimeScheduleAllowed" value="Y" <%if (rdef.getIsOneTimeScheduleAllowed() == null || rdef.getIsOneTimeScheduleAllowed().equals("Y")){ %>checked <%} %>>One Time<br>
901                         <input type="checkbox" name="isHourlyScheduleAllowed" value="Y" <%if (rdef.getIsHourlyScheduleAllowed() == null || rdef.getIsHourlyScheduleAllowed().equals("Y")){ %>checked<%} %> >Hourly<br>
902                         <input type="checkbox" name="isDailyScheduleAllowed" value="Y" <%if (rdef.getIsDailyScheduleAllowed() == null || rdef.getIsDailyScheduleAllowed().equals("Y")){ %>checked<%} %> >Daily<br>
903                         <input type="checkbox" name="isDailyMFScheduleAllowed" value="Y" <%if (rdef.getIsDailyMFScheduleAllowed() == null || rdef.getIsDailyMFScheduleAllowed().equals("Y")){ %>checked<%} %> >Daily Monday - Friday<br>
904                         <input type="checkbox" name="isWeeklyScheduleAllowed" value="Y" <%if (rdef.getIsWeeklyScheduleAllowed() == null || rdef.getIsWeeklyScheduleAllowed().equals("Y")){ %>checked<%} %> >Weekly<br>
905                         <input type="checkbox" name="isMonthlyScheduleAllowed" value="Y" <%if (rdef.getIsMonthlyScheduleAllowed() == null || rdef.getIsMonthlyScheduleAllowed().equals("Y")){ %>checked<%} %> >Monthly<br>                      
906                 </td>
907         </tr>
908         <input type="hidden" name="additionalFieldsShown" value="Y">
909 <% }    // else 
910 %>
911
912 <% } // if report type is empty %>
913
914 </table>
915 <br>
916
917         <script language="JavaScript">
918         <!--
919         <% 
920                 Vector reportIdNames = ReportLoader.getUserReportNames(request); %>
921                 var reportIds   = new Array(<%= reportIdNames.size() %>);
922                 var reportNames = new Array(<%= reportIdNames.size() %>);
923                 <% for(int i=0; i<reportIdNames.size(); i++) { 
924                         IdNameValue value = (IdNameValue) reportIdNames.get(i); %>
925                         reportIds[<%= i %>]   = "<%= value.getId() %>";
926                         reportNames[<%= i %>] = "<%= Utils.javaSafe(value.getName()) %>";
927                 <% } %>
928         
929                 var dashboardReports = new Array ('reports1', 'reports2', 'reports3', 'reports4');
930                 function dataValidate() {
931                         if(document.getElementById('reportType').value=="-1") {
932                                 alert("Please enter Report Type");
933                                 document.getElementById('reportType').focus();
934                                 document.getElementById('reportType').select();
935                                 return false;
936                         }
937                         
938
939                         if(document.getElementById('reportName').value=="") {
940                                 alert("Please enter Report Name");
941                                 document.forma.reportName.focus();
942                                 document.forma.reportName.select();
943                                 return false;
944                         }   // if
945
946                         if(document.forma.pageSize!=null && document.forma.pageSize.options.selectedIndex == 0) {
947                                 if(!checkNonNegativeInteger(document.forma.pageSize.options[document.forma.pageSize.options.selectedIndex].text)) {
948                                         alert("Please enter number in pageSize. No Characters are allowed.");
949                                         return false;
950                                 } else {
951                                         document.forma.pageSize.options[document.forma.pageSize.options.selectedIndex].value=document.forma.pageSize.options[document.forma.pageSize.options.selectedIndex].text;
952                                 }
953                         }
954                 
955                         if(document.forma.frozenColumns!=null && document.forma.frozenColumns.options.selectedIndex == 0) {
956                                 if(!checkNonNegativeInteger(document.forma.frozenColumns.options[document.forma.frozenColumns.options.selectedIndex].text)) {
957                                         alert("Please enter number in frozenColumns. No Characters are allowed.");
958                                         return false;
959                                 } else {
960                                         document.forma.frozenColumns.options[document.forma.frozenColumns.options.selectedIndex].value=document.forma.frozenColumns.options[document.forma.frozenColumns.options.selectedIndex].text;
961                                 }
962                         }
963
964                         if(document.forma.heightContainer!=null && document.forma.heightContainer.options.selectedIndex == 0) {
965                                 if(!checkNonNegativeInteger(document.forma.heightContainer.options[document.forma.heightContainer.options.selectedIndex].text)) {
966                                         alert("Please enter positive number greater than 10% in \"Desired Container Height\". No Characters are allowed.");
967                                         return false;
968                                 } else {
969                                         if(eval(document.forma.heightContainer.options[document.forma.heightContainer.options.selectedIndex].text) < 10) {
970                                                 alert("Please enter positive number less than 10% in \"Desired Container Height\". No Characters are allowed.");
971                                                 return false;
972                                         }
973                                         if(eval(document.forma.heightContainer.options[document.forma.heightContainer.options.selectedIndex].text) > 300) {
974                                                 alert("Please enter positive number greater than 300% in \"Desired Container Height\". No Characters are allowed.");
975                                                 return false;
976                                         }
977                                         document.forma.heightContainer.options[document.forma.heightContainer.options.selectedIndex].value=document.forma.heightContainer.options[document.forma.heightContainer.options.selectedIndex].text;
978                                 }
979                         }
980
981                         if(document.forma.widthContainer!=null && document.forma.widthContainer.options.selectedIndex == 0) {
982                                 if(!checkNonNegativeInteger(document.forma.widthContainer.options[document.forma.widthContainer.options.selectedIndex].text)) {
983                                         alert("Please enter positive number greater than 10% in \"Desired Container Width\". No Characters are allowed.");
984                                         return false;
985                                 } else {
986                                         if(eval(document.forma.widthContainer.options[document.forma.widthContainer.options.selectedIndex].text) < 10) {
987                                                 alert("Please enter positive number less than 10% in \"Desired Container Width\". No Characters are allowed.");
988                                                 return false;
989                                         }
990                                         if(eval(document.forma.widthContainer.options[document.forma.widthContainer.options.selectedIndex].text) > 300) {
991                                                 alert("Please enter positive number greater than 300% in \"Desired Container Width\". No Characters are allowed.");
992                                                 return false;
993                                         }
994                                         document.forma.widthContainer.options[document.forma.widthContainer.options.selectedIndex].value=document.forma.widthContainer.options[document.forma.widthContainer.options.selectedIndex].text;
995                                 }
996                         }
997
998                         for(var i=0; i<reportIds.length; i++)
999                                 if((document.getElementById('reportName').value==reportNames[i])&&(reportIds[i]!="<%= reportID %>")) {
1000                                         alert("Report with that name created by you already exists.\nPlease select another name");
1001                                         document.forma.reportName.focus();
1002                                         document.forma.reportName.select();
1003                                         return false;
1004                                 }   // if
1005                         return true;
1006                 }   // dataValidate
1007         //-->
1008         </script>
1009 <!-- Start Floating Layer -->
1010 <div 
1011    id="uniquename1" 
1012    style="display:none; 
1013       position:absolute; 
1014       border-style: solid; 
1015       background-color: white; 
1016       padding: 5px;">
1017               <!-- place your HTML content here-->
1018                                <h3>Background color selector</h3>
1019                                 <% if (rdef !=null && rdef.getDashBoardReports()!=null && (rdef.getDashBoardReports().getReportsList().get(0)!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(0)).getBgcolor()!=null) &&(((Reports)rdef.getDashBoardReports().getReportsList().get(0)).getBgcolor().length()>0)) {%>                    
1020                                         <input id="hashCode1" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="<%=((Reports)rdef.getDashBoardReports().getReportsList().get(0)).getBgcolor()%>" type="text"   />
1021                                 <%} else { %>
1022                                         <input id="hashCode1" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="#FFFFFF" type="text"   />                              
1023                                 <% } %> 
1024                                         <input type="button" value="Submit & Close" onClick="document.forma.repBgColor1.value=document.getElementById('hashCode1').value; document.forma.repBgColor1.style.backgroundColor = document.getElementById('hashCode1').value; HideContent('uniquename1');"/>
1025
1026
1027               <!-- End of content area -->
1028
1029 </div>
1030 <div 
1031    id="uniquename2" 
1032    style="display:none; 
1033       position:absolute; 
1034       border-style: solid; 
1035       background-color: white; 
1036       padding: 5px;">
1037               <!-- place your HTML content here-->
1038                                <h3>Background color selector</h3>
1039                                 <% if (rdef !=null && rdef.getDashBoardReports()!=null && (rdef.getDashBoardReports().getReportsList().get(1)!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(1)).getBgcolor()!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(1)).getBgcolor().length()>0)) {%>                   
1040                                         <input id="hashCode2" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="<%=((Reports)rdef.getDashBoardReports().getReportsList().get(1)).getBgcolor()%>" type="text"   />
1041                                 <%} else { %>
1042                                         <input id="hashCode2" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="#FFFFFF" type="text"   />                              
1043                                 <% } %> 
1044                                         <input type="button" value="Submit & Close" onClick="document.forma.repBgColor2.value=document.getElementById('hashCode2').value; document.forma.repBgColor2.style.backgroundColor = document.getElementById('hashCode2').value;HideContent('uniquename2');"/>
1045
1046
1047               <!-- End of content area -->
1048
1049 </div>
1050 <div 
1051    id="uniquename3" 
1052    style="display:none; 
1053       position:absolute; 
1054       border-style: solid; 
1055       background-color: white; 
1056       padding: 5px;">
1057               <!-- place your HTML content here-->
1058                                <h3>Background color selector</h3>
1059                                 <% if (rdef !=null && rdef.getDashBoardReports()!=null && (rdef.getDashBoardReports().getReportsList().get(2)!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(2)).getBgcolor()!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(2)).getBgcolor().length()>0)) {%>                   
1060                                         <input id="hashCode3" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="<%=((Reports)rdef.getDashBoardReports().getReportsList().get(2)).getBgcolor()%>" type="text"   />
1061                                 <%} else { %>
1062                                         <input id="hashCode3" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="#FFFFFF" type="text"   />                              
1063                                 <% } %> 
1064                                         <input type="button" value="Submit & Close" onClick="document.forma.repBgColor3.value=document.getElementById('hashCode3').value; document.forma.repBgColor3.style.backgroundColor = document.getElementById('hashCode3').value; HideContent('uniquename3');"/>
1065
1066
1067               <!-- End of content area -->
1068
1069 </div>
1070 <div 
1071    id="uniquename4" 
1072    style="display:none; 
1073       position:absolute; 
1074       border-style: solid; 
1075       background-color: white; 
1076       padding: 5px;">
1077               <!-- place your HTML content here-->
1078                                <h3>Background color selector</h3>
1079                                 <% if (rdef !=null && rdef.getDashBoardReports()!=null && (rdef.getDashBoardReports().getReportsList().get(3)!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(3)).getBgcolor()!=null) && (((Reports)rdef.getDashBoardReports().getReportsList().get(3)).getBgcolor().length()>0)) {%>                   
1080                                         <input id="hashCode4" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="<%=((Reports)rdef.getDashBoardReports().getReportsList().get(3)).getBgcolor()%>" type="text"   />
1081                                 <%} else { %>
1082                                         <input id="hashCode4" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="#FFFFFF" type="text"   />                              
1083                                 <% } %> 
1084                                         <input type="button" value="Submit & Close" onClick="document.forma.repBgColor4.value=document.getElementById('hashCode4').value; document.forma.repBgColor4.style.backgroundColor = document.getElementById('hashCode4').value; HideContent('uniquename4');"/>
1085
1086
1087               <!-- End of content area -->
1088
1089 </div>
1090
1091 <div id="FloatingLayer" style="position:absolute;width:250px;left:100;top:100;visibility:hidden"> 
1092   <table border="0" width="250" bgcolor="#FF6600" cellspacing="0" cellpadding="5">
1093     <tr> 
1094       <td width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="36">
1095           <tr> 
1096             <td id="titleBar" style="cursor:move" width="100%"> <ilayer width="100%" onSelectStart="return false"> 
1097               <layer width="100%" onMouseover="isActive=true;if (isN4) MoveN4(FloatingLayer)" onMouseout="isActive=false"> 
1098               <font face="Arial" color="#FFFFFF">Layer Title</font></layer>
1099               </ilayer></td>
1100             <td style="cursor:hand" valign="top"> <a href="#" onClick="ToggleFloatingLayer('FloatingLayer',0);return false"><font color="#ffffff" size="2" face="arial"  style="text-decoration:none">X</font></a> 
1101             </td>
1102           </tr>
1103           <tr> 
1104             <td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2"> 
1105               <!-- place your HTML content here-->
1106                                <h3>Background color selector</h3>
1107                                         <input id="hashCode" style="position: absolute; right: 15px; top: 239px;" size="8" class="color" value="#FF0000" type="text"    />
1108                                         <input type="button" value="Submit & Close" onClick="document.forma.dashBgColor1.value=document.getElementById('hashCode').value; javascript:ToggleFloatingLayer('FloatingLayer',0);"/>
1109
1110
1111               <!-- End of content area -->
1112             </td>
1113           </tr>
1114         </table></td>
1115     </tr>
1116   </table>
1117 </div>
1118 <!-- End Floating layer -->
1119 <%!
1120         private String nvl(String s)                   { return (s==null)?"":s; }
1121         private String nvl(String s, String sDefault)  { return nvl(s).equals("")?sDefault:s; } 
1122 %>