If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

[solved]HTML, JavaScript

Started by otsizh, 08 Feb 2006 09:08:18 AM

Previous topic - Next topic

otsizh

Hello,
I am trying to use html item to make my report a little better. I saw Hilighting rows tutorial but I have some problems with Script that have to there. Could somebody explaine howhtml items work? and what script should I use?

thank you all, olha

otsizh

This is what i have to hilight rows(acording to the tutorial) but it looks like i missing simthing because I have no result :(
Thank you for help,
olha

<script>
var x = document.getElementbyTagName("highlight");
for (i=0; i<x.length; i++)
{
var tablerow = x.parentElement.parentElement;
  tablerow.onmouseover = function()
  {
    this.className = "over";
  }
tablerow.onmouseout = function()
  {
    this.className =this.className.replace( "over"," ");
  }
}
</script>
<style>
tr:hover{background-color: red;}, tr.over{background-color: red;}
</style>

jolly

#2
Hi olha,

Put an HTML-Item everywhere to your Report Page Body.

this is the correct Script.

<script>

var x = document.getElementsByTagName("highlight");
for (i = 0 ; i < x.length ; i++)
{
   var tablerow = x.parentElement.parentElement;
   tablerow.onmouseover=function()
      {
         this.className = "over";
      }
               
   tablerow.onmouseout=function()
      {
         this.className = this.className.replace("over", "");
      }

}

</script>
<style>
Ã,  tr:hover, tr.over { background-color: #AEDD65; }
</style>

Paste the above script into the HTML-Item in the Section HTML under HTML Source. Located in the Properties Pane.

Thereafter you MUST insert an HTML-Item to your List. In the properties-Pane under the HTML Source Section you MUST insertÃ,  <highlight/> to the HTML . This is the first entry in the Properties-Pane.

IÃ,´ve attached a simple Listreport with this javascript inside..

Cu jolly


otsizh

hi jolly,
it works, thanks a lot!
How can I use the xml file that you attached?

JGirl

open the xml file in a text editor.  Select all, and then copy it.

Open report studio (go sales and retailers package), then from the tools menu, choose 'Open Report from Clipboard'

J

jolly

Hi olha,

Quoteopen the xml file in a text editor.  Select all, and then copy it.

the other way is to save the XML-File to your local system and if you enabled in Report Studio the function "Allow local file access" the you can go to the Menu: File, (Local) open.." and you got the Reportspecification with all the scripts and List and so on in Report Studio.

Cu Jolly

otsizh

thank you all again,
Wher can I get more information about how to write script for HTML items?

otsizh

can anybody help me to do the next tutorial? where you pick the item you whant to filter for.
It looks like it is only displaying the result... it does not explayins the steps :(
thanks,
olha