Skip to content

Instantly share code, notes, and snippets.

1. HTML Report
htp.p('
<html>
<head>
<title>Export HTML data to excel </title>
<h2>Download Excel file from HTML Report</h2>
<style>
#myReport {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
@Pkjubaer
Pkjubaer / gist:dbe26890ef9f14588d9546e20915fc4d
Created September 25, 2022 04:44
Real-Time Notification in Oracle Apex
1. Table
CREATE TABLE "NOTIFY_TABLE"
( "PID" NUMBER,
"MESSAGE" VARCHAR2(30),
"SEEN_TIME" TIMESTAMP (6),
"SEEN_TYPE" VARCHAR2(1)
)
2.Global variable Function
(function loop(i) {
@Pkjubaer
Pkjubaer / Navigation Bar Image
Last active November 7, 2024 08:36
User Image on Navigation Bar in Oracle Apex
================Navigation Bar Image=================
1. Create application item name > 'FILE_ID',> Session State Protection > Unrestricted.
2. Create Application Processes > 'GETIMAGE',> Process Point > Ajax Callback, > PL/SQL Code >
begin
for c1 in (select * from table_name
@Pkjubaer
Pkjubaer / List Manager height CSS
Created December 1, 2019 10:42
List Manager height CSS
.a-Button.a-Button--popupLOV, .t-Form-inputContainer .apex-item-group .a-Button, .u-TF-item--datepicker+.a-Button--calendar {
display: none;
}
#P3_DESIGN_PRINT_TEC,#P3_DESIGN_CODE,#P3_DESIGN_COLOR,#P3_DESIGN_SURFACE {
height:60px ! important;
}
@Pkjubaer
Pkjubaer / Interactive report border color
Created August 19, 2019 08:29
Interactive report border color
.a-IRR-headerLabel, .a-IRR-headerLink {
padding: 6px;
display: block;
text-align: inherit;
}
.a-IRR-table td {
padding: 4px 6px;
}
@Pkjubaer
Pkjubaer / Conditional formatting with javascripts in oracle apex
Last active July 7, 2019 06:48
Conditional formatting with javascripts in oracle apex
/*
$.each($('#productID tbody tr'), function(i, item) {
if($(item).find("#change_status").val() === 'N'){
var amount = $(item).find('#pay_amount').val();
var mushak = $("#mushak_applicable").val();
if(mushak == '0'){
var vat = ((parseFloat(amount)*parseFloat($("#vat_pcnt").val()))/100).toFixed(2);
vAmount += parseFloat(vat);
}
$(item).find("td:eq(4)").text(addCommas(addZeroes(amount)));
//Copy and paste this code at attribute >> JavaScript Code
function( options ){
this.pieSliceLabel = function(dataContext){
var series_name,
percent = (dataContext.value/dataContext.totalValue*100); // Math.round
if ( dataContext.seriesData ) {
series_name = dataContext.seriesData.name;
@Pkjubaer
Pkjubaer / Selected row Highlight in oracle apex
Last active April 28, 2019 10:36
Selected row Highlight in oracle apex
/*First write css with class name in page inline like below*/
.highlight_css {
background-color: #ffeb3b4f !important;
color: red !important;
}
/*Then create dynamic action when click > jQuery selector > jQuery class/id name like below*/
.click_class/id --This is the name of column class/id which we diclare into column html expression(<div class="class_name"></div>)
or link attribute like class="click_class"/
/*Then action > execute javascript code > paste the below code*/
$('.highlight_css').removeClass ('highlight_css');
@Pkjubaer
Pkjubaer / Password strength at Oracle apex
Created February 25, 2019 06:31
Password strength at Oracle apex
/*First create a function on page Function and Global Variable Declaration section*/
function CheckPasswordStrength(password) {
var password_strength = document.getElementById("password_strength");
//if textBox is empty
if(password.length==0){
password_strength.innerHTML = "";
return;
}
@Pkjubaer
Pkjubaer / Preview an image before it is uploaded Oracle apex
Last active February 23, 2019 08:33
Preview an image before it is uploaded Oracle apex
/*Create a funtion on page header section*/
<script>
var loadFile = function(event) {
var reader = new FileReader();
reader.onload = function(){
var output = document.getElementById('output');
output.src = reader.result;
};
reader.readAsDataURL(event.target.files[0]);
};