HTML TABLE OUTPUT FORMAT
Hello,
I have a DB containing PROJECT NAME, DVDNAME (ex. C1345, F234, G4576) and the FILES on the DVD.
In my page result, I want the list of the DVD from a project with the following formatting ( 7 columns table), using PL/SQL.
1 DVD can contain from 5000 files
Ex:
select DVDNAME, FILENAME fromTABLE where project = 2
*DVD NAME: C1345*
12.txt 13.txt 15.txt 16.txt 17.txt 18.txt 19.txt
22.txt 24.txt 26.txt 27.txt 28.txt 29.txt 31.txt
32.txt 33.txt 36.txt 37.txt 39.txt 42.txt 45.txt
44.txt 45.txt 47.txt 49.txt 55.txt 57.txt 59.txt
61.txt 63.txt 64.txt 66.txt 68.txt 69.txt 70.txt
71.txt 73.txt 75.txt 77.txt 78.txt 79.txt 80.txt
81.txt 82.txt 83.txt 85.txt 86.txt 88.txt 89.txt
93.txt 95.txt 97.txt 99.txt
*DVD NAME: C2334*
112.txt 113.txt 115.txt 116.txt 117.txt 118.txt 119.txt
122.txt 124.txt 126.txt 127.txt 218.txt 219.txt 311.txt
132.txt 133.txt 136.txt 137.txt 319.txt 412.txt 415.txt
144.txt 145.txt 147.txt 149.txt 155.txt 517.txt 519.txt
161.txt 163.txt 164.txt 166.txt 168.txt 619.txt 710.txt
171.txt 173.txt 175.txt 177.txt 178.txt 719.txt 810.txt
181.txt 182.txt 183.txt 185.txt 186.txt 818.txt 819.txt
193.txt 195.txt 197.txt 1 99.txt
HOW can I modify my code to have the result needed? I have only a 1 row table with the DVDTITLE repeating...
BEGIN
htp.p('<HTML>');
htp.p('<HEAD>');
htp.p('<TITLE>DISQUES C</TITLE>');
htp.p('</HEAD>');
htp.p('<BODY>');
for idx in (select DVDNAME, FILENAME fromTABLE where project = 2 )loop
htp.p('<TABLE>');
htp.p('<TR>');
htp.p('<TD>'||idx.DVDNAME||' </TD> ');
htp.p('</TR>');
htp.p('<TR>');
htp.p('<TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD> <TD>'||idx.FILENAME||' </TD>');
htp.p('</TR>');
htp.p('</TABLE>');
end loop;
htp.p('</BODY>');
htp.p('</HTML>');
end;thanks,
Roseline
Application Express 3.1.2.00.02
Oracle 11g
I want to list the DVD and his content who are related to a project X. Each DVD and content must be in a different table.
This table must have 7 columns. The problem with the following code that I have show all the file in a single row for all the DVD content.
How can I modify it?
The query:
SELECT Id, DVD_ID,NomFichier,PROJET_ID FROM elements where PROJET_ID =1Wanted output
DVD 85
2635080 2636608 2637084 2637091 2637092 2637093 2637147
2637152 2637153 2637154 2637155 2637156 2637157 2637164
2637169 2637170 2637172 2637173 2637202 2637203 2637213
2637214 2637215 2637216 2637218 2637217 2637219 2637220
DVD 86
2639497 2639498 2639502 2639504 2639505 2639506
2639508 2639509 2639511 2639512 2639519 2639521 2639522
2639523 2639525 2639527 2639530 2639542 2639543 2639552
2639553 2639554 2639555 2639559 2639560 2639561 2639563
2639564 2639565 2639567 2639574 2639575 2639578 2639579
DVD 87
2641806 2641807 2641808 2641809 2641810 2641819
2641821 2641824 2641827 2641828 2641830 2641831
2641834 2641838 2641839 2641846 2641847 2641849
2641851 2641852 2641853 2641854 2641855 2641863
etc...Current output
87
2641806 2641807 2641808 2641809 2641810 2641819 2641820 2641821 2641824 2641827 2641828 2641830 2641831 2641832 2641834
88
2644294 2644297 2644299 2644300 2644303 2644304 2644308 2644309 2644311 2644316 2644318 2644319 2644320 2644322 2644323 What someone suggest it?URL http://www.developpez.net/forums/d865203/bases-donnees/oracle/pl-sql/html-affichage-tableaux-conditions/[URL]
DECLARE
vtemp varchar2(4000) DEFAULT ' ';
BEGIN
htp.p('<HTML>');
htp.p('<HEAD>');
htp.p('<TITLE>DISQUES C</TITLE>');
htp.p('</HEAD>');
htp.p('<BODY>');
FOR idx IN
SELECT DVD_ID, NomFichier,
row_number() over(partition BY DVD_ID ORDER BY NomFichier ASC) AS rna,
row_number() over(partition BY DVD_ID ORDER BY NomFichier DESC) AS rnd
FROM elements
WHERE PROJET_ID = 1
ORDER BY DVD_ID ASC, rna ASC
loop
IF idx.rna = 1
then
htp.p('<TABLE>');
htp.p('<TR>');
htp.p('<TD>' || idx.DVD_ID ||' </TD> ');
htp.p('</TR>');
htp.p('<TR>');
end IF;
vtemp := vtemp || '<TD>' || idx.NomFichier || ' </TD>';
IF mod(idx.rna, 7) = 0 OR idx.rnd = 1
then
htp.p(vtemp);
vtemp := ' ';
end IF;
IF idx.rnd = 1
then
htp.p('</TR>');
htp.p('</TABLE>');
end IF;
end loop;
htp.p('</BODY>');
htp.p('</HTML>');
end;thanks
Roseline
Edited by: Roseline on 19 janv. 2010 10:25
Similar Messages
-
Want text input containing HTML tags to appear as HTML in output format
Hi,
We have a table in Oracle database that has a column named detail,one of its values is like this: <bold><italics>Good Morning</italics></bold>. What our client wants is that the output format should show: <b><i>Good Morning</b></i>. That is,Bi Publisher should be able to parse the HTML tags and provide the desired output. Please tell me how to achieve this. Any help is much appreciated.
Thanks and regards,
Debarati,
[email protected]Hi,
have a look here (http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html) to get an idea.
regards
Rainer -
Urgent : Display logo in Smartform with XSF+ HTML as Output Format
Hi,
Through the Portal we are displaying ESS Salary Statement of a Employee for last 24 monthys in the iView using the Customized Smartform ZHR_ESS_PAYSLIP_TO_PDF which is copy of Standard Smartform HR_ESS_PAYSLIP_TO_PDF .
Requirement is that we have to change the Output Option to "XSF+HTML" and Display a logo at Top-Middle of the form.
But the problem is that Logo is only visible only when Output Option is "Standard Output". and not visible when Output Option is "XSF+HTML".
Please tell me how to display the Logo in the Smartform so that it is visible in "XSF+HTML" or "XSF" as Output Option.
Asnwers will be suitably rewarded.
Thanks,
Ajay JangidHi Ajay,
Following threads may help you
Smartforms to Xsf & Html format
/message/1484753#1484753 [original link is broken]
Regards,
Manoj -
Is html/pdf output format from BO 508 compliant?
Hi Experts -
I heard BO reporting tool can output html/pdf format. Are they 508 compliant? If not, how can I make them into 508 compliant please advice.
ThanksHi
You can make it 508 complaint by choosing/check marking this option from BusinessObjects InfoView > Preferences > Webi > 508 Complaint.
Please note that this forum is not the right area to discuss BO technical questions.
Raise your future queries at: SAP BusinessObjects Web Intelligence
Hope this helps.
Best,
DeepB -
How can i set permanent neat output format
Hello Experts ;
Good Evening !
Always i a, having problem with table output format.
please provide permanent solution for neat output.
i am not asking for following output. i need permanent solution because every i have to adjust axx to a 99;
My emp table output looks like following below
SQL> column econtact_no format a55;
SQL> /
EID ENAME EQUAL ESALARY ECITY EPERK
ECONTACT_NO
1 sona mba 10000 xxxxxxx
2 maya mca 15000 xxxxxx
Thanks !Hi,
It looks like you're asking about formatting done by the front end. How to control that depends on your front end, so say what front end you're using. (This forum is supposed to be for SQL and PL/SQL language questions, so this may not be the best place to ask this question.)
It looks like you might be using SQL*Plus as your front end. As far as I know, the default column formats can't actually be changed in any version of SQL*Plus, but you can put changes into LOGIN.SQL scripts, that get run automatically whenever you start a SQL*Plus session, and that may be just as good for your purposes. -
How do you write an output in columns to an html table?
Ive written two programs. My first program compares the difference of two text files and prints the differences in an output. My second program creates a simple Html table. I would like to write my output to this table. How would I go about doing this in java?
Thanks in advance for your help.Thanks guys for the insight. Im very new to java so I'm a complete novice when it comes to writing code. What I came to realize was I needed to do was build a dynamic table. My issue was that I was building a static table and I couldint populate the table with my results. Below is an example of the code I wrote for my table. My apologies if didnt format my code correctly.
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Set;
public class HtmlDataTable {
public void writehtmltable(Set<String> filenameSet){
//creates table in the following path
File htmltable = new File("C:/Output.html");
try {
BufferedWriter bw = new BufferedWriter(new FileWriter(htmltable));
//write html data table
bw.write(htmltop);
for (String jarfilename:filenameSet){
String line="<tr> <td> </td> <td> </td> </td> <td>"+jarfilename + " </tr>";
bw.write(line);
bw.write(htmlbottom);
//close the resource
bw.close();
} catch (IOException e) {
e.printStackTrace();
private static String htmltop = "<!DOCTYPE html>\n"+
"<html>\n"+
"<head>"+
"<title>Jar Filename Existance Check</title>"+
"<style>"+
"table, th, td {"+
" border: 2px solid black;"+
"}"+
"</style>"+
"</head>"+
"<body>"+
"<table>\n"+
" <tr> <th colspan='100'>" +
"<h3><br>Jarfilename Existance Check</h3> </th> </tr>" +
"<th>POM File Data</th> <th>Lib Directory Files</th> <th>Missing Jarfiles</th>";
private static String htmlbottom = "</table></body></html>";
public static void main(String[] args) {
new HtmlDataTable().writehtmltable(null); -
HTML table containing SQL output in cells
Hello,
This might be a built-in function, but I haven't figured out how to do this: I want to display an HTML table (2x3 table) and in each cell, I want to display the output from different SQL statements. Some of the SQL statements return multiple rows, some just one. The cell data comes from unjoined tables, that is there is no join condition between each one of the cell SQL statements, it's a bit random.After much head-banging, I have worked this out and it came down to just changing 2 style definitions in the page template. I'm not really a Web developer so that wasn't obvious to me (or easy, I've read quite a bit on Google about stylesheets while working this).
Basically I wanted to display a 3x3 "grid", similar to a table, but the data coming out from the 3x3 regions (all SQL query regions) returned different numbers of rows, which meant my page "rows" didn't align horizontally, they were just rendered wherever the last region stopped (vertically they were rendered properly because I put the regions in Colums 1, 2 and 3, standard page functionality).
Eventually I started looking at the HTML page source and noticed the regions were using style defintions coming from my theme (standard APEX theme #12). I made a copy of the page template this page was using, and modified the header block of the new page template to "rewrite" the driving styles
<title>#TITLE#</title>
<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_12/theme_V3.css" type="text/css" />
<style type="text/css">
a.plain { font-family:arial; text-decoration:none}
td.t12Header {height=12px;font: italic small-caps 900 12px arial}
td.t12Body {background-image: url(#APP_IMAGES#lock.png);background-repeat: no-repeat;background-position: left top;vertical-align= middle;height= 250px}
</style>
...So I re-wrote the td (or table TD style) for t12Header and t12Body, by adding my own style definitions into the header after the call to the main css sheet. I also played around with putting a background image into each cell, I'll probably remove that but it was fun to explore.
This rendered my individual table cells (via td.t12Body) @ 250px (which as I've found out is otherwise not supported, there's no built-in TABLE spec for "height") -- exactly what I wanted, now all the regions render vertically and horizontally.
I did not test this with any browser other than IE7.
If you know an easier way to do this, please do post a follow-up. -
Hai..
In Classical Report , i'm getting the correct output format. While spooling in sm37, the report sent through mail in html format. In html format ,the output alignment is coming wrong. Plz hrlp to resovle this.
Regards,
P.Rajalakshmi.thanks
-
Convert internal table output to pdf format
Hi all,
my query is given below.
<removed by moderator>
i need to convert internal table output to Pdf. format
the Pdf file generating.
when i am opening the pdf. file shows error like there was an error opening this document . this file cannot be opened because it has no pages.
please help me.
thanks in advance.
Regards,
Karthikeyan Krishan
Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters each to preserve formatting.
Edited by: Thomas Zloch on Mar 30, 2011 12:57 PMHi,
Check this link where I send data in RAW format as attachment using cl_bcs.
Open PDF File stored in AL11 and send by email using CL_BCS.
Regards,
Ernesto -
Number formatting in HTML table
Hello All,
I have create a HTML table in my page, In that I have displayed values using hidden items on that page.
like this
<table>
<tr>
<td> &P17_ENAME.</td>
<td> &P17_SALARY.</td>
</tr>
</table>
I want to format the salary values in "$12,000" format. I have tried giving the format mask to those hidden fields but it still shows normal number only.
How to format these values?
ThanksAre you trying to show that HTML code in the same page that contains the items you want to show ?
if not then add a PLSQL process after submitting the first page as follows:
BEGIN
:P17_SALARY := LTRIM(TO_CHAR(:P17_SALARY,'$999,999.90'));
END;Sam
Edited by: Sam_06 on Aug 27, 2010 12:29 PM -
Excel issues with importing CSV or HTML table data from URL - Sharepoint? Office365?
Greetings,
We have a client who is having issues importing CSV or HTML table data as one would do using Excel's Web Query import from a reporting application. As the error message provided by Excel is unhelpful I'm reaching out to anyone who can help us begin to
troubleshoot problems affecting what is normal standard Excel functionality. I'd attach the error screenshot, but I can't because my account is not verified....needless to say it says "Microsoft Excel cannot access the file https://www.avantalytics.com/reporting_handler?func=wquery&format=csv&logid=XXXX&key=MD5
Where XXXX is a number and MD5 is an md5 code. The symptoms stated in the error message are:
- the file name or path does not exist
-The file is being used by another program
-The workbook you are trying to save has the same name as a currently open workbook.
None of these symptoms are the case, naturally. The user encountered this with Excel2010, she was then upgraded to Excel2013 and is still experiencing the same issue. The output of this URL in a browser (IE, Chrome, Firefox) is CSV data for the affected
user, so it is not a network connectivity issue. In our testing environment using both Excel2010 or 2013 this file is imported successfully, so we cannot replicate. The main difference I can determine between our test environment and the end-user
is they have a Sharepoint installation and appear to have Office365 as well.
So, my question might more appropriately be for Sharepoint or Office365 folks, but I can't be sure they're a culprit. Given this - does anyone have any knowledge of issues which might cause this with Sharepoint or Office365 integrated with
Excel and/or have suggestions for getting more information from Excel or Windows other than this error message? I've added the domain name as a trusted publisher in IE as I thought that might be the issue, but that hasn't solved anything. As you
can see its already https and there is no authentication or login - the md5 key is the authentication. The certificate for the application endpoint is valid and registered via GoDaddy CA.
I'm at a loss and would love some suggestions on things to check/try.
Thanks -RossHi Ross,
>> In our testing environment using both Excel 2010 and 2013 this file is imported successfully, so we cannot replicate.
I suspect it is caused by the difference of web server security settings.
KB: Error message when you use Web query to a secure Web page (HTTPS://) in Excel: "Unable to open"
Hope it will help.
By the way, this forum is mainly for discussing questions about Office Development (VSTO, VBA and Apps for Office .etc.). For Office products feature specific questions, you could consider posting them on
Office IT Pro forum or Microsoft Office Community.
Regards,
Jeffrey
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Hello,
we are trying to save the FM document as HTML using the built in save as functionality. The tables are exported, but no ruling/borders and straddling information is reflected in the output HTML.
Does anybody know if there is a way to make FM to export tables with formatting information or any tool that is able to do that?
Thanks in advance.
Best regards,
ViktorFM10.
I don't have FM10, and haven't tried HTML generation since FM6 or so, but anyone who can help needs to know the version.
but no ruling/borders and straddling information is reflected in the output HTML.
The FM10 on-line help says, in the Troubleshooting and tips on HTML conversion
Make sure the table formats you use have regular ruling lines defined for at least one body row. Otherwise, the HTML tables will have no lines around table cells.
I would expect straddles to be converted to spans, since HTML has attributes for that.
can you suggest some 3rd party sw?
I'm not sure that's necessary or desired. Earlier versions of Frame used WebWorks Publisher. HTML generation is now built in. I don't know if you can even get WWP for FM10, or if it would provide any features not standard in FM10. -
Source agent: FM 9.0p250, unstructured
Transformative agent: RH 8.0.2.208
OS: WinXP Pro V. 2002 SP3
CPU: Core2 Quad @ 2.4 GHz
RAM: 3.25 GB
Free Space: 12.6 GB
File Sys.: NTFS
Swap: D & E (system-managed)
Is anyone else experiencing problems with RH not correctly transforming FM figure and table titles? I can get most of my design to work, but I am having a problem with RH not following-through with some of my table title format and figure title format specifications.
I am having problems with RH not correctly applying, or inconsistently applying, figure title and table caption attributes ("Paragraph" settings) that I specify through Project Settings | Import | Edit | Conversion Settings.
For example (in FM Table Designer), I have a table title paragraph design, "TT.Table Title", in which I specify Title > Above Table, and specify a paragraph design (FM style) of Arial, 10pt, regular, bold, 0" indents, alignment left. It works fine direct to print or PDF; the same is true with figure titles.
In RH (through Project Settings | Import > Edit | Conversion Settings [FrameMaker Settings] > Paragraph), I specify that the FM style is to transform through an RH style that I define (through Edit Style button > Styles > Format > Paragraph). I set the alignment, etc., as is required through RH, but when I look at the Design view and/or generate the output (say...Webhelp), RH has not correctly interpreted one or more of my specification's attributes.
For example, in the case of my table titles, in Design view, RH has centered the title (or in RH terms, the ''Caption") above the table. Or sometimes the bold attribute is missing. In Project Manager, if I right-click and select View, the title/caption sometimes appears as specified; however, if I Generate the WebHelp (or HTML Help, or whatever), the bold formatting isn't there.
I thought that maybe RH defaulted figure and table titles to a Caption, as that is what it calls that part in the Design view. But when I set Caption to my specs, it made no difference.
Any thoughts?
Thanks in advance!I may be off at a tangent here as this is a wild guess.
HTML recognises Table Heading and Table Text, RH does not recognise the Table Heading selector. Maybe with your knowledge of FM's table caption and that tidbit of information, you can change something in your FM table to avoid the problem, if indeed there is a link.
See www.grainge.org for RoboHelp and Authoring tips
Follow me @petergrainge -
Export to excel with javascript/vbscript or with plsql(html table)
i have searched for a way to export data from OracleXe to excel without losing formatting .
So far i have found 2 possible relatively easy ways that i am still researching
(i do not include the ask tom sylk format way of exporting )
1 to export the query to a html table, while using stylesheets for formatting
(using microsoft specific styles)
2. use of javascript/vbscript to fill an array and write this array to excel with use
of visual basic for applications in excel.This also provides charting capabilities.
I am still researching this two ways, and have
encountered a few obstacles (help would be appreciated)
1 the first way:
a. create a button " export to excel"
b. create the following pl/sql procedure:
owa_util.mime_header('application/vnd.ms-excel');
owa_util.http_header_close;
HTP.PRINT('<html>');
HTP.PRINT('<head>');
HTP.PRINT('<meta http-equiv="Content-Type" content="text/html">');
HTP.PRINT('<title>Title of the HTML File</title>');
HTP.PRINT('</head>');
HTP.PRINT('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
HTP.PRINT('<h1>Heading in the HTML File</h1>');
HTP.PRINT('<p>Some text in the HTML file.');
HTP.PRINT('</body>');
HTP.PRINT('</html>');
htmldb_application.g_page_text_generated := true;
htmldb_application.g_unrecoverable_error := true;
c: run the procedure conditionally based on the button "export to excel"
the problem with this way is that using htmldb_application.g_unrecoverable_error := true; is not the ideal way, because it
stops further processing, but if i leave it out, the export doesn't happen.
To export to excel while retaining data formatting you have to use microsoft excel
specific styles(Seedocumentation on the microsoft site)
2.The second way:
a create a pl/sql procedure or sql query.
b use this query to fill a vbscript/javascript array with values
c write these values to excel with use of vba in excel :
the obstacle i encountered here was that i dont know how to export the result of a
query to a visual basic script or javascript array.Using approach 1) works fine for me.
the problem with this way is that using htmldb_application.g_unrecoverable_error := true;
is not the ideal way, because it
stops further processing, but if i leave it out, the export doesn't happen. Why is this a problem?
I created the button to export the excel file on page 1 and created your pl/sql procedure on page 2 using an onload process.
Works fine.
Other approaches for exporting to excel are:
http://www.oracle.com/technology/pub/articles/saternos_broadcast.html
http://htmldb.oracle.com/pls/otn/f?p=18326:54:5685133631021176591::::P54_ID:1962
~Dietmar. -
Problem with Excel output format
Hi Guys,
I am creating a report in XML Publisher (not standalone). I am facing some problems could anyone please help me to figure out the issues.
Is it possible to have all three output format (PDF, HTML & EXCEL) exact (same aligned) only by creating a single RTF Template? I am facing the problem with Excel output format the output format of excel is taking excels cell formatting.
Example Numeric fields --> Right Aligned, text fields --> Left Aligned
One more issue with excel is -ve(negative) values are getting displayed in red and in brackets like ($13) (with red color).
Our client want excel output on priority.
Is there any limitation for excel output format of reports?
It is very urgent for us please help.
Any help would be highly appreciated.
Thanks,
Pragati
Edited by: user11237443 on Aug 27, 2009 1:22 AMHi Mahi,
Thanks for your response. But i could not understand how can we write wrapper program could you please give some light on this or provide some link it would be helpful for me:-)
I have read that blog for excel limitations but i have more question?
1) What about the negative values?
if any field is displaying negative amount then excel not displaying right value for that:(
2)How can we align header or data?
Do XMLP with EBS provide any solution for formatting in excel?
3) If for the alignment of numeric value we concatenate them with any special character then how can we perform calculation that field?
Here are so many formatting issues do we need to write any code in xml for that?
Please help.
Many Thanks,
Pragati
Maybe you are looking for
-
Hi everyone, From Windows XP with Bootcamp 3.0, I can't access my Mac users files whereas I can access folders being at the root of the Mac OS partition. Size mismatch? (my windows partition's size is 32 go and my users folder is much larger) Thanks
-
Where does the preference list for Safari reside
The Safari I use on my MBP 10 on this computer works like a charm (knock on wood) but on my MBP 07 it can not even remember how to open a local file when it loads and regardless of how many different thing I have tried it refuses to remember the pref
-
JMS message content / Which is better?
hi all, i am a beginner with JMS. i have tried some examples, and now i would like to build my own application using JMS. Now, i have to face the issue of the message type 2 carry: - String - Java Object Once i read somewhere that in JMS is recommend
-
Iweb Publishing via FTP -- can't change the site
I am updating a site built in iWeb, now using v. 3.0.4 It has always been hosted externally and I upload using the FTP in iWeb. I made some updates today (principally to add a link to a Facebook page). I republished the entire thing (it's only two pa
-
Show a picture in a front panel
Hello All, I want to display a image (that is in another front panel) when i press a buttom in the main front panel. Then I want to close the image clicking in a buttom in the second panel and return to the fist front panel. I don´t know how to do it