Saturday, February 25, 2012

Report in an iFrame

I'm using SQL Reporting Services (not 2005).

I have a report which is loaded into an IFRAME (called 'reportFrame') which is loaded as part of a page within another IFRAME (called 'mainFrame').

I have set the rc:LinkTarget parameter to be "reportFrame", so that on drill-down it reloads in the correct place.

However, in IE 6, this doesn't work it just loads the report into mainFrame. In Firefox, although the rendered output of the report is garbage, the report does load into reportFrame when the '+' buttons are clicked.

Any ideas?I have spent some time trying to figure out what was wrong, and

basically it would appear that, if an iFrame has ANY style

information (through the style attribute or stylesheet) then IE will

NOT enforce the LinkTarget.

My solution is place the iFrame within a DIV tag if you need to apply any style information.

It is absolutely shocking that something like this breaks it, but that's the IE we know and love/hate.

No comments:

Post a Comment