Showing posts with label aspx. Show all posts
Showing posts with label aspx. Show all posts

Friday, March 30, 2012

ReportViewer graphics and charts do not display in aspx page

Hi,
I'm trying to display a basic report in an aspx page using the ReportViewer
component. The report displays but a graphic and simple chart are not
displayed. It seems like it has had good try because link regions in the
graph do actually work, but no visual chart.
Any ideas!Update on below
As I said it seems to be giving the display a good go, and I have managed to
intermitently display the chart graphic (I think by viewing the report in
report manager first), but refresh the page and it disapears again. Follow a
link from the report and then use the back button and it displays again. IE
pants or what!
Only hint is that when the chart is not display the properties say Type: Not
Available, when it is displayed it says Type: PNG Image. I have seen the
.gif displayed once, but don't seem to be able to do it again - same
properties - Type: Not Available.
Seems to be some info about on this type of issue, that is - controls,
security and encoding but nothing definitive.
Any assistance greatly appreciated
Thanks
Laurence
"Laurence" <laurence.pull@.silversands.co.uk> wrote in message
news:OmHV2yb4EHA.3236@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I'm trying to display a basic report in an aspx page using the
> ReportViewer component. The report displays but a graphic and simple chart
> are not displayed. It seems like it has had good try because link regions
> in the graph do actually work, but no visual chart.
> Any ideas!
>|||I am also having the same issue... If I restart IIS( iisreset ) the images
would start diplaying but would disappear after couple of minutes(in most
cases the third refresh would kill the images)
--Sarvan
"Laurence" wrote:
> Update on below
> As I said it seems to be giving the display a good go, and I have managed to
> intermitently display the chart graphic (I think by viewing the report in
> report manager first), but refresh the page and it disapears again. Follow a
> link from the report and then use the back button and it displays again. IE
> pants or what!
> Only hint is that when the chart is not display the properties say Type: Not
> Available, when it is displayed it says Type: PNG Image. I have seen the
> ..gif displayed once, but don't seem to be able to do it again - same
> properties - Type: Not Available.
> Seems to be some info about on this type of issue, that is - controls,
> security and encoding but nothing definitive.
> Any assistance greatly appreciated
> Thanks
> Laurence
> "Laurence" <laurence.pull@.silversands.co.uk> wrote in message
> news:OmHV2yb4EHA.3236@.TK2MSFTNGP15.phx.gbl...
> > Hi,
> >
> > I'm trying to display a basic report in an aspx page using the
> > ReportViewer component. The report displays but a graphic and simple chart
> > are not displayed. It seems like it has had good try because link regions
> > in the graph do actually work, but no visual chart.
> >
> > Any ideas!
> >
>
>

ReportViewer error "Page navigation is out of range"

I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".

The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.

How can I fix this problem?I have exactly the same problem...anyone out there from MS monitoring this? Please help! Thanks!|||

I also had the same problem.

Can you try setting you internet-intranet security settings to Medium-Low and then try generating the reports? There seems to be some problem with storing of cookies because of which it gives this error.

Hope it helps!!!

|||Page navigation is a postback. Look at what you are doing in the PageLoad when IsPostBack == true.|||

Hi BradB,

what are the things that can cause such error in the pageload if it's a postback?

i encountered this error but my coding uses !IsPostBack , will that be a difference?

|||

I figured out a workaround. It appears that the error occurs when you set the ServerPage during the postback. Don't explicitly set the ReportServerUrl or ReportPath during postback and it should work:

/* Insert the following two lines before setting ReportServerUrl or ReportPath */
if (IsPostBack)
return;

Report.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
Report.ServerReport.ReportPath = @."/MyReportDirectory/MyReport";

|||thanks! works perfectly..|||That was it exactly. Thanks.|||

Perfect.

You made my day.

Thanx.

ReportViewer error "Page navigation is out of range"

I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".

The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.

How can I fix this problem?I have exactly the same problem...anyone out there from MS monitoring this? Please help! Thanks!|||

I also had the same problem.

Can you try setting you internet-intranet security settings to Medium-Low and then try generating the reports? There seems to be some problem with storing of cookies because of which it gives this error.

Hope it helps!!!

|||Page navigation is a postback. Look at what you are doing in the PageLoad when IsPostBack == true.|||

Hi BradB,

what are the things that can cause such error in the pageload if it's a postback?

i encountered this error but my coding uses !IsPostBack , will that be a difference?

|||

I figured out a workaround. It appears that the error occurs when you set the ServerPage during the postback. Don't explicitly set the ReportServerUrl or ReportPath during postback and it should work:

/* Insert the following two lines before setting ReportServerUrl or ReportPath */
if (IsPostBack)
return;

