Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360068 - Using iframe doesn't work
Summary: Using iframe doesn't work
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Zhiqiang Qian CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-06 02:44 EDT by Emmanuel CLA
Modified: 2011-12-23 03:57 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emmanuel CLA 2011-10-06 02:44:23 EDT
Build Identifier: Build id: 20110916-0149

I put an iframe in my page with a link to <iframe id="iframe2" runat="server" src="h t t p : / /localhost:8080/Birt/frameset?__report=report\SalesInvoice.rptdesign&__format" scrolling="auto" width="100%" height="600px" frameborder="0"> </iframe>
 
 When we generate in a pdf format it works quite fine.
 We have an issue in the prototype.js in the stopobserving function on element.removeEventListener(name, observer, useCapture) :
 message (sorry in french) : Erreur d'exécution Microsoft JScript: Objet appelant non valide.
 
The html format doesn't work but it works when it is not in an iframe.
 There is no SOAP return and the processing window stay "Processing please wait".
 
The first problem is in the AbstractBaseReportDocument.js class.
 We need to change : if (BrowserUtility.isIE) by ( BrowserUtility.isIE6 || BrowserUtility.isIE7).
 
The problem seems to be on the birtSoapRequest. We have an Error not specified on the __xmldocument property

Reproducible: Always

Steps to Reproduce:
1.Put an iframe calling Birt viewer

No special setup
Comment 1 Zhiqiang Qian CLA 2011-10-21 01:55:16 EDT
Which IE version are you using? I tried the BIRT viewer 3.7.1 + IE9 and there's no problem.
Comment 2 Emmanuel CLA 2011-10-21 02:43:52 EDT
I use version IE 9 version 9.0.8112.16421.

When I call this page on Chrome or Firefox, there is no trouble.

Here is the aspx code of my page :

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>

<body>
    <iframe id="iframe2"  src="http://localhost:8080/Birt/frameset?__report=report\SalesInvoice.rptdesign&__format=htm" scrolling="auto"  width="100%" height="600px" frameborder="0"> </iframe>
    
</body>
</html>
Comment 3 Emmanuel CLA 2011-10-21 02:47:49 EDT
I just create an HTML page as follow named test.html

----------------
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <iframe id="iframe2"  src="http://localhost:8080/Birt/frameset?__report=report\SalesInvoice.rptdesign&__format=htm" scrolling="auto"  width="100%" height="600px" frameborder="0"> </iframe>
    
</body>
</html>
----------------------------------------------------

It works fine with Chrome and firefox but I have this message with ie :


The viewing session is not available or has expired. 
Show Exception Stack Trace 
Hide Exception Stack Trace  

And there is no stack trace.

Regards
Manu
Comment 4 Bryan Shannon CLA 2011-12-19 01:59:55 EST
Was there ever resolution on this issue?  I'm having the same types of problems with IE when attempting to show reports as HTML.  PDF appears to work fine across all browsers (IE, FireFox, Chrome, Safari).

I'm using the frameset but not the IFRAME.
Comment 5 Bryan Shannon CLA 2011-12-19 02:24:21 EST
Sorry, I provided no good information.  Here are the browser versions that I'm using and each displays PDF without a problem, and each exibits different behaviour when attempting to display HTML.

IE 9.0.8112.16421 - returns the exception "The viewing session is not available or has expired.", no stack trace.

FireFox 8.0.1 - shows the frameset page but no report and no error.

Chrome 16.0.912.63 - shows the report but not the frameset.

Safari 5.1.2 - shows PDF report even though PDF was not specified (i.e, no __format parameter).

I just upgrade from BIRT 2.3.1 which was returning these reports correctly with the same URL:

http://localhost/tradeweb/frameset?__overwrite=true&__parameterpage=false&category=br&button=view&__report=reports/bnkPersonnel.rpt.rptdesign

(note that category and button parameters are used for our own purposes).
Comment 6 Emmanuel CLA 2011-12-19 03:10:12 EST
Hello,

Sorry since October, no news.

Regards
Manu
Comment 7 Zhiqiang Qian CLA 2011-12-19 22:48:57 EST
What's your app server and version? e.g. tomcat, jetty, jboss.
Comment 8 Emmanuel CLA 2011-12-20 07:27:01 EST
My app server is Apache v7
Comment 9 Bryan Shannon CLA 2011-12-20 22:21:15 EST
2011-12-21 11:20:00 StartupUtil [INFO] DWR Version 2.0.6 starting.
2011-12-21 11:20:00 StartupUtil [INFO] - Servlet Engine: Apache Tomcat/6.0.29
2011-12-21 11:20:00 StartupUtil [INFO] - Java Version:   1.6.0_21
Comment 10 Ning Zhang CLA 2011-12-21 00:18:28 EST
Cause of the Exception in IE:
In IE, IE9 in my case but consider all IE versions, the content in an iframe tag is given a lower level of trust by default, and cookies in the iframe are treated as 3-party contents and are blocked if no "Privacy Policy" info found. So no cookies allowed, and no session identifiers sent in this case.

Solutions:
1. add "localhost" and/or "127.0.0.1" to the "Trusted Sites" list in "Internet Options" -> "Security" tab.

2. Adjust the privacy settings bar to a level below Medium in "Internet Options" -> "Privacy" tab.

I've tested with solutions 1 and 2 in IE9, no exception thrown.

3. Provide privacy policy info for the server site (localhost:8080 in this case). Please refer to the W3C page http://www.w3.org/P3P/details.html.
Comment 11 Emmanuel CLA 2011-12-23 03:56:56 EST
Hello,

adding the site to the trusted sites works.

Thanks
Manu
Comment 12 Emmanuel CLA 2011-12-23 03:57:46 EST
Have to add the site to your trusted site.