Hi everyone,
I'm using below code for Logo in Print Screen
htp.p('
<img src="C:\Users\tec\Pictures\img.jpg" alt="test" width="50"
height="50"></div>
');
But the image is displaying
Any help would be appreciated..
❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
VARSHA
I'm using Oracle APEX 20.1
Shashank
You have to upload the file to your application.
Hope this helps!
VARSHA
Thank you Shashank
Its working...
VARSHA
Hi
There is one issue in Print please help me to resolve this
I'm using PL/SQL Dynamic content to generate the print but when the data in the page increases it is not adding the next page.
Any help would be highly appreciated...
VARSHA
Please help me out to resolve this issue
I'm initiating window.print(); function when the page load,
when there are below 15 rows it is printing in single page without any issues, but when web page contain more than 25 rows print is not initiating the 2nd page.
what i'm i missing..
Vinish Kapoor
After every 20 or 25 rows try to write the below line for the page break:
VARSHA
Thank you for the reply Vinish
I already added the code for page break still its not working.it is generating only one page.
Page is breaking but it is not printing in 2nd page
what could be the issue?
Vinish Kapoor
Are you adding more htp.p lines after the above line I mentioned? Because the lines specified after the above code should print on the next page.
VARSHA
Below code is the one which i'm using in PL/SQL Dynamic content for print
and I want to print only 10 rows per page. How can i do that
declare
N number:= 0;
COMP VARCHAR2(80);
ADDR VARCHAR2(4000);
GSTIN VARCHAR2(80);
TEL NUMBER;
V_NET NUMBER;
cursor c_sale is
select
APEX_ITEM.TEXT_FROM_LOV_QUERY(PRODUCT_NAME,'SELECT PRODUCT_NAME, ID FROM PRODUCT_HGA_MASTER') as PRODUCT,
PART_NO PART_NO,
INVOICE_NO INV_NO,
QTY QTY,
RATE RATE,
BASIC_AMOUNT GROSS_AMT,
(SELECT TAX_RATE FROM PRODUCT_HGA_SALES_DETAILS WHERE PRODUCT_NAME = SHGA.PRODUCT_NAME)TAX_RATE,
(SELECT SUM(CGST_AMOUNT + SGST_AMOUNT) FROM PH_SALE_INV_HGA_DETAIL WHERE PRODUCT_NAME = SHGA.PRODUCT_NAME)TAX_AMT,
LINE_TOTAL NET_AMT
from
SALE_INV_HGA_DETAIL SHGA WHERE SHGA.BOOKING_ID = :P853_BOOKING_ID
UNION
select
APEX_ITEM.TEXT_FROM_LOV_QUERY(PRODUCT_NAME,'SELECT PRODUCT_NAME, ID FROM PRODUCT_MASTER') as PRODUCT,
NULL PART_NO,
VOUCHER_NO INV_NO,
QTY QTY,
RATE RATE,
BASIC_AMOUNT,'999999999.99') GROSS_AMT,
TAX_RATE,
(SELECT SUM(CGST_AMOUNT + SGST_AMOUNT) FROM SALE_INV_ACC_DETAIL WHERE PRODUCT_NAME = SNGA.PRODUCT_NAME)TAX_AMT,
LINE_TOTAL NET_AMT
from
SALE_INV_ACC_DETAIL SNGA WHERE SNGA.BOOKING_ID = :P853_BOOKING_ID;
begin
SELECT COMPANY_NAME INTO COMP FROM COMPANY;
SELECT ADDRESS INTO ADDR FROM COMPANY;
SELECT GSTIN INTO GSTIN FROM COMPANY;
SELECT TELEPHONE_NO INTO TEL FROM COMPANY;
htp.p('
<img class="logo-img" src="#APP_IMAGES#img-logo.png" alt="test" width="270"
height="70"></div>
');
htp.p('
<div align="center">
<h5 width: 320px; font-size:18px;" ><b>'||COMP||'<b></h5>
<h6 width: 90%; font-size:15px;" >'||ADDR||'<h6>
<h6 width: 320px; font-size:15px;" >TEL:'||TEL||'  GST No:'||GSTIN||'<h6></br>
</br>') ;
htp.p(
'
<table class ="DBDTL">
<caption style ="text-align=Center;" > </caption>
<thead>
<tr>
<th>Slno</th>
<th>Product</th>
<th>Part No</th>
<th>Inv No</th>
<th>Qty</th>
<th>Rate</th>
<th>Gross Amt</th>
<th>Tax Rate</th>
<th>Tax Amt</th>
<th>Net Amt</th>
</tr>
</thead>
'
);
for r_sale in c_sale
loop
n:=n+1;
htp.p(
'
<tbody>
<td>'||N||'</td>
<td>' || r_sale.PRODUCT || '</td>
<td>' || r_sale.PART_NO ||'</td>
<td>' || r_sale.INV_NO ||'</td>
<td>' || r_sale.QTY || '</td>
<td>' || r_sale.RATE || '</td>
<td>' || r_sale.GROSS_AMT || '</td>
<td>' || r_sale.TAX_RATE || '</td>
<td>' || r_sale.TAX_AMT || '</td>
<td>' || r_sale.NET_AMT || '</td>
</tr>
</tbody>
'
);
end
loop;
htp.p(
'
<tfoot>
<tr>
<td colspan="1">Total</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||NULL||'</td>
<td>'||null||'</td>
<td>'||V_NET||'</td>
</tr>
</tfoot>
</table>
'
);
htp.p('
<div align="left" margin-left:5em;>
<p><b>Declaration : </b>'||DECL||'</p>
</div>
');
htp.p (
' <style>
table {
font-family: "Helvetica Neue", Helvetica, sans-serif
}
.logo-img{
margin-left: 4%;
}
<table style="page-break-before: always">
</style>'
);
end;
Thanks in advance....
VARSHA
Any idea what i'm doing wrong
Vinish Kapoor
Try to replace your for loop as following:
It should break the page after 15 rows. You can change the 15 to any suitable number according to your page content.
VARSHA
I'm getting the print as above screenshot. what could be the mistake?
Here 'p' means 'Paragraph' right?
htp.p('<p style="page-break-before: always"></p>');
Vinish Kapoor
yes it is.
Vinish Kapoor
Try this only:
A little change.
VARSHA
I changed the number to 10 in 'if condition' but next rows are not printing in 2nd page.
VARSHA
This is how it is printing
VARSHA
Is this because it is a Modal Dialog page
Shashank
Yes, I faced the same problem on printing the poped-up page.
Try print-friendly.
( do use the page break as Vinish had suggested)
VARSHA
Thank you for the reply Shashank
Can you please suggest me how to use print-friendly
Shashank
There might be some other solution to this but this is what I did in my project.
You currently have a page mode as Modal Dialog right? Use Normal instead.
and just below that, you'll get an option for Printer Friendly under Page Template.
VARSHA
I'm using APEX 20.2 , there is no such option called Printer Friendly in page template
VARSHA
Which version are you using?
VARSHA
Still i did't find the solution..
Please suggest me any idea
This isn't an APEX issue.
If we need to break the print page, we can set a breakpoint to achieve it.
Where ever you want to break the page put one element. i.e.
CSS code
VARSHA
Thank you for the reply
I added the above code but still the page is not breaking.
If i use page mode as Normal below is the image how it is printing
VARSHA
Any idea, why it is not printing properly
Please suggest me ...