Report.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
Report.ServerReport.ReportPath = @."/MyReportDirectory/MyReport";

|||thanks! works perfectly..|||That was it exactly. Thanks.|||

Perfect.

You made my day.

Thanx.

ReportViewer error "Page navigation is out of range"

I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".

The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.

How can I fix this problem?I have exactly the same problem...anyone out there from MS monitoring this? Please help! Thanks!|||

I also had the same problem.

Can you try setting you internet-intranet security settings to Medium-Low and then try generating the reports? There seems to be some problem with storing of cookies because of which it gives this error.

Hope it helps!!!

|||Page navigation is a postback. Look at what you are doing in the PageLoad when IsPostBack == true.|||

Hi BradB,

what are the things that can cause such error in the pageload if it's a postback?

i encountered this error but my coding uses !IsPostBack , will that be a difference?

|||

I figured out a workaround. It appears that the error occurs when you set the ServerPage during the postback. Don't explicitly set the ReportServerUrl or ReportPath during postback and it should work:

/* Insert the following two lines before setting ReportServerUrl or ReportPath */
if (IsPostBack)
return;

Report.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
Report.ServerReport.ReportPath = @."/MyReportDirectory/MyReport";

|||thanks! works perfectly..|||That was it exactly. Thanks.|||

Perfect.

You made my day.

Thanx.

ReportViewer error "Page navigation is out of range"

I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".

The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.

How can I fix this problem?I have exactly the same problem...anyone out there from MS monitoring this? Please help! Thanks!|||

I also had the same problem.

Can you try setting you internet-intranet security settings to Medium-Low and then try generating the reports? There seems to be some problem with storing of cookies because of which it gives this error.

Hope it helps!!!

|||Page navigation is a postback. Look at what you are doing in the PageLoad when IsPostBack == true.|||

Hi BradB,

what are the things that can cause such error in the pageload if it's a postback?

i encountered this error but my coding uses !IsPostBack , will that be a difference?

|||

I figured out a workaround. It appears that the error occurs when you set the ServerPage during the postback. Don't explicitly set the ReportServerUrl or ReportPath during postback and it should work:

/* Insert the following two lines before setting ReportServerUrl or ReportPath */
if (IsPostBack)
return;

Report.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
Report.ServerReport.ReportPath = @."/MyReportDirectory/MyReport";

|||thanks! works perfectly..|||That was it exactly. Thanks.|||

Perfect.

You made my day.

Thanx.

sql

ReportViewer error "Page navigation is out of range"

I am embedding the ReportViewer in an aspx page and the report comes up fine, but when I press the "Next Page" or "Last Page" buttons, I get the error: "Page navigation is out of range".

The application has session state turned off.
The problem occurs whether or not the viewstate for ReportViewer is turned on or off.

How can I fix this problem?
I have exactly the same problem...anyone out there from MS monitoring this? Please help! Thanks!|||

I also had the same problem.

Can you try setting you internet-intranet security settings to Medium-Low and then try generating the reports? There seems to be some problem with storing of cookies because of which it gives this error.

Hope it helps!!!

|||Page navigation is a postback. Look at what you are doing in the PageLoad when IsPostBack == true.|||

Hi BradB,

what are the things that can cause such error in the pageload if it's a postback?

i encountered this error but my coding uses !IsPostBack , will that be a difference?

|||

I figured out a workaround. It appears that the error occurs when you set the ServerPage during the postback. Don't explicitly set the ReportServerUrl or ReportPath during postback and it should work:

/* Insert the following two lines before setting ReportServerUrl or ReportPath */
if (IsPostBack)
return;

Report.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
Report.ServerReport.ReportPath = @."/MyReportDirectory/MyReport";

|||thanks! works perfectly..|||That was it exactly. Thanks.
|||

Perfect.

You made my day.

Thanx.

ReportViewer does not show report in aspx page

I created a report with a parameter. The parameter was created using a dataset in the report designer. This works fine. I deployed the report (webhost4life) and the report runs fine in the report manager. I am able to select my casenumber click on the default view report button and it works.

Problem: I embedd the report into an aspx page frmReports1.aspx. I call this page from another page (form). the frmReports.aspx page comes up and displays the default drop down list box with the casenumbers (fine). I select the casenumber and click on the view report button and NOTHING. I here the postbacks taking place but all that happens is the default value appears in the drop down list box and the toolbar shows. I checked permissions and everything is fine. I searched the forum and thought i found the solution with the inLine HTML and Async (still nothing) I can only think that something is not going right with the parameter. Here is my html, and code behind code. any help would be greatly apprcieated.

