Showing posts with label tutorials. Show all posts
Showing posts with label tutorials. Show all posts

Wednesday, March 21, 2012

Report that has parameters doesnt show up with report viewer.

My webhost had several tutorials on how to use report viewer. The first being
<%@.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>

</form
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.

Wednesday, March 7, 2012

Report Server publish error 400

I have been working my way through the Report Server tutorials. All went
well until I got to Lesson 7
(ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/sqltut9/html/d313b097-a04c-4e26-b2d9-9a0b421aa61d.htm#seeAlsoSection).
There it described how to publish a report. When I do that step, I get "The
request failed with HTTP status 400: Bad Request."
I am using "http://localhost/reportserver" for the TargetServerURL, and this
URL does exist (I can open it in IE). There I see the two subdirectories,
Tutorial and Data Sources, but neither has anything in them.
Can you point me in the right direction to get this to work?
Thanks.Hello acsla,
Based on my research, you need to check whether you have use host header in
your IIS for your web site.
If does,we had to modify two config files:
In RSWebApplication.config we added the url to ReportServer using the host
header
name in the ReportServerUrl element.
In rsreportserver.config, we modified the UrlRoot element to use the host
header
name rather than the machine name in the url to ReportServer.
Hope this information will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks.
I don't see anywhere in IIS where use host header is set. I certainly
haven't changed any default setting on that. Where exactly in IIS would this
be?
Thanks.
"Wei Lu [MSFT]" wrote:
> Hello acsla,
> Based on my research, you need to check whether you have use host header in
> your IIS for your web site.
> If does,we had to modify two config files:
> In RSWebApplication.config we added the url to ReportServer using the host
> header
> name in the ReportServerUrl element.
> In rsreportserver.config, we modified the UrlRoot element to use the host
> header
> name rather than the machine name in the url to ReportServer.
> Hope this information will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>|||Hello Acsla,
Then, could you check the two configuration files I mentioned in the
previous post and use the correct value for the element?
You need to use the http://servername/reportserver in those elements.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.