Sunday, February 19, 2012

Integrating Reports with ASP page

HI,

I've created reports using VS2003 n sqlserver 2000.Now I need to view these reports from ASP page.Can anybody tell me how to integrate it with ASP .Can I use report viewer control?Thanks in advance.

May

May,

I have used iFrames in the past to drop an ASPX page inside an ASP. It is messy to have these two interact, but sometimes you are stuck with it.

If you want a seemless iFrame you can use the code below inside your ASP page:

<iframe src="test.aspx"framespacing="0" border="0" frameborder="0"></iframe>

You may also wish to set these:width="100%"marginheight="0"marginwidth="0"height="500" scrolling="yes"

As far as browser compatibility goes, beware of the scrollbar and how different browsers render scrollbars.

More reference: iFrame W3c spec

Thanks,

Chelsea

|||

Thanks for the reply.
I've to show the report in a new window.There is a button on the asp page.On button click I'm passing the URL of the reportserver along with the parameter in the query string.But it is not working.I need the correct syntax for that as I'm new to ASP.
Please help me thanks in advance.Here is the part of the code:

sub ViewContact()document.frmContact.method="post" document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render"frmContact.submit()end sub <script>

sub ViewContact()

document.frmContact.method="post"

document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render" frmContact.submit()

</script>

<form name=frmContact>

<input type=button OnClick="ViewContact">

sub ViewContact()document.frmContact.method="post" document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TrinityRailSales/CallReport&iCall=1&rs:Command=Render"frmContact.submit()end sub


May

|||

seems like the code got messed up-

<script>

sub ViewContact()

document.frmContact.method="post"

document.frmContact.target="_blank" document.frmContact.action="http://xp00025370/ReportServer?/TriSales/CallReport&iCall=1&rs:Command=Render "

frmContact.submit()

</script>

<form name=frmContact>

<input type=button Onclick="ViewContact">

Thanks

May

No comments:

Post a Comment