cancel
Showing results for 
Search instead for 
Did you mean: 

No rendered image from Chartservlet

Former Member
0 Kudos

Hello forum ,

We have a irpt file containing a <img> tag which src contains a CHARTSERVLET call .  It used to work fine,  but now it does not show the chart .  ¿ What might be the cause ? .

Thanks in advance,

Note 1:

We are running a 12.2.3 BUILD 167 SP5 MII plataform

Note 2 ( part of the javscript code ) :

var GrafProduccion = document.getElementById("GrafProduccion");

GrafProduccion.src="/XMII/ChartServlet?StartDate=" + fechaHaceUnMes + "&EndDate=" + fechaGraf + "&XAxisMajorTickCount=" + TickCount  + "&Title=Produccion&Width=400&QueryTemplate=ReporteDiarioLPG%2FQueries%2FGraficaProduccionXacute&DisplayTemplate=ReporteDiarioLPG%2FDisplays%2FGraficaProduccion&Content-Type=image%2Fpng&Height=200";

Note 3 ( somewhere inside a table tag ) : 


<img id = "GrafProduccion" width="100%"></img>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please,  can anyone can help me out ?

Thanks in advance ..

former_member185280
Active Contributor
0 Kudos

Shot in the dark but I remember having problems once when the img tag didn't initially have a src attribute. It was a mobile browser but I can't remember if it was on ios. 

Former Member
0 Kudos

Thanks christian,

I added a blank src attribute to the img tag and did not worked . The img showed a question mark on the browser on the ipads .  No problem for the IE browsers .

Any additional ideas ¡? Thanks for your help . 

former_member185280
Active Contributor
0 Kudos

Maybe try removing and creating the entire img tag dynamically instead of just updating the src attribute.

jcgood25
Active Contributor
0 Kudos

In the working browser session with IE - use the right-click on the rendered image and get the full path from the properties dialog.  Then try this full URL in Safari to see if it will render properly without any of the script related issues.

Former Member
0 Kudos

Thanks Jeremy,

It works .  I will review the script to find if something is wrong .

Thanks

Answers (2)

Answers (2)

Former Member
0 Kudos


Hello Jeremy,

I found that everything works fine on the ipads,  by passing directly the environment variables to the src atributte of the img tag .  I used to have the practice to assign environment variables to input tags and then recover their values on some javascript function for further processing.  Fortunally, in this case I do not process any further the environmet variables.

In other words,  this is a work around for this particular case .  If I needed some additional processing for the environment variables , I would be in trouble .

I will close this discussion,  marking yours as the right solution .

Thanks again Jeremy

Former Member
0 Kudos

hello again,

I forgot to tell that this problems is for the iPADS only . In IE we have no problem.

Best regards,


former_member185280
Active Contributor
0 Kudos

I think at some point safari on ios began to aggressively cache everything. Try adding a random value or timestamp to the end of your url, like ... Height=200" + "&Random=" + Math.random();

Former Member
0 Kudos

Thanks Christian,

It did not work . Any additional ideas ?

Please, help . Thanks in advance .