How To Use a css File To Watermark A Report

Hello.
I am using Apex 4.0.1 and have a need to place a watermark (that is, a background image) over a report, both a "classic" type and Interactive Report.
I have two questions about this.
1) I've searched this Forum and found several good questions/responses about this subject. What I think is the most maintainable solution is to create a .css file and reference this file within the Template section of a copy of, say, the "Reports Region" template used by my application theme. And so, I made a copy of the "Reports Region" template and called it "Watermark Reports Region". I then created a very simple .css file called "bgimg.css" defined as:
#REGION_STATIC_ID# {
background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
background-repeat: repeat !important;
background-attachment: fixed !important;
Note: For those that may not know, the "!important" clause is, in fact, a css defined clause used to tell the browser that it should give the associated option the highest precedence. This prevents my desired css option from being overridden by another css file. Frankly, I myself did not know this until after I saw it being used in several of the responses on this Forum and then read up about it.
I uploaded this css file via the Apex "Shared Components -> Cascading Style Sheets" option. I also made sure that menu_bug.png is, in fact, among my workspace images.
I also made sure that my "Watermark Reports Region" template contains the substitution variable "REGION_STATIC_ID" and that my actual report region has a value in the Region Static Id field.
Within my "Watermark Reports Region" template, I tried to reference my .css file. This is where I think my problem is.
I placed
<link rel="stylesheet" type="text/css" href="#WORKSPACE_IMAGES#bgimg.css" />
at the very top of the Template section in my "Watermark Reports Region" template.
I then assigned my template to my Apex report. When I run my report, I see nothing.
So, how does one reference this css file within the template?
=================================================
2) I tried using my css tags as an internal style by placing it within the "HTML Header" section of my application page. I used:
<style type="text/css">
#empreport {
background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
background-repeat: repeat !important;
background-attachment: fixed !important;
</style>
I assigned a div tag to my report region header and footer that looks like:
In Header: <div id="empreport">
In Footer: </div>
When I run the report, I do get the image. But it is surrounding the report. It looks like my report is "floating" in a sea of bug images.
So, how can I get these images to actually appear within the report itself. In other words, I want the report itself to be "transparent" so as to allow these images to be seen within the report body itself.
Thank you all for any help/advice/code example.
Elie

