This content has been marked as final. Show 5 replies
You could have a pl/sql region with code like:
That would send the html code to your browser for display.. However you might want to confirm that the HTML being produced is valid..
begin htp.p(:P2_HTML); end;
1 person found this helpful
KylePN wrote:Hopefully that's just poorly chosen sample HTML? APEX page templates already include those elements. Trying to output a complete HTML document inside an APEX page generally results in a mangled, inoperative mess.
To understand the question, I have a table storing generated HTML by user and report type:
USER | REPORT_TYPE | HTML_GENERATED ----------------------------------------------------------------------------------------| TEST_USER | TEST | <HTML><head><title></title></head><BODY>TEST</BODY></HTML> |
On the page exists a process using a PL/SQL anonymous block which is set to "On Load Before Header". Here is a portion of it:In APEX it's not necessarily a good idea. Why use this approach rather than existing APEX features?
The idea is to generate all the HTML behind the scenes in another package.
SELECT HTML_GENERATED into :P2_HTML from LN_DOCUMENT_LABELS where USER = :app_user AND REPORT_TYPE = 'TEST';
There exists a single Item on the page to store the variable into:Hidden page items these will always be escaped when referenced as static text substitution strings. (You may indeed have done this in previous versions of APEX at some point in the past, but there have been incremental restrictions introduced in several recent APEX versions.)
Then I created an HTML region, and within that region I wanted to call in the item so I entered:
The result simply displays the HTML code:
Is there a way to force it to be the result of HTML code when the page renders?
Instead of a hidden page item, use an application item, or a Display Only page item with display Condition set to Never.
That would definitely work instead. Thank you.
My HTML example was basically a blank shell to get the point across. I need to develop a packing slip or order acknowledgment, and currently using the built in interactive reports and current region options everything looked awful. They want a specific look to the document, and I figured I could do this in html if I could find a way to insert the data. I can do this with what I outlined originally, but am open to any option that is better long term. Can you recommend other options to get the look and feel of a professional document?
Create an RTF file and let them upload it after manipulating it in Word? Use Ireports and PL-jrxml2pdf to build and display a pdf style report? (link to product: http://sourceforge.net/p/pljrxml2pdf/wiki/Home/)1 person found this helpful