Zachary

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="frmReports1.aspx.vb" Inherits="frmReports1" %>

<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

<style>html,body,form {height:100%}</style>

</head>

<body>

<form id="form1" runat="server">

<div>

<rsweb:ReportViewer ID="rvTest" runat="server" Width="600px" ProcessingMode="Remote" AsyncRendering="false" Height="75%" >

<ServerReport

DisplayName="Billable Hours"

ReportPath="/sddmtech/SnowandIce/rptHoursWorked"

ReportServerUrl="http://sqlreport01.mysite4now.com/Reportserver" />

</rsweb:ReportViewer>

&nbsp;

</div>

</form>

</body>

</html>

aspx code behind

Imports System.Net

Imports System.Security.Principal

Imports Microsoft.Reporting.WebForms

Partial Class frmReports1

Inherits System.Web.UI.Page

Protected Sub rvTest_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles rvTest.Init

End Sub

<Serializable()> _

Public NotInheritable Class MyReportServerCredentials

Implements IReportServerCredentials

Public ReadOnly Property ImpersonationUser() As WindowsIdentity _

Implements IReportServerCredentials.ImpersonationUser

Get

Return Nothing

End Get

End Property

Public ReadOnly Property NetworkCredentials() As ICredentials _

Implements IReportServerCredentials.NetworkCredentials

Get

' Put your login and password here this works fine

Dim userName As String = ""

Dim password As String = ""

Dim domain As String = ""

Return New NetworkCredential(userName, password, domain)

'********************************************************************************

End Get

End Property

Public Function GetFormsCredentials(ByRef authCookie As System.Net.Cookie, ByRef userName As String, ByRef password As String, ByRef authority As String) As Boolean Implements Microsoft.Reporting.WebForms.IReportServerCredentials.GetFormsCredentials

End Function

End Class

Public Function GetFormsCredentials(ByRef authCookie As Cookie, _

ByRef userName As String, _

ByRef password As String, _

ByRef authority As String) _

As Boolean

authCookie = Nothing

userName = Nothing

password = Nothing

authority = Nothing

'Not using form credentials

Return False

End Function

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load

'ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()

'rvTest.ServerReport.Refresh()

End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

rvTest.ServerReport.ReportServerCredentials = New MyReportServerCredentials()

End Sub

End Class

Try taking out the http://www.w3.org/1999/xhtml namespace value and see if it works. It may have nothing to do with it, but there are some um infelicities with the rendered HTML for report viewer that make the Standards Police very unhappy...

It's just a guess but it is a guess that will take you 3 seconds to check <s>.

I don't think it's your credentials -- otherwise why would the parameters etc show up? You're getting to the site...

>L<

|||

Thanks Lisa

I took the www.w3.org statement out but it did not work. Still the same.

Zachary

|||

Hi Lisa

It is a problem with the parameter. I created a stored procedure with the same data however; it does not contain a parmeter. i.e. it pulls back all of the data (it works).

In report designer I created two datasets. One dataset holds all the possible values that can be passed to the stored procedure

Select CaseNumber from tblCases

These values are put into a drop down list box in the toolbar (it is done automatically for me).

The second dataset uses this value once it is selected and retrieves the data that is to be displayed in the report. (This is the disconnect. ) Does anyone know how to do this. I do not want to create a custom control in the toolbar. I want to extract the parameter value that already exists in the existing toolbar and then pass that value to the stored procedure / report.

Is there an example or does anyone have an example of passing the parameter value using the Report Viewer and a stored procedure.

thanks

Zachary

|||>.

Is there an example or does anyone have an example of passing the parameter value using the Report Viewer and a stored procedure.

<

Yep <g>.

http://forums.microsoft.com/msdn/showpost.aspx?postid=1705421&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=1

>L<

|||

Thanks Lisa

Fixed the problem - In Problem I was reloading the report on postback therefore cancelling out the paramter. So I did a check for post back (i.e if page.ispostback = false then ) and everything is working.

This is a greate forum.

Zachary

Fixed the problem - thanks

Zachary

|||

Cool! Thanks for explaining.

>L<

Reportviewer does not load properly in a content page

Hi all,

I have two (2) questions here:

1) I have a reportviewer control in an aspx page. It is remote access server report. Everything works fine from report server and in vs 2005. But Report does not load properly once put on a content page. The multi-value parameter dropdown list is not clickable! It worked in a non master/content page.

Here is my code for the page that does not work:

<%@. Page Language="C#" MasterPageFile="~/FysbReviewer.master" AutoEventWireup="true" CodeFile="ReportsMenu.aspx.cs" Inherits="ReportsMenu" Title="Report Menu" %><%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">

