[Home] [Help]
PACKAGE BODY: APPS.BIS_REPORT_UTIL_PVT
Source
1 PACKAGE BODY BIS_REPORT_UTIL_PVT AS
2 /* $Header: BISVRUTB.pls 115.73 2003/12/03 19:05:05 kiprabha ship $ */
3 -- dbdrv: sql ~PROD ~PATH ~FILE none none none package &phase=plb \
4 -- dbdrv: checkfile:~PROD:~PATH:~FILE
5 ------------------------------------------------------------------------------
6 -- Copyright (c) 1996 Oracle Corporation, Redwood Shores, CA, USA --
7 -- All rights reserved. --
8 -- --
9 -- FILENAME --
10 -- BISVRUTB.pls --
11 -- --
12 -- DESCRIPTION --
13 -- Body of BIS Reports Utilities --
14 -- --
15 -- HISTORY --
16 -- Date Developer Modifications --
17 -- 15-APR-99 amkulkar creation --
18 -- 14-AUG-00 cclyde Added comments about each procedure --
19 -- 20-Sep-00 aleung add Get_Report_Currency and showTitleDateCurrency --
20 -- 26-Oct-00 aleung remove build_report_header_new because it's --
21 -- equivalent to the combination of build_report_banner --
22 -- and showTitleDateCurrency --
23 -- 12-Dec-00 gsanap added reference to bismarli to OA_HTML --
24 -- 31-May-01 mdamle New Profile for OA_HTML, OA_MEDIA --
25 -- 22-Jun-01 mdamle New UI - compact report
26 -- 30-Jun-03 gsanap bug fix 2998244 added if in get after form html
27 ------------------------------------------------------------------------------
28
29 ----------------------------------------------------------------------------
30 -- Procedure: Get_Images_Server --
31 -- --
32 -- Description: Gets the URL structure for the images displayed within --
33 -- the report. The profile option 'ICX_REPORT_IMAGES' --
34 -- corresponds to a directory on the file server. --
35 -- --
36 -- Parameters: --
37 -- --
38 -- HISTORY --
39 -- Date Developer Modifications --
40 -- 14-AUG-00 cclyde Added header comments and general comments --
41 -- throughout procedure/function. --
42 -- 31-MAY-01 mdamle New Profile for OA_HTML, OA_MEDIA --
43 ----------------------------------------------------------------------------
44 FUNCTION Get_Images_Server RETURN VARCHAR2 IS
45 l_Icx_Report_Images VARCHAR2(240);
46 result boolean;
47 BEGIN
48 -- mdamle 05/31/01 - New Profile for OA_HTML, OA_MEDIA
49 -- l_Icx_Report_Images := FND_PROFILE.value('ICX_REPORT_IMAGES');
50
51 if icx_sec.g_oa_media is null then
52 result := icx_sec.validateSession;
53 end if;
54
55 if instr(icx_sec.g_oa_media, 'http:') > 0 then
56 l_Icx_Report_Images := FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_media);
57 else
58 l_Icx_Report_Images := FND_WEB_CONFIG.WEB_SERVER || FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_media);
59 end if;
60
61 RETURN(l_Icx_Report_Images);
62
63 END Get_Images_Server;
64
65
66 FUNCTION Get_HTML_Server RETURN VARCHAR2 IS
67 l_Icx_HTML VARCHAR2(240);
68 result boolean;
69 BEGIN
70
71 if icx_sec.g_oa_html is null then
72 result := icx_sec.validateSession;
73 end if;
74
75 if instr(icx_sec.g_oa_html, 'http:') > 0 then
76 l_Icx_HTML := FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_html);
77 else
78 l_Icx_HTML := FND_WEB_CONFIG.WEB_SERVER || FND_WEB_CONFIG.TRAIL_SLASH(icx_sec.g_oa_html);
79 end if;
80
81 RETURN(l_Icx_HTML);
82
83 END Get_HTML_Server;
84
85 ----------------------------------------------------------------------------
86 -- Procedure: Get_NLS_Language --
87 -- --
88 -- Description: Obtain the language in which the user is running the --
89 -- Report Generator. --
90 -- --
91 -- Parameters: --
92 -- --
93 -- HISTORY --
94 -- Date Developer Modifications --
95 -- 14-AUG-00 cclyde Added header comments and general comments --
96 -- throughout procedure/function. --
97 ----------------------------------------------------------------------------
98 FUNCTION Get_NLS_Language RETURN VARCHAR2 IS
99 l_NLS_Language_Code VARCHAR2(4);
100 BEGIN
101 SELECT l.language_code
102 INTO l_NLS_Language_Code
103 FROM fnd_languages l,
104 nls_session_parameters p
105 WHERE p.parameter = 'NLS_LANGUAGE'
106 AND p.value = l.nls_language;
107 RETURN (l_NLS_LANGUAGE_CODE);
108 END Get_NLS_Language;
109
110 ----------------------------------------------------------------------------
111 -- Procedure: Get_Report_Title --
112 -- --
113 -- Description: Based on the report title code passed in, we need to --
114 -- retrieve the correct user report title so that we can --
115 -- display a meaningful report title. --
116 -- --
117 -- Parameters: p_Function_Code Function code value from --
118 -- FND_FUNCTIONS. --
119 -- --
120 -- HISTORY --
121 -- Date Developer Modifications --
122 -- 14-AUG-00 cclyde Added header comments and general comments --
123 -- throughout procedure/function. --
124 ----------------------------------------------------------------------------
125 FUNCTION Get_Report_Title (p_Function_Code IN VARCHAR2) RETURN VARCHAR2 IS
126 l_Report_title VARCHAR2(240);
127 BEGIN
128 SELECT user_function_name
129 INTO l_Report_Title
130 FROM fnd_form_functions_vl vl,
131 fnd_form_functions ff
132 WHERE ff.function_id = vl.function_id
133 AND ff.function_name = p_Function_Code;
134 RETURN (l_Report_Title);
135 EXCEPTION
136 WHEN NO_DATA_FOUND THEN
137 RETURN (p_Function_Code);
138 WHEN OTHERS THEN
139 RAISE;
140 END Get_Report_Title;
141
142 ----------------------------------------------------------------------------
143 -- Procedure: Get_Image_File_Structure --
144 -- --
145 -- Description: Gets the directory structure / path for the Related --
146 -- Reports icon. --
147 -- --
148 -- Parameters: p_icx_report_images Directory which stores all the --
149 -- images --
150 -- p_NLS_language_code Two character language code, --
151 -- although it doesn't seem to used --
152 -- here because, technically, images --
153 -- are generic and do not contain --
154 -- translatable text. --
155 -- x_report_image Full directory path structure for --
156 -- Related Reports icon. --
157 -- --
158 -- HISTORY --
159 -- Date Developer Modifications --
160 -- 14-AUG-00 cclyde Added header comments and general comments --
161 -- throughout procedure/function. --
162 ----------------------------------------------------------------------------
163 PROCEDURE Get_Image_File_Structure ( p_Icx_Report_Images IN VARCHAR2
164 ,p_NLS_Language_Code IN VARCHAR2
165 ,x_Report_Image OUT NOCOPY VARCHAR2) IS
166 BEGIN
167
168 -- no need to add language directory since images aren't translated
169 x_REPORT_IMAGE := FND_WEB_CONFIG.TRAIL_SLASH(p_ICX_REPORT_IMAGES)
170 ||'bisrelrp.gif' ;
171
172 END Get_Image_File_Structure;
173
174 ----------------------------------------------------------------------------
175 -- Procedure: Get_Translated_Icon_Text --
176 -- --
177 -- Description: Retrieve the navigation icons labels. This is taken --
178 -- from fnd_lookups so that the correct language is used --
179 -- and the label is displayed in the user's language. --
180 -- --
181 -- Parameters: p_icon_code Unique identifer for the icon --
182 -- x_icon_meaning Short, one word label for the --
183 -- icon --
184 -- x_icon_description Long winded description for the --
185 -- text value --
186 -- --
187 -- HISTORY --
188 -- Date Developer Modifications --
189 -- 14-AUG-00 cclyde Added header comments and general comments --
190 -- throughout procedure/function. --
191 ----------------------------------------------------------------------------
192 PROCEDURE Get_Translated_Icon_Text ( p_Icon_Code IN VARCHAR2
193 ,x_Icon_Meaning OUT NOCOPY VARCHAR2
194 ,x_Icon_Description OUT NOCOPY VARCHAR2) IS
195 BEGIN
196 SELECT meaning, description
197 INTO x_Icon_Meaning,
198 x_Icon_Description
199 FROM fnd_lookups
200 WHERE lookup_code = p_Icon_Code
201 AND lookup_type = 'HTML_NAVIGATION_ICONS';
202 EXCEPTION
203 WHEN NO_DATA_FOUND then
204 x_Icon_Meaning := p_Icon_Code;
205 x_Icon_Description := p_Icon_Code;
206 WHEN OTHERS then
207 x_Icon_Meaning := p_Icon_Code;
208 x_Icon_Description := p_Icon_Code;
209 END Get_Translated_Icon_Text;
210
211 ----------------------------------------------------------------------------
212 -- Procedure: Build_More_Info_Directory --
213 -- --
214 -- Description: Creates the link for the Help icon. --
215 -- --
216 -- Parameters: p_rdf_filename Each Help file is identified by a --
217 -- given filename --
218 -- p_nls_language_code Because the Help file is trans- --
219 -- lated into many different --
220 -- languages, we need to pass in the --
221 -- language code to ensure we grab --
222 -- the Help file in the correct --
223 -- language --
224 -- x_help_directory Returns the complete directory --
225 -- structure for the Help file --
226 -- (including the Help filename) --
227 -- --
228 -- HISTORY --
229 -- Date Developer Modifications --
230 -- 14-AUG-00 cclyde Added header comments and general comments --
231 -- throughout procedure/function. --
232 ----------------------------------------------------------------------------
233 PROCEDURE Build_More_info_Directory ( p_Rdf_Filename IN VARCHAR2
234 ,p_NLS_Language_Code IN VARCHAR2
235 ,x_Help_Directory OUT NOCOPY VARCHAR2) IS
236 BEGIN
237
238
239 x_Help_Directory := FND_PROFILE.value('HELP_BASE_URL');
240
241 x_Help_Directory := FND_WEB_CONFIG.TRAIL_SLASH(x_Help_Directory)
242 || FND_WEB_CONFIG.TRAIL_SLASH(p_NLS_Language_Code)
243 || 'bis' || '/'
244 || p_rdf_filename || '/' || p_rdf_filename || '.htm';
245
246 END Build_More_Info_Directory;
247
248 ----------------------------------------------------------------------------
249 -- Procedure: Build_HTML_Banner --
250 -- --
251 -- Description: Creates the HTML banner displayed at the top of each --
252 -- web page. --
253 -- --
254 -- Parameters: p_icx_report_images Directory structure for the --
255 -- images used within the report --
256 -- p_more_info_directory Directory structure for the --
257 -- Help icon --
258 -- p_nls_language_code Two character code for the --
259 -- current language (used for --
260 -- picking up correct Help files --
261 -- location) --
262 -- p_report_name Translated name of the report --
263 -- recognizable by the user --
264 -- p_report_link URL structure for drill down --
265 -- reports --
266 -- p_related_reports_exist Boolen value identifying if --
267 -- we need a Related Reports --
268 -- icon and seperate section at --
269 -- end of report --
270 -- p_parameter_page Boolean value determining if --
271 -- the call to this procedure is --
272 -- being made from the Param --
273 -- page or the main report --
274 -- p_parameter_page_link URL for the parameter page --
275 -- p_body_attribs Defining attributes for the --
276 -- look and feel of the web page --
277 -- (in HTML format) --
278 -- x_HTML_banner Banner code is returned from --
279 -- this procedure --
280 -- --
281 -- HISTORY --
282 -- Date Developer Modifications --
283 -- 14-AUG-00 cclyde Added header comments and general comments --
284 -- throughout procedure/function. --
285 ----------------------------------------------------------------------------
286 PROCEDURE Build_HTML_Banner ( p_icx_report_images IN VARCHAR2
287 ,p_more_info_directory IN VARCHAR2
288 ,p_nls_language_code IN VARCHAR2
289 ,p_report_name IN VARCHAR2
290 ,p_report_link IN VARCHAR2
291 ,p_related_reports_exist IN BOOLEAN
292 ,p_parameter_page IN BOOLEAN
293 ,p_parameter_page_link IN VARCHAR2
294 ,p_Body_Attribs IN VARCHAR2
295 ,x_HTML_Banner OUT NOCOPY VARCHAR2) IS
296
297 l_Return_Alt VARCHAR2(2000);
298 l_Parameters_Alt VARCHAR2(2000);
299 l_NewMenu_Alt VARCHAR2(2000);
300 l_NewHelp_Alt VARCHAR2(2000);
301 l_Return_Description VARCHAR2(2000);
302 l_Parameters_Description VARCHAR2(2000);
303 l_NewMenu_Description VARCHAR2(2000);
304 l_NewHelp_Description VARCHAR2(2000);
305
306 l_Related_Alt VARCHAR2(2000);
307 l_Menu_Alt VARCHAR2(2000);
308 l_Home_Alt VARCHAR2(2000);
309 l_Help_Alt VARCHAR2(2000);
310 l_Related_Description VARCHAR2(2000);
311 l_Home_Description VARCHAR2(2000);
312 l_Menu_Description VARCHAR2(2000);
313 l_Help_Description VARCHAR2(2000);
314 l_Image_Directory VARCHAR2(2000);
315 l_Menu_Padding NUMBER(5);
316 l_Home_URL VARCHAR2(2000);
317 l_Plsql_Agent VARCHAR2(1000);
318 l_Host_File VARCHAR2(2000);
319 l_profile VARCHAR2(2000);
320 l_HTML_Header VARCHAR2(2000);
321 l_HTML_Body VARCHAR2(2000);
322 l_report_link VARCHAR2(340);
323 l_section_header VARCHAR2(1000);
324 l_css VARCHAR2(1000);
325 CSSDirectory VARCHAR2(1000);
326 BEGIN
327 if (BIS_GRAPH_REGION_UI.def_mode_query)
328 then
329 --- We do not want a banner when defining a graph region
330 NULL;
331 else
332
333 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('RELATED', l_Related_Alt, l_Related_Description);
334 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('MENU', l_Menu_Alt, l_Menu_Description);
335 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('HOME', l_Home_Alt, l_Home_Description);
336 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('HELP', l_Help_Alt, l_Help_Description);
337
338 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('RETURNTOPORTAL', l_Return_Alt, l_Return_Description);
339 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('PARAMETERS', l_Parameters_Alt, l_Parameters_Description);
340 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('NEWHELP', l_NewHelp_Alt, l_NewHelp_Description);
341 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('NEWMENU', l_NewMenu_Alt, l_NewMenu_Description);
342
343 -- mdamle 05/31/01 - New Profile for OA_HTML, OA_MEDIA
344 -- l_css := FND_PROFILE.value('ICX_OA_HTML');
345 l_css := get_html_server;
346 -- CSSDirectory := '/' || FND_WEB_CONFIG.TRAIL_SLASH(l_css);
347 CSSDirectory := l_css;
348
349
350 -- mdamle 05/31/01 - New Profile for OA_HTML, OA_MEDIA
351 -- l_Image_Directory := FND_WEB_CONFIG.TRAIL_SLASH(p_ICX_REPORT_IMAGES);
352 l_Image_Directory := FND_WEB_CONFIG.TRAIL_SLASH(get_images_server);
353
354 l_home_URL := BIS_REPORT_UTIL_PVT.Get_Home_URL;
355
356 l_section_header := FND_MESSAGE.GET_STRING('BIS','BIS_SPECIFY_PARAMS');
357
358 l_HTML_Header :=
359 '<head>
360 <!- Banner by BISVRUTB.pls->
361 <title>' || p_REPORT_NAME || '</title>
362 <LINK REL="stylesheet" HREF="'||CSSDirectory||'bismarli.css">
363 <SCRIPT LANGUAGE="JavaScript">'
364 ||
365 icx_admin_sig.help_win_syntax(
366 p_more_info_directory
367 , NULL
368 , 'BIS')
369 ||
370 '
371 </SCRIPT>
372 </HEAD>
373 ';
374
375
376 l_HTML_Body := '<body Onload=load() bgColor="#ffffff" link="#663300" vlink="#996633" alink="#FF6600" text="#000000">';
377
378 x_HTML_Banner := l_HTML_Header||l_HTML_Body ;
379
380 IF (p_Parameter_Page) THEN
381 x_HTML_Banner := x_HTML_Banner ||
382 '<form method=post action="_action_"><input name="hidden_run_parameters" type=hidden value="_hidden_"><CENTER><P>';
383 END IF;
384
385
386 x_HTML_Banner := x_HTML_Banner ||
387 '<!- Bannner ->
388 <table border=0 cellspacing=0 cellpadding=0 width=100%>
389 <tr><td rowspan=2 valign=bottom width=371>
390 <table border=0 cellspacing=0 cellpadding=0 width=100%>
391 <tr align=left><td height=30><img src=' || l_Image_Directory || 'bisorcl.gif border=no height=23
392 width=141></a></td>
393 <tr align=left> <td valign=bottom><img src=' || l_Image_Directory || 'biscollg.gif border=no></a></td></td></tr>
394 </table>
395 </td>';
396
397 IF (NOT p_Parameter_page) AND (p_Related_Reports_Exist)
398 AND (p_parameter_page_link IS NULL)
399 THEN
400 l_menu_padding := 1050;
401 ELSE
402 l_menu_padding := 1000;
403 END IF;
404
405 IF (NOT p_Parameter_Page) AND (p_Related_Reports_Exist) THEN
406 l_Menu_Padding := 50;
407 ELSE
408 l_Menu_Padding := 1000;
409 END IF;
410
411 IF (NOT p_Parameter_Page) AND (p_parameter_page_link IS NOT NULL) THEN
412 l_Menu_Padding := 50;
413 ELSE
414 l_Menu_Padding := 1000;
415 END IF;
416
417 IF (NOT p_Parameter_Page)
418 AND (p_parameter_page_link IS NULL)
419 AND (p_Related_Reports_Exist)
420 Then l_menu_padding := 50;
421 END IF;
422
423 -- MENU
424
425 x_HTML_Banner := x_HTML_Banner ||
426 '<td colspan=2 rowspan=2 valign=bottom align=right>
427 <table border=0 cellpadding=0 align=right cellspacing=4>
428 <tr valign=bottom>
429 <td width=60 align=center><a href='||p_Report_link||'Oraclemypage.home onMouseOver="window.status=''' || l_return_description || '''; return true">
430 <img alt='||l_Return_Alt||' src='||l_Image_Directory||'bisrtrnp.gif width=32 border=0 height=32></a></td>
431 <td width=60 align=center><a href=' || p_Report_link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || l_NewMenu_description || '''; return true">
432 <img alt='||l_NewMenu_Alt||' src='||l_Image_Directory||'bisnmenu.gif width=32 border=0
433 height=32></a></td>
434 <td width=60 align=center valign=bottom><a href="javascript:help_window()", onMouseOver="window.status=''' || l_NewHelp_description || '''; return true">
435 <img alt='||l_NewHelp_Alt||' src='||l_Image_Directory||'bisnhelp.gif width=32 border=0
436 height=32></a></td>
437 </tr>
438 <tr align=center valign=top>
439 <td width=60><a href='||p_Report_link||'Oraclemypage.home onMouseOver="window.status=''' || l_return_description || '''; return true">
440 <span class="OraGlobalButtonText">'||l_return_description||'</span></a></td>
441 <td width=60><a href='|| p_Report_link || 'OracleNavigate.Responsibility onMouseOver="window.status=''' || l_NewMenu_description || '''; return true">
442 <span class="OraGlobalButtonText">'||l_NewMenu_description||'</span></a></td>
443 <td width=60><a href="javascript:help_window()", onMouseOver="window.status=''' || l_Newhelp_description || '''; return true">
444 <span class="OraGlobalButtonText">'||l_NewHelp_description||'</span></a></td>
445 </tr></table>
446 </td>
447 </tr></table>
448 </table>';
449
450 x_HTML_Banner := x_HTML_Banner ||
451 '<table Border=0 cellpadding=0 cellspacing=0 width=100%>
452 <tbody>
453 <tr><td bgcolor=#ffffff colspan=3 height=1><img height=1 src='||l_Image_Directory||'bisspace.gif width=1></td>
454 </tr>
455 <tr>
456 <td bgcolor=#31659c colspan=2 height=21><img border=0 height=21 src='||l_Image_Directory||'bisspace.gif width=1></td>
457 <td bgcolor=#31659c height=21><font face="Arial, Helvetica, sans-serif" size="4" color="#ffffff"> </font></td>
458 <td background='||l_Image_Directory||'bisrhshd.gif height=21 width=5><img border=0 height=1
459 src='||l_Image_Directory||'bisspace.gif width=1></td>
460 </tr>
461 <tr>
462 <td bgcolor=#31659c height=16 width=9><img border=0 height=1 src='||l_Image_Directory||'bisspace.gif width=9></td>
463 <td bgcolor=#31659c height=16 width=5><img border=0 height=1 src='||l_Image_Directory||'bisspace.gif width=5></td>
464 <td background='||l_Image_Directory||'bisbot.gif width=1000><img align=top height=16
465 src='||l_Image_Directory||'bistopar.gif width=26></td>
466 <td align=left valign=top width=5><img height=8 src='||l_Image_Directory||'bisrend.gif width=8></td>
467 </tr>
468 <tr>
469 <td align=left background='||l_Image_Directory||'bisbot.gif height=8 valign=top width=9><img height=8
470 src='||l_Image_Directory||'bislend.gif width=10></td>
471 <td background='||l_Image_Directory||'bisbot.gif height=8 width=5><img border=0 height=1
472 src='||l_Image_Directory||'bisspace.gif width=1></td>
473 <td align=left valign=top width=1000><img height=8 src='||l_Image_Directory||'bisarchc.gif width=9></td>
474 <td width=5></td>
475 </tr>
476 </tbody>
477 </table>
478 <table width=100% border=0 cellspacing=0 cellpadding=15>
479 <tr><td><table width=100% border=0 cellspacing=0 cellpadding=0>
480 <tr><td class="OraHeader"><font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||p_REPORT_NAME||'</font></td></tr>
481 <tr bgcolor="#CCCC99"><td height=1><img src='||l_Image_Directory||'bisspace.gif width=1 height=1></td></tr>
482 <tr><td><font face="Arial, Helvetica, sans-serif" size="2">'||l_section_header||'</font></td></tr>
483 </table>
484 </td></tr>
485 </table>';
486
487
488
489 end if;
490
491 END Build_HTML_Banner;
492
493
494
495 ----------------------------------------------------------------------------
496 -- Procedure: Build_Report_Title --
497 -- --
498 -- Description: Builds the HTML banner for the report, providing we are --
499 -- not displaying the graph region only. --
500 -- --
501 -- Parameters: p_function_Code Indentifier for the function code, --
502 -- which is translated to the user --
503 -- function name --
504 -- p_rdf_filename The report / module name --
505 -- p_body_attribs Set of attributes used to define the --
506 -- body of the web page --
507 -- --
508 -- HISTORY --
509 -- Date Developer Modifications --
510 -- 14-AUG-00 cclyde Added header comments and general comments --
511 -- throughout procedure/function. --
512 ----------------------------------------------------------------------------
513 PROCEDURE Build_Report_Title ( p_Function_Code IN VARCHAR2
514 ,p_Rdf_Filename IN VARCHAR2
515 ,p_Body_Attribs IN VARCHAR2) IS
516 l_Icx_Report_Images VARCHAR2(240);
517 l_NLS_Language_Code VARCHAR2(240);
518 l_Report_Name VARCHAR2(240);
519 l_Report_Link VARCHAR2(240);
520 l_HTML_Banner_Text VARCHAR2(32000);
521 l_More_Info_Directory VARCHAR2(240);
522 BEGIN
523 if (BIS_GRAPH_REGION_UI.def_mode_query) then
524 --- We do not want a report title when defining a graph region
525 NULL;
526 else
527
528 l_Icx_Report_Images := BIS_REPORT_UTIL_PVT.Get_Images_Server;
529 l_NLS_Language_Code := BIS_REPORT_UTIL_PVT.Get_NLS_Language;
530 l_Report_Name := BIS_REPORT_UTIL_PVT.Get_Report_Title(p_Function_Code);
531 BIS_REPORT_UTIL_PVT.Build_HTML_Banner(l_Icx_Report_Images,
532 p_Rdf_Filename,
533 l_NLS_Language_Code,
534 l_Report_Name,
535 NULL,
536 FALSE,
537 FALSE,
538 NULL,
539 p_Body_Attribs,
540 l_HTML_Banner_Text);
541 htp.p(l_HTML_Banner_Text);
542 end if;
543 END Build_Report_Title ;
544
545 ----------------------------------------------------------------------------
546 -- Procedure: Build_Parameter_Form --
547 -- --
548 -- Description: Creates the parameter for HTML code. --
549 -- --
550 -- Parameters: p_form_action Contains the attributes for the --
551 -- form --
552 -- p_report_param_table PL/SQL table holding parameter --
553 -- values --
554 -- --
555 -- HISTORY --
556 -- Date Developer Modifications --
557 -- 14-AUG-00 cclyde Added header comments and general comments --
558 -- throughout procedure/function. --
559 ----------------------------------------------------------------------------
560 PROCEDURE Build_Parameter_Form ( p_Form_Action IN VARCHAR2
561 ,p_Report_Param_Table IN BIS_UTILITIES_PUB.Report_Parameter_Tbl_Type) IS
562 l_Icx_Report_Images VARCHAR2(240);
563 l_NLS_Language_Code VARCHAR2(240);
564 l_Report_Name VARCHAR2(240);
565 l_form_attribs VARCHAR2(800);
566 l_Column2_string VARCHAR2(32767);
567 l_full_form BOOLEAN;
568 l_and VARCHAR2(1) := '&';
569 l_nbsp VARCHAR2(10) := NULL;
570 BEGIN
571 htp.centerOpen;
572
573 if (BIS_GRAPH_REGION_UI.def_mode_query)
574 then
575 l_full_form := false;
576 else
577 l_full_form := true;
578 end if;
579 /*
580 if (l_full_form) then
581 ---
582 --- W A R N I N G ! ! !
583 --- The following lines of code contain hard-coded english language
584 --- user messages.
585 --- The need to be replaced by translated messages using
586 --- fnd_new_messages.
587 ---
588 htp.p('<table align=center border=0 cellpadding=0 cellspacing=0 width=672>
589 <tr><td><br></td></tr>
590 <tr>
591 <td align=center>
592 <font face=arial,sans-serif><b> Report Parameters</b></font>
593 </td>
594 </tr>
595 <tr><td><br></td></tr>
596 <tr>
597 <td align=left>
598 <font face=arial,sans-serif> Please specify the parameter(s) and select OK.</font>
599 </td>
600 </tr>
601 <tr><td><br></td></tr>
602 </table>');
603 end if;
604 */
605 l_form_attribs := '<form '|| p_form_action || '>';
606 htp.p(l_form_attribs);
607 htp.centerOpen;
608 htp.p('<p>');
609 htp.tableOpen
610 (calign => 'CENTER',
611 cattributes => 'BORDER=0 WIDTH=100% cellspacing=0 cellpadding=0');
612
613 IF p_Report_Param_Table.count > 0 THEN
614 htp.div(cattributes => 'FONT FACE = "ARIAL,SANS-SERIF, HELVETICA"
615 , FONT SIZE=1');
616 FOR l_count in 1..p_Report_Param_Table.count LOOP
617 htp.tableRowOpen;
618 htp.tableData(
619 cvalue => p_Report_Param_Table(l_count).label,
620 calign => 'RIGHT',
621 cattributes => 'VALIGN=MIDDLE NOWRAP WIDTH=40%');
622 l_Column2_String:=p_Report_Param_Table(l_count).value ||
623 ' '||p_Report_Param_Table(l_count).action;
624 htp.tableData(cvalue => l_nbsp);
625 htp.tableData(cvalue => l_column2_string,
626 calign => 'LEFT',
627 cattributes => 'VALIGN=MIDDLE NOWRAP WIDTH=60%');
628 htp.tableRowClose;
629 END LOOP;
630 htp.p('</div>');
631
632 END IF;
633
634 htp.tableClose;
635
636 if (l_full_form) then
637 htp.br;
638 htp.br;
639 -- htp.hr (cattributes => 'SIZE=1, WIDTH=75%, NOSHADE');
640 l_Icx_Report_Images := BIS_REPORT_UTIL_PVT.Get_Images_Server;
641 l_NLS_Language_Code := BIS_REPORT_UTIL_PVT.Get_NLS_Language;
642 BIS_REPORT_UTIL_PVT.Get_After_Form_Html(
643 l_Icx_Report_Images,
644 l_NLS_LAnguage_Code,
645 NULL);
646 end if;
647
648 END Build_Parameter_Form;
649
650 ----------------------------------------------------------------------------
651 -- Procedure: Build_Report_Header --
652 -- --
653 -- Description: Build the HTML header tags. --
654 -- --
655 -- Parameters: p_javascript Drop in any javascript requirements into --
656 -- HTML header --
657 -- --
658 -- HISTORY --
659 -- Date Developer Modifications --
660 -- 14-AUG-00 cclyde Added header comments and general comments --
661 -- throughout procedure/function. --
662 ----------------------------------------------------------------------------
663 PROCEDURE Build_Report_Header (p_javascript IN VARCHAR2) IS
664 BEGIN
665 htp.headopen;
666 htp.p('<SCRIPT LANGUAGE=JavaScript XXX>');
667 htp.p(p_javascript);
668 htp.p('</SCRIPT>');
669 htp.headclose;
670 END Build_Report_Header;
671
672 ----------------------------------------------------------------------------
673 -- Procedure: Get_After_Form_HTML --
674 -- --
675 -- Description: At the end of the parameter form, display two buttons: --
676 -- OK Run this report --
677 -- CANCEL Cancel the report and return to the main --
678 -- menu. --
679 -- --
680 -- Parameters: p_icx_report_images Directory for the images used --
681 -- within the report --
682 -- p_nls_language_code Two character language code for --
683 -- correct translation retrieval --
684 -- p_report_name Translated name of the report --
685 -- --
686 -- HISTORY --
687 -- Date Developer Modifications --
688 -- 14-AUG-00 cclyde Added header comments and general comments --
689 -- throughout procedure/function. --
690 -- 30-Jun-03 gsanap bug fix 2998244 added if language ='US'
691 -- 22-Oct-03 gsanap bug fix 2434400 removed if language ='US'
692 ----------------------------------------------------------------------------
693 PROCEDURE Get_After_Form_HTML ( p_icx_report_images IN VARCHAR2
694 ,p_nls_language_code IN VARCHAR2
695 ,p_report_name IN VARCHAR2) IS
696 l_run_Meaning VARCHAR2(80);
697 l_run_Description VARCHAR2(80);
698 l_Cancel_Meaning VARCHAR2(80);
699 l_Cancel_Description VARCHAR2(80);
700 l_Image_Directory VARCHAR2(2000);
701 src_lang VARCHAR2(50);
702 BEGIN
703 l_Image_Directory := FND_WEB_CONFIG.TRAIL_SLASH(p_ICX_REPORT_IMAGES);
704 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('RUN', l_run_Meaning, l_run_Description);
705 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text ('CANCEL', l_Cancel_Meaning, l_Cancel_Description);
706 src_lang := get_nls_language;
707
708 htp.p(
709 '<table width=100% border=0 cellspacing=0 cellpadding=15>
710 <tr>
711 <td>
712 <table width=100% border=0 cellspacing=0 cellpadding=0>
713 <tr>
714 <td width=604> </td>
715 <td rowspan=2 valign=bottom width=12><img src='||l_Image_directory||'bisslghr.gif width=12
716 height=14></td>
717 </tr>
718 <tr>
719 <td bgcolor=#CCCC99 height=1><img src='||l_Image_directory||'bisspace.gif width=1 height=1></td>
720 </tr>
721 <tr>
722 <td height=5><img src='||l_Image_Directory||'bisspace.gif width=1 height=1></td>
723 </tr>');
724
725 /*
726 --gsanap 22-oct-03 bugfix 2434400 removed the if condition. Now all the languages reports
727 --will get a html buttons for Run and Cancel. this is to standardize for all the languages
728
729 if src_lang = 'US' then
730
731 htp.p( '<tr>
732 <td align="right">
733 <span class="OraALinkText"><span class="OraALinkText">
734 <A href="javascript:document.forms[0].submit()" onMouseOver="window.status='''
735 || l_OK_Description || ''';return true">
736 <img src='||l_Image_Directory||'bisrun.gif border="0"></a>
737 <A href="javascript:history.go(-1)" onMouseOver="window.status='''
738 || l_Cancel_Description || ''';return true">
739 <img src='||l_Image_directory||'biscancl.gif width="64" height="25" border="0"></a>
740 </span></span>
741 </td>
742 </tr>');
743 else
744 */
745 htp.p('<tr>
746 <td align="right">
747 <span class="OraALinkText"><span class="OraALinkText">
748 <input type=button value='''
749 || l_run_meaning || ''' onClick="javascript:document.forms[0].submit()">
750 <input type=button value='''
751 || l_cancel_meaning || ''' onClick="javascript:history.go(-1)">
752 </span></span>
753 </td>
754 </tr>');
755 --end if;
756
757
758 htp.p('</table>
759 </td>
760 </tr>
761 </table>');
762
763
764
765 END Get_After_Form_HTML;
766
767
768 ----------------------------------------------------------------------------
769 -- Procedure: Get_Server_Directory --
770 -- --
771 -- Description: Retrieves the server directory which is part of the --
772 -- report URL. --
773 -- --
774 -- Parameters: --
775 -- --
776 -- HISTORY --
777 -- Date Developer Modifications --
778 -- 14-AUG-00 cclyde Added header comments and general comments --
779 -- throughout procedure/function. --
780 ----------------------------------------------------------------------------
781
782 FUNCTION Get_Server_Directory RETURN VARCHAR2 IS
783 x_server_directory VARCHAR2(32000);
784
785 BEGIN
786
787 IF substr(icx_sec.g_mode_code,1,3) = '115' THEN
788 x_server_directory := NULL;
789 ELSE
790 x_server_directory := 'OA_JAVA_SERV';
791 END IF;
792
793 IF x_server_directory IS NOT NULL THEN
794 x_server_directory := FND_WEB_CONFIG.TRAIL_SLASH(x_server_directory);
795 END IF;
796
797 RETURN x_server_directory;
798 END Get_Server_Directory;
799
800 ----------------------------------------------------------------------------
801 -- Procedure: Get_Home_Page --
802 -- --
803 -- Description: Retrieves the menu URL structure for the menu button. --
804 -- --
805 -- Parameters: --
806 -- --
807 -- HISTORY --
808 -- Date Developer Modifications --
809 -- 14-AUG-00 cclyde Added header comments and general comments --
810 -- throughout procedure/function. --
811 ----------------------------------------------------------------------------
812 FUNCTION Get_Home_Page RETURN VARCHAR2 IS
813 x_home_Page VARCHAR2(32000);
814 l_releaseVersion VARCHAR2(3);
815
816 BEGIN
817 -- bug fix 2591070 gsanap
818 --IF (ICX_SEC.ValidateSession) THEN
819 l_ReleaseVersion := SUBSTR (ICX_SEC.g_mode_code, 1, 3);
820 --END IF;
821
822 IF (l_releaseVersion = '115') THEN
823 x_home_Page := 'oraclemyPage.home' ;
824 ELSE
825 x_home_Page := 'oracle.apps.icx.myPage.MainMenu?dbHost=' ;
826 END IF;
827
828 RETURN x_home_Page;
829
830 END Get_Home_Page;
831
832 -- Home URL for new PHP looks like:
833 -- "http://ap805sun.us.oracle.com:8116/tst115rw/plsql/oraclemyPage.home"
834 --
835 -- Home URL for old PHP looks like:
836 -- http://ap804sun.us.oracle.com:778/OA_JAVA_SERV/oracle.apps.icx.myPage.MainMenu?dbHost=ap115sun_dev115<ampersamd>agent=/dev115/plsql/
837 --
838 -- Modified from ICX_PLUG_UTILITIES.gotoMainMenu
839
840 ----------------------------------------------------------------------------
841 -- Procedure: Get_Home_URL --
842 -- --
843 -- Description: Retrieves the home page URL structure for the Home --
844 -- button. --
845 -- --
846 -- Parameters: --
847 -- --
848 -- HISTORY --
849 -- Date Developer Modifications --
850 -- 14-AUG-00 cclyde Added header comments and general comments --
851 -- throughout procedure/function. --
852 ----------------------------------------------------------------------------
853 FUNCTION Get_Home_URL RETURN VARCHAR2 IS
854 x_home_URL VARCHAR2(32000);
855 l_Server_Directory VARCHAR2(32000);
856 l_app_server VARCHAR2(32000);
857 l_Home_page VARCHAR2(32000);
858 l_host_instance VARCHAR2(32000);
859 l_agent VARCHAR2(32000);
860 l_ampersand VARCHAR2(1) := '&';
861 l_releaseVersion VARCHAR2(3);
862
863 BEGIN
864 -- bug fix 2591070 gsanap
865 --IF (ICX_SEC.ValidateSession) THEN
866 l_ReleaseVersion := SUBSTR (ICX_SEC.g_mode_code, 1, 3);
867 --END IF;
868
869 l_app_server := FND_WEB_CONFIG.TRAIL_SLASH(icx_plug_utilities.getReportURL);
870 l_agent := FND_WEB_CONFIG.TRAIL_SLASH(icx_plug_utilities.getPLSQLagent);
871 l_home_page := BIS_REPORT_UTIL_PVT.Get_Home_page;
872 l_server_directory := BIS_REPORT_UTIL_PVT.Get_Server_Directory;
873
874 IF (l_releaseVersion = '115') THEN
875
876 x_home_URL := l_app_server||l_agent||l_home_page;
877
878 ELSE
879
880 l_host_instance := FND_WEB_CONFIG.DATABASE_ID;
881 x_home_URL := l_app_server||l_Server_Directory
882 ||l_home_page||l_host_instance
883 ||l_ampersand||'agent='||l_agent;
884
885 END IF;
886
887
888 RETURN x_Home_URL;
889
890 END Get_Home_URL;
891
892 ----------------------------------------------------------------------------
893 -- Procedure: Build_Report_Footer --
894 -- --
895 -- Description: build the report footer --
896 -- --
897 -- Parameters: none --
898 -- --
899 -- HISTORY --
900 -- Date Developer Modifications --
901 -- 16-AUG-00 aleung creation --
902 -- --
903 ----------------------------------------------------------------------------
904
905 procedure Build_Report_Footer (OutString out NOCOPY varchar2) is
906 images varchar2(1000);
907 begin
908 images := BIS_REPORT_UTIL_PVT.Get_Images_Server;
909 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
910
911 OutString := '<!----------------------- Footer Section --------------------------------->
912 <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
913 <TR>
914 <TD width="604"> </TD>
915 <TD ROWSPAN="2" valign="bottom" width="12"><IMG SRC="'||images||'bisslghr.gif" width="12" height="14"></TD>
916 </TR>
917 <TR>
918 <TD bgcolor="#CCCC99" height="1"><IMG SRC="'||images||'bisspace.gif" height=1 width=1></TD>
919 </TR>
920 </TABLE>
921 <!-- end of the footer section -->';
922
923 end Build_Report_Footer;
924
925 ----------------------------------------------------------------------------
926 -- Procedure: Build_Report_Banner --
927 -- --
928 -- Description: Build the report banner with the Oracle Logo & Banner --
929 -- --
930 -- Parameter: pReportName --
931 -- --
932 -- HISTORY --
933 -- Date Developer Modifications --
934 -- 29-AUG-00 aleung creation --
935 -- 26-Oct-00 aleung add <head> style sheet </head> and pReportName --
936 ----------------------------------------------------------------------------
937
938 procedure Build_Report_Banner(pReportName in varchar2, OutString out NOCOPY varchar2) is
939
940 images varchar2(1000);
941 l_Report_Name VARCHAR2(240); -- Report title
942 l_Home_URL VARCHAR2(2000); -- Return to Portal Link
943 l_Menu_Link VARCHAR2(340); -- Menu Link
944 l_Menu_Alt VARCHAR2(2000); -- Menu button text
945 l_Home_Alt VARCHAR2(2000); -- Return to Portal button text
946 l_Help_Alt VARCHAR2(2000); -- Help button text
947 l_Menu_Description VARCHAR2(2000);
948 l_Home_Description VARCHAR2(2000);
949 l_Help_Description VARCHAR2(2000);
950 l_css VARCHAR2(2000);
951 CSSDirectory VARCHAR2(2000);
952
953 begin
954
955 images := BIS_REPORT_UTIL_PVT.Get_Images_Server;
956 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
957
958 -- mdamle 05/31/2001 - New ICX Profile for OA_HTML, OA_MEDIA
959 -- l_css := FND_PROFILE.value('ICX_OA_HTML');
960 l_css := get_html_server;
961 -- CSSDirectory := '/' || FND_WEB_CONFIG.TRAIL_SLASH(l_css);
962 CSSDirectory := l_css;
963
964 -- l_Home_URL := BIS_REPORT_UTIL_PVT.Get_Home_URL;
965 -- mdamle 07/17/01 - Fix for Bug#1825055 - Added Check for the trailing slash
966 l_Menu_Link := FND_WEB_CONFIG.TRAIL_SLASH(FND_PROFILE.value('ICX_REPORT_LINK'));
967
968 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('NEWMENU', l_Menu_Alt, l_Menu_Description);
969 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('RETURNTOPORTAL', l_Home_Alt, l_Home_Description);
970 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('NEWHELP', l_Help_Alt, l_Help_Description);
971
972
973 OutString:= '<HEAD>
974 <TITLE>'||pReportName||'</TITLE>
975 <LINK REL="stylesheet" HREF="'||CSSDirectory||'bismarli.css">
976 </HEAD>
977 <BODY bgColor="#ffffff" link="#663300" vlink="#996633" alink="#FF6600" text="#000000">
978 <!-- BANNER SECTION ----------------------------------------------------->
979 <TABLE width="100%" cellspacing="0" cellpadding="0">
980 <TR><TD ROWSPAN="2" valign="bottom" width="371">
981 <!-- Oracle logo and product collage -->
982 <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" height="100">
983 <TR ALIGN="left">
984 <!-- Oracle logo -->
985 <TD height="30"><IMG SRC="'||images||'bisorcl.gif" width="141" height="23"></TD>
986 </TR>
987 <TR ALIGN="left">
988 <!-- product collage -->
989 <TD valign="bottom"><IMG SRC="'||images||'biscollg.gif"></TD>
990 </TR>
991 </TABLE></TD>
992 <TD ALIGN="right" ROWSPAN="2" COLSPAN="2" valign="bottom">
993 <!-- global buttons -->
994 <TABLE ALIGN="right" border=0 cellpadding=0 cellspacing="4">
995 <TR VALIGN="bottom"><TD ALIGN="center" width="60">
996 <A HREF="'||l_Menu_Link||'oraclemyPage.home" onMouseOver="window.status='''||l_Home_Description||'''; return true"">
997 <IMG SRC="'||images||'bisrtrnp.gif" ALT="'||l_Home_Alt||'" width="32" border="0" height="32"></A></TD>
998 <TD ALIGN="center" width="60"><A HREF="'||l_Menu_Link||'OracleNavigate.Responsibility" onMouseOver="window.status='''||l_Menu_Description||'''; return true"">
999 <IMG SRC="'||images||'bisnmenu.gif" ALT="'||l_Menu_Alt||'" width="32" border="0" height="32"></A></TD>
1000 <TD ALIGN="center" width="60" valign="bottom"><A HREF="javascript:help_window()" onMouseOver="window.status='''||l_Help_Description||'''; return true"">
1001 <IMG SRC="'||images||'bisnhelp.gif" ALT="'||l_Help_Alt||'" border="0" width ="32" height="32"></A></TD></TR>
1002 <TR ALIGN="center" VALIGN="top">
1003 <TD width="60"><A HREF="'||l_Menu_Link||'oraclemyPage.home" onMouseOver="window.status='''||l_Home_Description||'''; return true"">
1004 <SPAN class="OraGlobalButtonText">'||l_Home_Alt||'</SPAN></A></TD>
1005 <TD width="60"><A HREF="'||l_Menu_Link||'OracleNavigate.Responsibility" onMouseOver="window.status='''||l_Menu_Description||'''; return true"">
1006 <SPAN class="OraGlobalButtonText">'||l_Menu_Alt||'</SPAN></A></TD>
1007 <TD width="60"><A HREF="javascript:help_window()" onMouseOver="window.status='''||l_Help_Description||'''; return true"">
1008 <SPAN class="OraGlobalButtonText">'||l_Help_Alt||'</SPAN></A></TD></TR></TABLE>
1009 <!-- end of global buttons table -->
1010 </TD></TR>
1011 </TABLE>
1012 <!-- end of logo and icons -->
1013 <!-- BLUE BANNER ----------------------------------------------------->
1014 <TABLE border=0 cellpadding=0 cellspacing=0 width="100%">
1015 <TBODY>
1016 <TR>
1017 <TD COLSPAN="3" bgcolor=#000000 height=1><IMG SRC="'||images||'bisspace.gif" height=1 width=1></TD>
1018 </TR>
1019 <TR>
1020 <TD COLSPAN="2" bgcolor=#31659c height=21><IMG SRC="'||images||'bisspace.gif" border=0 height=21 width=1></TD>
1021 <TD bgcolor=#31659c height=21 class="OraGlobalPageTitle"> </TD>
1022 <TD background='||images||'bisrhshd.gif height=21 width=5>
1023 <IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=1></TD>
1024 </TR>
1025 <TR>
1026 <TD bgcolor=#31659c height=16 width=9><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=9></TD>
1027 <TD bgcolor=#31659c height=16 width=5><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=5></TD>
1028 <TD background='||images||'bisbot.gif width=1000><IMG SRC="'||images||'bistopar.gif" ALIGN="top" height=16
1029 width=26></TD>
1030 <TD ALIGN="left" valign=top width=5><IMG SRC="'||images||'bisrend.gif" height=8 width=8></TD>
1031 </TR>
1032 <TR>
1033 <TD ALIGN="left" background='||images||'bisbot.gif height=8 valign=top
1034 width=9><IMG SRC="'||images||'bislend.gif" height=8 width=10></TD>
1035 <TD background='||images||'bisbot.gif height=8 width=5><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=1></TD>
1036 <TD ALIGN="left" valign=top width=1000><IMG SRC="'||images||'bisarchc.gif" height=8 width=9></TD>
1037 <TD width=5> </TD>
1038 </TR>
1039 </TBODY>
1040 </TABLE>
1041 <!------End of Blue Banner------------>';
1042
1043 end Build_Report_Banner;
1044
1045 ----------------------------------------------------------------------------
1046 -- Procedure: Get_Report_Currency --
1047 -- --
1048 -- Description: Get Report Currency --
1049 -- --
1050 -- Parameter: None --
1051 -- --
1052 -- HISTORY --
1053 -- Date Developer Modifications --
1054 -- 20-Sep-00 aleung creation --
1055 -- 03-Nov-00 dmakrman put exception hadling around select statement --
1056 ----------------------------------------------------------------------------
1057
1058 FUNCTION Get_Report_Currency RETURN VARCHAR2 IS
1059 v_setOfBooksId number;
1060 v_currencyDummyId number;
1061 v_functionalCurrency varchar(1000);
1062 v_currencyDummy1 varchar(1000);
1063 v_currencyDummy2 varchar(1000);
1064
1065 v_currencySymbol fnd_currencies.symbol%type;
1066 v_currencyDescr fnd_currencies.description%type;
1067 v_currencyDisplay varchar(1000);
1068 -- Fix for bug 3289541 : Made the call to gl_info dynamic
1069 plsql_block varchar2(1000) ;
1070 begin
1071 -- CURRENCY:
1072 v_setOfBooksId := fnd_profile.value('GL_SET_OF_BKS_ID');
1073
1074 -- Fix for bug 3289541 : Made the call to gl_info dynamic
1075 plsql_block :=
1076 'BEGIN gl_info.gl_get_set_of_books_info(:1,:2,:3,:4,:5);END;' ;
1077
1078 EXECUTE IMMEDIATE plsql_block USING IN v_setOfBooksId,
1079 OUT v_currencyDummyId,
1080 OUT v_currencyDummy1,
1081 OUT v_functionalCurrency,
1082 OUT v_currencyDummy2 ;
1083
1084
1085 /*
1086 gl_info.gl_get_set_of_books_info(v_setOfBooksId,v_currencyDummyId,
1087 v_currencyDummy1, v_functionalCurrency,
1088 v_currencyDummy2);
1089 */
1090
1091 begin
1092
1093 select symbol, description
1094 into v_currencySymbol, v_currencyDescr
1095 from fnd_currencies
1096 where CURRENCY_CODE = v_functionalCurrency;
1097
1098 exception
1099 when others then null;
1100 end;
1101 v_currencyDisplay := NVL(v_currencyDescr, v_functionalCurrency);
1102
1103 if v_currencySymbol is not null then
1104 v_currencyDisplay := v_currencyDisplay || '(' || v_currencySymbol || ')';
1105 end if;
1106
1107 return(v_currencyDisplay);
1108
1109 end Get_Report_Currency;
1110
1111 ------------------------------------------------------------------
1112 -- Procedure: Build_Report_Section_Title --
1113 -- --
1114 -- Description: Build Section Title --
1115 -- --
1116 -- Parameters: p_Section_Title (Section title) --
1117 -- --
1118 -- History: Date Developer Modification --
1119 -- 8/22/2000 aleung creation --
1120 ------------------------------------------------------------------
1121 procedure Build_Report_Section_Title
1122 (p_Section_Title IN VARCHAR2,
1123 p_Format_Class IN VARCHAR2,
1124 p_RowSpan IN NUMBER,
1125 OutString out NOCOPY varchar2)
1126 is
1127 images varchar2(1000);
1128 begin
1129
1130 -- mdamle 05/31/2001 - New ICX profile for OA_HTML, OA_MEDIA
1131 -- images := FND_PROFILE.value('ICX_REPORT_IMAGES');
1132 images := get_images_server;
1133 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
1134
1135 OutString := '<TABLE border=0 cellpadding=0 cellspacing=0 width="98%">
1136 <TR ALIGN="left">
1137 <TD class="'||p_Format_Class||'">'||p_Section_Title||'</TD>
1138 </TR>
1139 <!-- underline: single pixel line -->
1140 <TR ALIGN="left">
1141 <TD COLSPAN="2" class="OraBGAccentDark"><IMG SRC="'||images||'bisspace.gif" width="400" height="1"></TD>
1142 </TR>
1143 </TABLE>';
1144
1145 end Build_Report_Section_Title;
1146
1147 ------------------------------------------------------------------
1148 -- Procedure: showTitleDateCurrency --
1149 -- --
1150 -- Description: show report title, date and currency --
1151 -- --
1152 -- Parameters: pReportName, pReportCurrency --
1153 -- --
1154 -- History: Date Developer Modification --
1155 -- 09/20/2000 aleung creation --
1156 ------------------------------------------------------------------
1157 procedure showTitleDateCurrency(pReportName in varchar2, pReportCurrency in varchar2, OutString out NOCOPY varchar2) is
1158 images varchar2(1000);
1159 begin
1160
1161 -- mdamle 05/31/2001 - New ICX profile for OA_HTML, OA_MEDIA
1162 -- images := FND_PROFILE.value('ICX_REPORT_IMAGES');
1163 images := get_images_server;
1164 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
1165
1166 -- mdamle 05/31/2001 - Adding the Style sheet here as well - While sending notification
1167 -- through email, Workflow cuts out HTML upto the body tag - hence the earlier style sheet
1168 -- gets lost.
1169 -- mdamle 06/22/01 - New UI - compact report
1170 -- Move Date next to Report Title
1171
1172 OutString := '<!-- PAGE TITLE SECTION --------------------------------------------->
1173 <LINK REL="stylesheet" HREF="'||FND_WEB_CONFIG.TRAIL_SLASH(get_HTML_server)||'bismarli.css">
1174 <TABLE border=0 cellpadding=0 cellspacing=0 width="98%">
1175 <TR ALIGN="left">
1176 <TD COLSPAN="2" class="OraHeader">'||pReportName|| ' <span class="OraHeaderSubSub">(' ||to_char(sysdate, 'DD-MON-YYYY HH24:MI') ||')</span></TD>
1177 </TR>
1178 <!-- underline: single pixel line -->
1179 <TR ALIGN="left">
1180 <TD COLSPAN="2" class="OraBGAccentDark"><IMG SRC="'||images||'bisspace.gif" width="400" height="1"></TD>
1181 </TR>
1182 </TABLE>';
1183
1184 -- mdamle 06/22/01 - New UI - compact report
1185 -- Move Date next to Report Title
1186 /*
1187 <!---- DATE AND CURRENCY SECTION---------------->
1188 <TABLE border=0 cellpadding=0 cellspacing=0 width="98%">
1189 <TR colspan=2>
1190 <TD COLSPAN="2" valign=top class="OraTipText">'|| fnd_message.get_string('BIS', 'ASOF') || ' '
1191 || fnd_date.date_to_charDT(sysdate)
1192 --||'<BR><SPAN style="font-weight:bold">'||fnd_message.get_string('BIS', 'CURRENCY')||'</SPAN> = '||pReportCurrency
1193 ||'</TD></TR>
1194 <!-- blank line -->
1195 <TR>
1196 <TD COLSPAN="2"> </TD>
1197 </TR>
1198 </TABLE>';
1199 */
1200
1201 end showTitleDateCurrency;
1202
1203 ------------------------------------------------------------------
1204 -- Procedure: showTitleWithoutDateCurrency --
1205 -- --
1206 -- Description: show report title without date and currency --
1207 -- --
1208 -- Parameters: pReportName, pReportCurrency --
1209 -- --
1210 -- History: Date Developer Modification --
1211 -- 06/19/2002 gsanap creation --
1212 ------------------------------------------------------------------
1213 procedure showTitleWithoutDateCurrency(pReportName in varchar2, pReportCurrency in varchar2, OutString out NOCOPY varchar2) is
1214 images varchar2(1000);
1215 begin
1216
1217 images := get_images_server;
1218 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
1219
1220
1221 OutString := pReportName;
1222 /*
1223 OutString := '<!-- PAGE TITLE SECTION --------------------------------------------->
1224 <LINK REL="stylesheet" HREF="'||FND_WEB_CONFIG.TRAIL_SLASH(get_HTML_server)||'bismarli.css">
1225 <TABLE border=0 cellpadding=0 cellspacing=0 width="98%">
1226 <TR ALIGN="left">
1227 <TD COLSPAN="2" class="OraHeader">'||pReportName|| '</TD>
1228 </TR>
1229 </TABLE>';
1230 */
1231
1232 end showTitleWithoutDateCurrency;
1233
1234 ----------------------------------------------------------------------------
1235 -- Procedure: Get_Report_Time --
1236 -- --
1237 -- Description: the current time of report --
1238 -- --
1239 -- Parameter: None --
1240 -- --
1241 -- HISTORY --
1242 -- Date Developer Modifications --
1243 -- 08-MAR-2002 nbarik creation --
1244 ----------------------------------------------------------------------------
1245 Function Get_Report_Time return varchar2 is
1246 begin
1247 return to_char(sysdate, 'DD-MON-YYYY HH24:MI');
1248 end Get_Report_Time;
1249
1250 ----------------------------------------------------------------------------
1251 -- Procedure: Build_Banner_For_Graphs --
1252 -- --
1253 -- Description: Build the banner with the Oracle Logo & Banner --
1254 -- --
1255 -- Parameter: pReportName --
1256 -- --
1257 -- HISTORY --
1258 -- Date Developer Modifications --
1259 -- 17-jan-00 gsanap creation --
1260 ----------------------------------------------------------------------------
1261 procedure build_banner_for_graphs(pReportName in varchar2, OutString out NOCOPY varchar2) is
1262
1263 images varchar2(1000);
1264 l_Report_Name VARCHAR2(240); -- Report title
1265 l_Home_URL VARCHAR2(2000); -- Return to Portal Link
1266 l_Menu_Link VARCHAR2(340); -- Menu Link
1267 l_Menu_Alt VARCHAR2(2000); -- Menu button text
1268 l_Home_Alt VARCHAR2(2000); -- Return to Portal button text
1269 l_Help_Alt VARCHAR2(2000); -- Help button text
1270 l_Menu_Description VARCHAR2(2000);
1271 l_Home_Description VARCHAR2(2000);
1272 l_Help_Description VARCHAR2(2000);
1273 l_css VARCHAR2(2000);
1274 CSSDirectory VARCHAR2(2000);
1275
1276 begin
1277
1278 images := BIS_REPORT_UTIL_PVT.Get_Images_Server;
1279 images := FND_WEB_CONFIG.TRAIL_SLASH(images);
1280
1281 -- mdamle 05/31/2001 - New ICX Profile for OA_HTML, OA_MEDIA
1282 -- l_css := FND_PROFILE.value('ICX_OA_HTML');
1283 l_css := get_html_server;
1284 -- CSSDirectory := '/' || FND_WEB_CONFIG.TRAIL_SLASH(l_css);
1285 CSSDirectory := l_css;
1286
1287 -- l_Home_URL := BIS_REPORT_UTIL_PVT.Get_Home_URL;
1288 -- mdamle 07/17/01 - Fix for Bug#1825055 - Added Check for the trailing slash
1289 l_Menu_Link := FND_WEB_CONFIG.TRAIL_SLASH(FND_PROFILE.value('ICX_REPORT_LINK'));
1290
1291 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('NEWMENU', l_Menu_Alt, l_Menu_Description);
1292 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('RETURNTOPORTAL', l_Home_Alt, l_Home_Description);
1293 BIS_REPORT_UTIL_PVT.Get_Translated_Icon_Text('NEWHELP', l_Help_Alt, l_Help_Description);
1294
1295 OutString:= '<HEAD>
1296 <TITLE>'||pReportName||'</TITLE>
1297 <LINK REL="stylesheet" HREF="'||CSSDirectory||'bismarli.css">
1298 </HEAD>
1299 <BODY bgColor="#ffffff" link="#663300" vlink="#996633" alink="#FF6600" text="#000000">
1300 <!-- BANNER SECTION ----------------------------------------------------->
1301 <TABLE width="100%" cellspacing="0" cellpadding="0">
1302 <TR><TD ROWSPAN="2" valign="bottom" width="371">
1303 <!-- Oracle logo and product collage -->
1304 <TABLE width="100%" border="0" cellspacing="0" cellpadding="0" height="100">
1305 <TR ALIGN="left">
1306 <!-- Oracle logo -->
1307 <TD height="30"><IMG SRC="'||images||'bisorcl.gif" width="141" height="23"></TD>
1308 </TR>
1309 <TR ALIGN="left">
1310 <!-- product collage -->
1311 <TD valign="bottom"><IMG SRC="'||images||'biscollg.gif"></TD>
1312 </TR>
1313 </TABLE></TD>
1314 <TD ALIGN="right" ROWSPAN="2" COLSPAN="2" valign="bottom">
1315 <!-- global buttons -->
1316 <TABLE ALIGN="right" border=0 cellpadding=0 cellspacing="4">
1317 <TR VALIGN="bottom"><TD ALIGN="center" width="60">
1318 <A HREF="'||l_Menu_Link||'oraclemyPage.home" onMouseOver="window.status='''||l_Home_Description||'''; return true">
1319 <IMG SRC="'||images||'bisrtrnp.gif" ALT="'||l_Home_Alt||'" width="32" border="0" height="32"></A></TD>
1320 </TR>
1321 <TR ALIGN="center" VALIGN="top">
1322 <TD width="60"><A HREF="'||l_Menu_Link||'oraclemyPage.home" onMouseOver="window.status='''||l_Home_Description||'''; return true">
1323 <SPAN class="OraGlobalButtonText">'||l_Home_Alt||'</SPAN></A></TD>
1324 </TR></TABLE>
1325 <!-- end of global buttons table -->
1326 </TD></TR>
1327 </TABLE>
1328 <!-- end of logo and icons -->
1329 <!-- BLUE BANNER ----------------------------------------------------->
1330 <TABLE border=0 cellpadding=0 cellspacing=0 width="100%">
1331 <TBODY>
1332 <TR>
1333 <TD COLSPAN="3" bgcolor=#000000 height=1><IMG SRC="'||images||'bisspace.gif" height=1 width=1></TD>
1334 </TR>
1335 <TR>
1336 <TD COLSPAN="2" bgcolor=#31659c height=21><IMG SRC="'||images||'bisspace.gif" border=0 height=21 width=1></TD>
1337 <TD bgcolor=#31659c height=21 class="OraGlobalPageTitle"> </TD>
1338 <TD background='||images||'bisrhshd.gif height=21 width=5>
1339 <IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=1></TD>
1340 </TR>
1341 <TR>
1342 <TD bgcolor=#31659c height=16 width=9><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=9></TD>
1343 <TD bgcolor=#31659c height=16 width=5><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=5></TD>
1344 <TD background='||images||'bisbot.gif width=1000><IMG SRC="'||images||'bistopar.gif" ALIGN="top" height=16
1345 width=26></TD>
1346 <TD ALIGN="left" valign=top width=5><IMG SRC="'||images||'bisrend.gif" height=8 width=8></TD>
1347 </TR>
1348 <TR>
1349 <TD ALIGN="left" background='||images||'bisbot.gif height=8 valign=top
1350 width=9><IMG SRC="'||images||'bislend.gif" height=8 width=10></TD>
1351 <TD background='||images||'bisbot.gif height=8 width=5><IMG SRC="'||images||'bisspace.gif" border=0 height=1 width=1></TD>
1352 <TD ALIGN="left" valign=top width=1000><IMG SRC="'||images||'bisarchc.gif" height=8 width=9></TD>
1353 <TD width=5> </TD>
1354 </TR>
1355 </TBODY>
1356 </TABLE>
1357 <!------End of Blue Banner------------>';
1358 if pReportName is not null then
1359 OutString := OutString ||
1360 '<table width=100% border=0 cellspacing=0 cellpadding=15><tr><td>
1361 <table width=100% border=0 cellspacing=0 cellpadding=0>
1362 <tr><td class="OraHeader"><font face="Arial, Helvetica, sans-serif" size="5" color="#336699">'||pReportName||'</font></td></tr>
1363 <tr bgcolor="#CCCC99"><td height=1><img src='||images||'bisspace.gif width=1 height=1></td></tr>
1364 </table>
1365 </td></tr>
1366 </table>';
1367 end if;
1368 end Build_Banner_for_graphs;
1369
1370 END BIS_REPORT_UTIL_PVT;