Elie
Thanks for taking the time to post sufficient information to understand the problem. In future if you're going to such efforts you might want to use them to reproduce the problem on apex.oracle.com, which means you can share actual working (or more likely not working!) code. Please also always wrap code posted on the forum in tags<tt>\...\</tt> tags to preserve formatting and special characters.
>
I placed
<link rel="stylesheet" type="text/css" href="#WORKSPACE_IMAGES#bgimg.css" />
at the very top of the Template section in my "Watermark Reports Region" template.
>
According to the relevant HTML 4.01 and XHTML 1.x standards, <tt>style</tt> and <tt>link rel="stylesheet"</tt> elements should only appear within the <tt>head</tt> element of a document.
This changes in HTML5. The new <tt>scoped</tt> attribute allows <tt>style</tt> to be used in a prescribed way elsewhere in the document, with the effect that the styling rules specified are only to be applied to the other descendant elements of that <tt>style</tt> element's parent (in the way you're trying to do here). I'd expect <tt>link</tt> with a <tt>rel="stylesheet"</tt> to remain restricted to <tt>head</tt> content in HTML5: off the top of my head I can't see a use case for referencing external stylesheets in a non-metadata context.
That said, current browsers apply CSS regardless of where in the document it appears, and future HTML5-compliant ones will continue to continue to do so for backwards compatibility. For myself, when using XHTML 1.0 I'll continue to follow the only put <tt>style</tt> and <tt>link</tt> elements in the page <tt>head</tt>. When I get round to using HTML5 for real I'll follow the standards for that as well.
I strongly recommend that you follow the standards and only put <tt>link rel="stylesheet"</tt> elements in the page <tt>head</tt>.
>
Note: For those that may not know, the "!important" clause is, in fact, a css defined clause used to tell the browser that it should give the associated option the highest precedence. This prevents my desired css option from being overridden by another css file. Frankly, I myself did not know this until after I saw it being used in several of the responses on this Forum and then read up about it.
>
Use <tt>!important</tt> only where it's actually needed. It's over-represented in this forum because Oracle changed the order of style sheet inclusion in APEX 4.0 and made it more difficult to override theme styles using CSS in the page HTML Header without modifying page templates.
Try your styles initially without using <tt>!important</tt>, and also consider using the cascade to provide any necessary overrides by including your CSS after other style sheets.
>
I then created a very simple .css file called "bgimg.css" defined as:
#REGION_STATIC_ID# {
background-image: url(#WORKSPACE_IMAGES#menu_bug.png) !important;
background-repeat: repeat !important;
background-attachment: fixed !important;
I then assigned my template to my Apex report. When I run my report, I see nothing.
>
Because <tt>#WORKSPACE_IMAGES#</tt> is not substituted in external CSS files: +{thread:id=986329}+
If possible it's much better to locate image, CSS and JavaScript files externally on the file system. Otherwise you'll have to use the workaround suggested in that thread and include a <tt>style</tt> element in the page templates to specify the background image.
When I run the report, I do get the image. But it is surrounding the report. It looks like my report is "floating" in a sea of bug images.Reports are descendants of their region containers and may be subject to additional built-in or theme styles that overrides that specified for the region. Your CSS selector has to specify the report element, not the entire region.
So, how can I get these images to actually appear within the report itself. In other words, I want the report itself to be "transparent" so as to allow these images to be seen within the report body itself.I'd use a <tt>class</tt> attribute in the region template: this removes the need to use the <tt>#REGION_STATIC_ID#</tt> selector, and allows the CSS to go in the page <tt>head</tt> where it belongs. Add <tt>watermark-report-region</tt> in addition to any existing <tt>class</tt> values in the region template:
<div class="borderless-region watermark-report-region" id="#REGION_STATIC_ID#" #REGION_ATTRIBUTES#>
  <div class="bl-body">#BODY#</div>
</div>You may have to inspect the page source (use a web inspector like that found in Safari, or the Firefox+Firebug combo) to figure out what has to be overridden in the theme/templates you're using. This worked for an Interactive Report using theme 17:
.watermark-report-region .apexir_WORKSHEET_DATA {
  background: #fff url(/i/menu/blank_app_32.gif);
.watermark-report-region .apexir_WORKSHEET_DATA tr.even td,
.watermark-report-region .apexir_WORKSHEET_DATA tr.odd td {
  background-color: transparent;
}For a standard report you'll need to identify the selector required for the actual report element (equivalent to the <tt>apexir_WORKSHEET_DATA</tt> table) using the web inspector or from the report template. It would be a good idea to create standard report template(s) incorporating a <tt>watermark-report</tt> class on the report table to provide a simple selector for such reports.

Similar Messages

  • How to use a CSS file  in a jspx page..

    I'm using JDev 10.1.3.4.
    I would like to know how can i use a CSS file in a JSPX page..
    there is this file: public_html\WEB-INF\temp\adf\styles\cache\oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css
    How do I make use of this is my jspx page?
    Also how do i use the style class in property inspector?
    What should be the path of "oracle-desktop-10_1_3_4_0-en-ie-6-windows-s.css"?
    Also please tell me what changes I have to make in all the other files like web.xml or adf-faces-config.xml.
    Im using web application template using (EJB,Toplink and JSF)
    Please suggest the detailed steps as I'm new to JSF.
    Thanks ,
    Shri

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How to use multiple video files??

    hi all,
    i am using flex 4 ...
    now i have designed video player..
    i used single flv file for execution..
    how to use more flv files in tis program???
    i have included program also..
    can any one reply for this...
    thanks in advance...
    regards,
    saran r
    video.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()" height="700" >
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import mx.core.UIComponent;
                import flash.events.NetStatusEvent;
                import flash.media.Video;
                import flash.net.NetConnection;
                import flash.net.NetStream;
                private var nc:NetConnection;
                private var stream:NetStream;
                public var videoDuration:Number;
                public var nsClient:Object = new Object();
                private var videoComp:Video = new Video();
                private var meta:Object = new Object();
                private var timer:Timer = new Timer(100);
                private var uiComp:UIComponent = new UIComponent();
                private function init():void
                    nc = new NetConnection();
                    nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    nc.connect("rtmp://localhost/saran");                 
                    this.addElement(uiComp);
                    uiComp.addChild(videoComp);
                    timer.addEventListener(TimerEvent.TIMER,timerHandler);
                    timer.start();
                private function netStatusHandler(event:NetStatusEvent):void
                    trace("Code ===>>>    "+event.info.code);
                    if(event.info.code == "NetConnection.Connect.Success")
                        connectStream(nc);
                private function connectStream(nc:NetConnection):void {
                    stream = new NetStream(nc);
                    videoComp.attachNetStream(stream);
                    stream.play("Terminator")
                    // stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                    stream.client = nsClient//new CustomClient();
                    nsClient.onMetaData = metadataHandler;
                    trace("stream ===>>>    "+stream.currentFPS);
                    //responder = new Responder(onResult);
                    // nc.call("getStreamLength", responder, "bikes" );
                private function metadataHandler(metadataObj:Object):void
                    meta = metadataObj;
                    videoComp.width = metadataObj.width;
                    videoComp.height = metadataObj.height;
                    //positionBar.move(videoComp.x, ((videoComp.y + videoComp.height)+20));
                    //positionBar.width = videoComp.width;
                    trace("Duration ====>>>>   "+meta.duration);
                private function timerHandler(event:TimerEvent):void
                    //trace("Timer called.........."+stream.time);
                    //positionBar.setProgress(stream.time, meta.duration);
            ]]>
        </fx:Script>
    </s:Application>

    I have the same question but I am using two pc's

  • How to use a key file in the FTP Task using and SSL connection

    In the past I have used this code to set the FTP pass word in an FTP component task in SSIS.
    Does anyone know how to use a Key file in an SSL connection to download a file from an FTP site?  If not can you tell me where I can get the C# code examples to learn how to create a script task or if there is another way in SSIS to download large files
    from an SSL FTP site?  Thank you for any help offered.
    public void Main()
    ConnectionManager FTPConn;
    FTPConn = Dts.Connections["FTPServer"];
    FTPConn.Properties["ServerPassword"].SetValue(FTPConn, Dts.Variables["FTPPassword"].Value);
    Dts.TaskResult = (int)ScriptResults.Success;
    Antonio

    You can use SFTP for this.
    This is a way of implementing SFTP in SSIS using standard tasks 
    http://visakhm.blogspot.in/2012/12/implementing-dynamic-secure-ftp-process.html
    also see
    http://blog.goanywheremft.com/2011/10/20/sftp-ftps-secure-ftp-transfers/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to use my as3 file in flex

    hi, I am new in flex and want to divert into flex. How to  use my as3 file into flex. Is there any sample tutor . so, that I could learn fast.

    Please clarify. Is this .as file a class you previously used as a complonentcomponent you now wish to use as the main application?
    If the .as file just has variables and functions you wish to access from your Flex app, use:
    include "subfolder1/subfolder2/etc/MyASFile.as";
    If you want to use classes from the file, do this:
    import subfolder1.subfolder2.etc.MyClassName;
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • How to modify & use Printer Defination files for Character Mode Report

    How can use & modify printer defination files for changing formats & orientation in character mode report. I donot know how to use printer defination files I tried to set the system parameter (Desformat) but it doesn't work.

    I m also faced same problem that u face,
    If u want to make character mode report so plz follow these instructions:
    1. Set the properties of Report Name Node in Character Cell is Yes.
    2. Change the mode of the System Parameter Mode is Character.
    3. Goto the Layout---> Main Section Properties and set the Character Report Width and Height like 132 and 66
    4. Create Formula Column and write this code "RETURN(CHR(14));"
    5. Goto Layout Model and map this formula column into Header of the Body Like If ur Company Name is "ABC COMPANY" attached with field and map Formula Column.
    5. Goto Printer Definition File DFLT.prt open in NotePad and set width and hieght that u set in Main Section of Report.
    6. At Last u Run the Report with Some System Parameter or User Parameter and View as Character Mode Report.
    In My Case I used EPSON LQ2180 Printer
    So, U Ask More Qustion and u have more knowledge About character mode report Plz Mail me at this address.
    Shahid Shafi
    [email protected]

  • How to call the css file and its images from our application......

    hai,
    Im uploading a .css file and some images in Apex shared components ,now how to call the css file and images from my Application.... plz tell me detailed.....
    Edited by: anoo on Nov 3, 2008 12:51 AM

    Hi Anoo,
    Sorry, didn't see that you'd started a new thread, so have answered this in 'undefined' is null (or) not an object "
    Andy

  • Is it possible to use multiple css files in epub?

    For fixed layout I would like to use multiple css files.
    Is it allowed  by apple requirements?

    Yes. ePub suports multiple CSS files and therefore so does Apple iBooks.

  • How to link a css file in the xsl file

    Hi
               I would like to know how to include link to my .css file in my .xsl file.
    The scenario here is I want include a background color in my ShowForm.I am trying to do the same using css.
    This is the code snippet in my css file
    .outerbody {
         background-color: B1C1CF;
    This is how I tried to include a link in my xsl file
    <link href="/irj/go/km/docs/Testing/MyNewsDemo/css_test.css" type=text/css rel=stylesheet>

    Hi
              Thanks a lot. It would be very helpful if you send me an example.
    As of now I have found a solution,I would like to share it here.
    I added a link to my css file in xsl:
    <link rel="stylesheet" type="text/css" href="/irj/go/km/docs/Testing/MyNewsDemo/css_test.css">
    </link>
    I replaced the standard class name "body" with my class name "outerbody" specified in the css file.
    <body class="outerbody">
    Edited by: SRIVIDHYA RAGHUNATH on Feb 25, 2009 11:19 AM

  • Use css file in oracle 10g report builder

    hi every one
    i am using oracle 10g report buidler. i want control paramform by usign css file.
    any body have idea how can i use css file in oracle report builder 10g and how can i modify it's path and i how can i manage any css class on a perticular field.

    Thanks Billy.
    Yes you are right.
    Here why I discarded that option is,
    I may get the source files with changing layouts.
    My Actual scenario is as follows.
    Initially we developped all the things using PL/SQL packages. Its working fine.
    But as per the inputs we received from requirements group, the file structure changes dynamically. and we would able to consider those new columns also. We should be able to changes the rules dynamically.
    Lets say, we doing fullouter join on Src_A and Src_B. on columns col1_A and col1_B.
    Now the requirement changes in a way that, the join should be done on Src_A and Src_C. on columns col1_A and col_C.
    For this I need to define a new package.
    Instead of that, I would like to do everything dynamically based on configuration parameters given as input.
    Thank you,
    Regards,
    Gowtham Sen

  • How to use an .xsl file to transform input XML to re-formatted output XML?

    Hello,
    I have a .xml file from a report that I want to use a stylesheet to transform into a different .xml format.
    I am reading that I can create a .xsl file to read my input and then transform it to a new output .xml file.
    How do I load this into the Apps?
    I tried creating a template definition and loading the .xsl in as type 'XSL-TEXT' and also, I added
    <?xml-stylesheet type="text/xsl" href="Transform.xsl"?> to my xml data source. The output looked the same as the input.
    Has anyone done this before? Any suggestions would be great!
    Thanks
    -CC

    This is how I use e4x with HTTPService:
    import mx.collections.XMLListCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable] private var claimsXLC:XMLListCollection;
    private function claimsHandler(evt:ResultEvent):void{
        claimsXLC = new XMLListCollection(evt.result..claim as XMLList);
    XML data is being returned, but I use XMLList to create the XMLListCollection.
    If this post answers your question or helps, please mark it as such.

  • How to use a excel file to create a service component?

    Dear all,
       I want to use a excel file to create a service to be my data source. I used the wizard to do that but i always got a message. "The data format is not valid, fields in each record must be delimited by tab charactors, and each record seperated by new line charactors". How should I reformat my excel file to fit the requirements? I have already chang the field`s format into 'text' type. Thx ^^

    Hi Louis,
    [Here|http://img125.imageshack.us/my.php?image=exceltestlo7.jpg] is the result of your data.  I downloaded your excel sheet and created a simulated service in 7.1.1 and it works fine.
    Below are the steps:
    1. Go to Tools -> service component wizard
    2. The popup opens : Step1 :  Enter the name of your service component
    3. Go to Excel spreadsheet Copy the data for which the service needs to be created.
    4. Step 2 : Paste the copied Excel data in the popup
    5. Step 3 : Define Input -> just click next
    6. Step 4: Define Conditions -> just click finish.
    Let me know if it helps.
    Good Luck,
    Dharmi

  • Jquery mobile - how to create multiple CSS files?

    I've been researching this heavily, and can't seem to find anyone discuss this. I'm a CS4 user, and understand 5.5 now includes builtin support for jquery mobile. I've watched the videos on how you set the sizes for phone, tablet, desktop, point each to the appropriate CSS file. Great, wonderful.
    However, nobody is discussing how you get the three separate CSS files!  I want to add a mobile version of an existing site. I have just the one .css file. How do I make the other 2 .css files? Do I duplicate the desktop file, and start somehow altering each item? Is there some type of automatic system to tweak the main .css file?
    Seems like this step is critical. Any insights?

    I built this page with CSS Media Queries.  If you resize viewport to less than 480px, it changes layouts.
    http://alt-web.com/TEMPLATES/CSS-centered-round-boxes.shtml
    I made the Desktop.css first.
    http://alt-web.com/Styles/Desktop.css
    Then I removed the Desktop.css link from my HTML document and replaced it with the iphone.css link. 
    http://alt-web.com/Styles/iphone.css
    After fine tuning the iphone layout, I re-attached the desktop.css link and added the following code to the head of my document.
    <meta name="viewport" content="user-scalable=no, width=device-width" />
    <link href="../Styles/Desktop.css" rel="stylesheet" type="text/css" media="only screen and (min-width:481px)" />
    <link rel="stylesheet" type="text/css" href="../Styles/iphone.css" media="only screen and (min-width: 0px) and (max-width: 480px)"/>
    <!--pre-IE9 browsers don't support CSS3 so we give them the desktop layout-->
    &lt;!--[if lt IE9]>
    &lt;link rel="stylesheet" type="text/css" href="../Styles/Desktop.css" media="screen" />
    <![endif]-->
    Do you have to literally go in and manually change the wraps, floats, whatever for everything?
    Yes.  If you examine the comments in my iphone.css code, you'll see I changed some things to display:none, float:none, etc...
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How  to import styleSheet.css file in to my jsp page.

    Hi All,
    I am importing css file and other common javascript functions using the below code
    <style type="text/css" title="currentStyle">
    @import "/<some project Folder>/styleSheet.css";          
    </style>
    <script language="JavaScript" src="<%=request.getContextPath() %>/scripts/common.js">
    previously it was working but now i migrated my code with JDK1.5 to JDK 1.6 and Tomcat 5.xx to Tomcat 6.xx
    Now i am unable import these files.
    And also i am unable to see the pictures also.
    When i see the properties of the image it was giving
    http://localhost:8080/FRSWebsite/images/lock.png and it was correct path for that image but it was not displaying in my web page.
    What is the problem please anybody help me.
    Thanks in advance

    Hey I am facing a similar problem:
    I have this jar file lbswebservice.jar that I have to use for my application.
    I added it to the classpath, I copied it in my WEB-INF/lib folder, but when I try to access classes in this package, it doesnt work.
    For example the jar contains the package com.blipsystems.lbs.ws.messages.* ; that contains different classes, like the Campaign class.
    I tried to use this class (just to create an object) in different context (through jsp, or just through java test classes), but it never works, i get the error: com.blipsystems.lbs.ws.messages.Campaign cannot be resolved to a type
    I am a bit desperate here...

  • How to use a c file in LabVIEW

    Hi All,
    I have a c file which communicates through serial port and J1850 protocol. I want to use the C file in labview and do the communication through serial port.
    Can any one give me an idea how I have to use the c file in LabVIEW.
    Thank you.!
    ---------------- Be Good. Do Good. ---------------------

    Have you tried reading the LabVIEW Help or even searching this web site? This question has been asked MANY times. There's a section in the LabVIEW Help called "Calling Code Written in Text-Based Programming Languages." There are also several articles written on this. Here's just one: https://decibel.ni.com/content/docs/DOC-1690
    Please do the research and then come back with a more specific question.

Maybe you are looking for