We help IT Professionals succeed at work.

StyleSheet getting all messed up when doing a Response.Write

directxBOB
directxBOB asked
on
Medium Priority
421 Views
Last Modified: 2012-05-06
I have a reports page which makes the following call:

Response.Write( _
                        "<script language='javascript'>window.open('../ReportViewer.aspx?reportname=Adjustments.rpt&startdate=" & _
                        Todate & "&exportType=" & Me.drpExportType.Text.ToString() & "&employmentCode=" & user & _
                        "' , 'ReportViewer', 'toolbars=yes,scrollbars=yes,status=yes,resizable=yes'); </script>")



So this opens a ReportViewer Page, which handles the Crystal Report to build up the .rpt file.

The problem is that my calling page gets all messed up, it seems as if it's removing the the padding within one my DIV's

I am using MasterPages
Comment
Watch Question

use this code instead.
        Dim target As String = "window.open('../ReportViewer.aspx?reportname=Adjustments.rpt&startdate=" & _
                                Todate & "&exportType=" & Me.drpExportType.Text.ToString() & "&employmentCode=" & User & _
                                "' , 'ReportViewer', 'toolbars=yes,scrollbars=yes,status=yes,resizable=yes');"
 
Page.ClientScript.RegisterStartupScript(Page.GetType(), "openReport", target, True)

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.