[Logo] SpagoWorld Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing  
[Groups] Back to home page  [Moderation Log] Moderation Log   [Register] Register /  [Login] Login 
BIRT Crossnavigation problem (SOLVED)  XML
Forum Index » Technical Help - SpagoBI Server - REPORTING
Author Message
arod.spw

Newby

Joined: 06/07/2010 21:54:53
Messages: 26
Location: México
Offline

Hi my friends,

I'm trying to create some cross navigation between two BIRT docs A and B.
A is a document with one lines/bars chart. So, to the bars I've attached the javascript "javascript:parent.execCrossNavigation(...);" function
the way is explained in the docs for that matter (in the format chart dialog, interactivity to my y-axis, event mouseclick, add hyperlink,
edit base url, URI hyperlink type, location with my script with javascript syntax selected, and 'self' as target)

Everything looks ok, but when I execute my document and try to use the "crossnavigation" nothing happends,
if I replace the parent.execCrossNavigation for nice and shiny alert, the alert does trigger, showing the window name.

The resultant links when i execute my document A looks like this (taken from the generated source):

<map id="AUTOGENBOOKMARK_1" name="AUTOGENBOOKMARK_1"><area shape="poly" coords="277,109,277,123,684,123,684,109" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: A
Promedio etiqueta: 88%
Promedio general: 87.29% "/><area shape="poly" coords="277,137,277,151,661,151,661,137" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: A
Promedio etiqueta: 83%
Promedio general: 87.29% "/><area shape="poly" coords="277,165,277,179,656,179,656,165" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: A
Promedio etiqueta: 82%
Promedio general: 87.29% "/><area shape="poly" coords="277,193,277,207,661,207,661,193" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: B
Promedio etiqueta: 83%
Promedio general: 87.29% "/><area shape="poly" coords="277,221,277,235,721,235,721,221" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: B
Promedio etiqueta: 96%
Promedio general: 87.29% "/><area shape="poly" coords="277,249,277,263,712,263,712,249" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: B
Promedio etiqueta: 94%
Promedio general: 87.29% "/><area shape="poly" coords="277,277,277,291,670,291,670,277" alt="" style="cursor: pointer;" href="javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" target="_self" title=" Categoría: B
Promedio etiqueta: 85%
Promedio general: 87.29% "/></map>

Is that the way it should look like after process the script for the cross navigation url?

I've tried with, tree and five params with no luck, changing this.name for window.name (even its the same)
My document has a PNG output (i think it doesn't affect as the javascript:alert does work)

btw, in the source, the function accepts only tree parameters:
<script>
function execCrossNavigation(windowName, label, parameters) {
document.getElementById('iframeDoc').contentWindow.execCrossNavigation(windowName, label, parameters);
}
</script>


The javascript syntax url I've tried:
"javascript:parent.execCrossNavigation(window.name,'categorias_mes',"+
"'locacion="+params["locacion"].value+
"&categoria="+params["categoria"].value.replace(/\'/g,'')+
"&tag="+row["id_dash_gtag_ppal::descripcion_tag"]+
"&fecha_12m_a_ini="+"2010-01-01"+
"&fecha_12m_a_fin="+"2010-06-30"+"',"+
"'','','tab');"

'javascript:parent.execCrossNavigation(window.name,"categorias_mes",'+
'"locacion='+params["locacion"].value+
'&categoria=' + params["categoria"].value.replace(/\'/g,'') +
'&tag='+row["id_dash_gtag_ppal::descripcion_tag"]+
'&fecha_12m_a_ini='+'2010-01-01'+
'&fecha_12m_a_fin='+'2010-06-30'+'",'+
'"","","tab");'

"javascript:parent.execCrossNavigation(this.name,'categorias_mes','','','');" <= at least this should work, shouln't it?

Has anyone faced/fixed this?

(apache tomcat 6.0.20, mysql 5.1.37-1ubuntu5.4, SpagoBI/SpagoBIRT 2.5 non demo)

This message was edited 2 times. Last update was at 30/07/2010 02:43:48

daareiza.spw

Newby

Joined: 08/07/2010 06:49:49
Messages: 21
Location: Bogotá, Colombia
Offline

Hi Arod,

I have the same problem two weeks ago, I played with the "javascript:parent.execCrossNavigation(...);" for hours, without success.

But, with the help of firebug, I was able to solve my problem, hope is the same as yours.

I was trying to do the crossnavigation through the url "http://dev:8080/SpagoBI/.........." with "dev" a local IP (the development machine), BUT, all SpagoBI engines configurations point to OTHER url, the public URL of the development machine, then, when the javascript tryies to execute, it cant go from "dev" to "public URL", its says access restrintions. So I execute the report through the public URL and all works like a charm, I like the breadcums that it generate.

By the way, this is the from I create the javascript for the crossnavigation IN JASPER:

"javascript:parent.execCrossNavigation(this.name, 'DESTINATION_REPORT_LABEL', 'Param1=Value1&Param2=Value2&Param3=Value3&Param4=Value4');"

Development machine:
SpaboBI 2.6 non demo
Mysql 5.1.37-1ubuntu5.1
Apache tomcat 6.0.24
JDK 1.6.0_20

This message was edited 2 times. Last update was at 29/07/2010 19:16:32

arod.spw

Newby

Joined: 06/07/2010 21:54:53
Messages: 26
Location: México
Offline

Hey daareiza so much thanks for your answer.
The problem seemed that there was a bug in version 2.5, as the urls where well configured,
as soon as i switched to 2.6 version everything worked as it should be.
Last time I eddited my report I put an alert(typeof parent.execCrossNavigation) into the onclick event, into 2.5 nothing, into 2.6 'function' :)
 
Forum Index » Technical Help - SpagoBI Server - REPORTING
Go to:   
Powered by JForum 2.1.9 © JForum Team