<rsweb:ReportViewer ID="ReportViewer1" runat="server" style="position:static" ShowParameterPrompts="true"
Font-Names="Verdana" Font-Size="8pt" Height="800px" ProcessingMode="Remote" Width="100%">
<ServerReport ReportPath="/FysbReports/Report1" />
</rsweb:ReportViewer>
</asp:Content>

Here is the code that reportviewer worked:

<%@. Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<rsweb:reportviewer id="ReportViewer1" runat="server" font-names="Verdana" font-size="8pt"
height="800px" processingmode="Remote" width="100%">
<ServerReport ReportPath="/FysbReports/Report1"></ServerReport>
</rsweb:reportviewer>

</div>
</form>
</body>
</html>

Question 2: How can I format the multi-value parameter prompts so that all selection are displayed as checkbox directly instead of clicking the dropdownlist and view the multple choices?

I know it is Friday afternoo. I want to say TIG Friday, but it looks like a long Friday afternoon ahead... Please help!

Hi,

From your description, it seems that your reportviewer works in a normal page but not in a master/content page, right?

Generally, for this kind of issue, the main issue is that the resource of ReportPath attribute of ServerReport maps doesn't exist. You should try to check the relative path of each resource to see if they match the relationship of your masterpage, content and the reportpath.

Second, the viewer does support multivalue parameters, but it doesn't have any concept of parsing based on comma or any other separator. When you supply the value from your textbox to the report, you will need to write your code and parse it on your own and supply the array of values to the ReportParameter object.

Thanks.

Monday, March 26, 2012

ReportViewer

Hi friends,

I am working on a web-site, where I want to present a strategyplan that are stored in a database. I have created the online ASPX page, but now I want to create a "Print me." button. I want to controll the pageshifts and so on, so I have planned to use ReportViewer.

Basically the report should consists of 6 pages:

1) Frontpage, telling that it is "STRATEGYPLAN FOR COMPANY X, FOR PERIOD XXXX TO XXXX"
2) Page 2: Vision, Mission and other explanations.
3) Page 3: Informations about what to do with the market.
4) Page 4: Informations about what to do with the business processes.
5) Page 5: Informations about what to do with the Employees.
6) Page 6: Informations about what to do with the Finances.

Is that possible to do in reportviewer?

I would like to learn, so if someone could tell me how to do it with static texts (and no databaselookups), then that would be a great step.

I am totally new to ASP.NET, so I hope this is the right forum.

I think you're going to have to break you query up over several forums. But if you want, you can create 6 queries. One for each "page". Use a List control on your form and assign each list a datasource. For each list, select the 'Insert Page Break at end of list'.

Reportviewer

Hi all,
I am using the ReportViewer component to display reports.
Is there a way to make its height and width to just integrate with the
actual aspx page ?I set the Height to 85% and the width to 100%. That works good enough for
me, leaving the right amount of room for the header and footer ASP.NET page
elements.
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Ni" <Ni@.discussions.microsoft.com> wrote in message
news:845E6FF5-7780-4253-9D53-7120D0C8EBB8@.microsoft.com...
> Hi all,
> I am using the ReportViewer component to display reports.
> Is there a way to make its height and width to just integrate with the
> actual aspx page ?
>

ReportService2005 and ReportExecution2005

Help!

Can anyone explain the difference between these two web services?

I want to create an ASPX page that develops report parameters and then uses those parameters to render a report which I will display in an image box. Which service do I need?

Is there a place to read about how to use each of them?

Thanks!

Neither :-).

You need the ReportViewer control that comes with Visual Studio 2005 or can be downloaded here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=8a166cac-758d-45c8-b637-dd7726e61367&DisplayLang=en

This will allow you to embed a report directly in your page - no need for picture boxes :-). It will also provide you the APIs for setting parameters.

Using the ReportExecution2005 endpoint you could achieve this, but it would be a lot of work to handle all the possible cases. The ReportViewer controls let you do this very quickly and handle all the interaction with the Report Server for you.

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Lukasz,

Thank you for your reply.

I have used the report viewer control when I am willing to have the parameter prompts managed by the report. I don't understand how to use the report viewer's API to render the report when I want it rendered, and how to provide parameters from outside the control. Do you know of an example or a reference?

Ira

|||

You can find samples here: www.gotreportviewer.com There is a sample called "Parameter prompting in local mode" that you should be able to reuse, just in Server mode.

Also, you can ask this question on the Report Viewer forum. It might already be answered there.

http://forums.microsoft.com/msdn/showforum.aspx?forumid=75&siteid=1

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Lukasz,

Mission accomplished!

It's amazing how easy things are when you find the right approach. Thanks.

Ira