<%@.PageLanguage="vb"aspcompat="true"AutoEventWireup="false"debug="true" %>
<%@.RegisterTagPrefix="cc1"Namespace="Microsoft.Samples.ReportingServices"Assembly="ReportViewer" %>
<formid="Form1"method="post"runat="server">
<cc1:ReportViewerid="ReportViewer1"style="Z-INDEX: 101; LEFT: 56px; POSITION: absolute; TOP: 32px"
runat="server"Width="1050px"Height="1050px"ServerUrl=http://site.com/reportserver ReportPath="/myreport/report1"></cc1:ReportViewer>
but with this I could never get pass the IIS authentication pop up. It was annoying so my host had recently put up a new page that uses a different namespace and tag.
<%@.RegisterAssembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %><%@.RegisterAssembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %>
<formid="form1"runat="server"><div>
<rsweb:ReportViewerID="ReportViewer1"runat="server"Style="positionstatic"ProcessingMode="Remote"Width="100%"AsyncRendering="False"><ServerReportDisplayName="report viewer demo"ReportPath="/myreport/report1"ReportServerUrl="http://site.com/reportserver"/></rsweb:ReportViewer>
</div></form>
I figured they'd work the same but they don't. My .rdl has a parameter field set up so I don't want to pass it through the url. I want the user to access the .rdl and then that'll prompt them for the missing parameter and then click report. However, with the new setup, it just refreshes the page and does nothing. Are these two types functionally different? As long as I can get the 2nd script to stop refreshing the page and displaying nothing that would be fine.
Any ideas?
Anyone?
|||if u report server has any credentials, u need to pass it in the code behind..
|||Everything is passed on the report server itself so that I don't need any credentials. Whenever I use the second script it works and the interface shows up but when I select an item from the drop down menu and click report. It brings back nothing. It just refreshes the page.
|||Why do u have this listed twice
<%@.RegisterAssembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %><%@.RegisterAssembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %>
and can u pls post ur code behind for this page..
Regards
Karen
|||Yea... about that.. sorry. My host put that twice, i just realized it was a duplicate.
my report.asx.vb
Imports System.NetImports System.Security.PrincipalImports Microsoft.Reporting.WebFormsPartialClass _DefaultInherits System.Web.UI.PageProtected Sub ReportViewer1_Init(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles ReportViewer1.InitEnd Sub <Serializable()> _Public NotInheritable Class MyReportServerCredentialsImplements IReportServerCredentialsPublic ReadOnly Property ImpersonationUser()As WindowsIdentity _Implements IReportServerCredentials.ImpersonationUserGet Return Nothing End Get End Property Public ReadOnly Property NetworkCredentials()As ICredentials _Implements IReportServerCredentials.NetworkCredentialsGet' Put your login and password hereDim userNameAs String ="admin"Dim passwordAs String ="pass"Dim domainAs String ="report3"Return New NetworkCredential(userName, password, domain)End Get End Property Public Function GetFormsCredentials(ByRef authCookieAs System.Net.Cookie,ByRef userNameAs String,ByRef passwordAs String,ByRef authorityAs String)As Boolean Implements Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentialsEnd Function End Class Public Function GetFormsCredentials(ByRef authCookieAs Cookie, _ByRef userNameAs String, _ByRef passwordAs String, _ByRef authorityAs String) _As Boolean authCookie =Nothing userName =Nothing password =Nothing authority =Nothing'Not using form credentialsReturn False End Function Protected Sub form1_Load(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles form1.Load ReportViewer1.ServerReport.ReportServerCredentials =New MyReportServerCredentials()End SubEnd Class
And my web.config
ersion="1.0"?><configuration><system.web><httpHandlers><add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/></httpHandlers><compilation debug="true" strict="false" explicit="true"><buildProviders><add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/></buildProviders></compilation><pages><namespaces><clear/><add namespace="System"/><add namespace="System.Collections"/><add namespace="System.Collections.Specialized"/><add namespace="System.Configuration"/><add namespace="System.Text"/><add namespace="System.Text.RegularExpressions"/><add namespace="System.Web"/><add namespace="System.Web.Caching"/><add namespace="System.Web.SessionState"/><add namespace="System.Web.Security"/><add namespace="System.Web.Profile"/><add namespace="System.Web.UI"/><add namespace="System.Web.UI.WebControls"/><add namespace="System.Web.UI.WebControls.WebParts"/><add namespace="System.Web.UI.HtmlControls"/></namespaces></pages> </system.web></configuration>
So this is the script that my host provides its users. I tried breaking it down to figure out why it wasn't working but maybe you guys can point what if i'm missing something.|||
after
this line... ReportViewer1.ServerReport.ReportServerCredentials =New MyReportServerCredentials()
try giving this line.
ReportViewer1.ServerReport.ReportServerUrl =New Uri("http://Ipaddress/myreportserver") and also the report path.
|||I put that it in and still nothing. Everything 'technically' does load. If I remove the parameter drop down menu I have in my .rdl then it'll display the report. However, its when I have the parameter dropdown and I select and item and report it. It just refreshes that page.
|||how are u populating the parameters. is it thru a sproc... if so check the sproc for some bugs,,, and if u run this report in the report manager does it act the same way....
|||its in my data source. I select the radio button that says, credentials stored securely in the report server.
then i enter in my username and password. and I never have to enter in the user info. I can run the reports fine from the report server. (By the way i use an online host, not locally) its just when I try to run it through the vbscripts. its not working the way it stuppose to.
No comments:
Post a Comment