Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Friday, March 30, 2012

ReportViewer HyperlinkTarget Property Problem

I am running a locally processed report in Asp.net The report has a
textbox with a hyperlink property. In the report viewer control I
have set the HyperLink target to "_Blank".
When I look at the resultant page everything works fine for the first
page. If the user clicks on the hyperlink another browser window
opens. Unfortunately, if the user selects the next page in the
report, the Hyperlink target functionality doesn't work. Clicking on
the link results in the clicked link displaying within the report
viewer frame.
Looking at the page source
for page one the A tag is correct.
for page two the A tag is missing the target=_blank
Any suggestions?Hi Chuck,
Welcome to use MSDN Managed Newsgroup Support.
By default, when you use the Jump to URL property in the Navigation tab in
a textbox, it will jump to the web page in the same browser window.
I am not sure where you add the Hyperlink Target, here is a work around may
be help:
1. Create a webpage and add a javascript to jump to the Web Page you want
to with the "_Blank" target.
2. In the report, set the Jump to URL property to the webpage including the
script.
Hope this will be helpful.
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.

ReportViewer Help

I use the following code to display a report in the ReportViewer. The report
and the shared datasource are in another .NET solution. The report displays,
but the data does not. Can anyone help me figure out how to make the
report data display?
private DataTable LoadReportData()
{
DataSet ds = new DataSet();
ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
return ds.Tables[1];
}
protected void Page_Load(object sender, EventArgs e)
{
this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
ProcessingMode.Local;
this.ReportViewer1.LocalReport.ReportPath = "C:\\Reports\\ActivitySummaryReport.rdl";
this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
LoadReportData()));
this.ReportViewer1.LocalReport.EnableExternalImages = true;
}
Thanks,
PaulaAssuming that Tables[1] actually returns data and your report bindings are
correct, try:
reportViewer1.RefreshReport()
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Paula" <pmpayne@.nospam.com> wrote in message
news:abc40aa6399943198835be4ccb90828a@.ureader.com...
>I use the following code to display a report in the ReportViewer. The
>report
> and the shared datasource are in another .NET solution. The report
> displays,
> but the data does not. Can anyone help me figure out how to make the
> report data display?
> private DataTable LoadReportData()
> {
> DataSet ds = new DataSet();
> ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
> return ds.Tables[1];
> }
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
> ProcessingMode.Local;
> this.ReportViewer1.LocalReport.ReportPath => "C:\\Reports\\ActivitySummaryReport.rdl";
> this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
> Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
> LoadReportData()));
> this.ReportViewer1.LocalReport.EnableExternalImages = true;
> }
> Thanks,
> Paula|||How many tables do you have in your dataset?
Remeber that tables are 0 indexed, so if you had only one table in your
dataset you would want to return Tables[0].
"Paula" <pmpayne@.nospam.com> wrote in message
news:abc40aa6399943198835be4ccb90828a@.ureader.com...
>I use the following code to display a report in the ReportViewer. The
>report
> and the shared datasource are in another .NET solution. The report
> displays,
> but the data does not. Can anyone help me figure out how to make the
> report data display?
> private DataTable LoadReportData()
> {
> DataSet ds = new DataSet();
> ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
> return ds.Tables[1];
> }
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
> ProcessingMode.Local;
> this.ReportViewer1.LocalReport.ReportPath => "C:\\Reports\\ActivitySummaryReport.rdl";
> this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
> Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
> LoadReportData()));
> this.ReportViewer1.LocalReport.EnableExternalImages = true;
> }
> Thanks,
> Paulasql

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 Find

I have a Local report bound to a ReportViewer control and when I am typing in text in the find text box and I click find I get this message on the report viewer "Object reference not set to an instance of an object" anybody have any idea

This is a known issue with the report viewer control. It is fixed in Visual Studio SP1. See this posting for more information:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1032267&SiteID=1

ReportViewer exporting

Hi,

When you export a report in localmode using the ReportViewer export function, a new window will pop up with the download. Is there a way to eliminate that new browser window from coming up? Also, I'm having a little trouble writing some custom code to export the report instead of using the export toolbar. I found the following in a previous post...

1Dim bufferAs Byte(), fAs String, fsAs System.IO.FileStream2 f = System.IO.Path.GetTempFileName()3 System.IO.Path.ChangeExtension(f,"xls")4' there is probably a better way to set up the rendered PDF5 ' for redirecting to the Response output, but this one works.67 ' here is the binding bit. Revise to suit your dynamic situation.8 ' if you aren't really dynamically binding data against one9 ' loaded report, but rather changing10 ' reports to suit the user's needs, that will work too.11Dim ReportDataSourceX =New ReportDataSource()12With Me.ReportViewer1.LocalReport13 buffer = .Render("EXCEL", _14Nothing,Nothing,Nothing,Nothing,Nothing,Nothing)15End With1617 fs =New System.IO.FileStream(f, System.IO.FileMode.Create)18 fs.Write(buffer, 0, buffer.Length)19 fs.Close()20 fs.Dispose()2122 Response.ContentType ="Application/vnd.ms-excel"23 Response.WriteFile(f)24 Response.End()25 System.IO.File.Delete(f)
When  I run this and export, the excel file comes up very quarky with all sorts of symbols and such and does not render correctly, e,g,. the rdlc isn't even loaded and it seems like it is taking the whole page into excel from what I can read from the file.
 
Thanks in advance.

Hi Heyden,

You can do this by usingReportViewer.ExportContentDispositionproperty. UseAlwayInline.

For reference -

http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.reportviewer.exportcontentdisposition(VS.80).aspx

|||

and for custom export functionality check this post -

https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=139828&SiteID=1

|||

Many thank for the AlwaysInline. Solved my problem. I was either going to use custom exporting or try to find a way to eliminate that page. Thanks a bunch again!

|||

I have the same problem. A new window pops-up when trying to download the report in excel through the export toolbar. I don't want to open the report inline. I need a separate window to open the report but I don't want the pop-up window to be present while downloading the report. Is there any way to eliminate the blank window or any way to close it once the download is done.

Thanks in advance !

Shabs

sql

ReportViewer Export Mode--Local Report

Is there a way to turn off PDF export for the ReportViewer control, while keeping the option to export to Excel?

Please let me know.

Thanks.

Unfortunately there is not. You can, however, turn off the entire export option and provide your own button to perform the Excel export, calling ReportViewer.LocalReport.Render() to get the data.

ReportViewer error with SSRS2005 on a non-default website

I am facing a problem when trying to access a report using ReportViewer
ASP.NET 2.0 WebForms control. The reportviewer displays an error "The attempt
to connect to the report server failed. Check your connection information and
that the report server is a compatible version. The request failed with HTTP
status 404: Not Found". When I try to access any of the SSRS2005 Web Service
method (For example: ListChildren) with a proxy, I get an error "The request
failed with HTTP status 404: Not Found."
Here are the exception details:
-----
{"The request failed with HTTP status 404: Not Found."}
[System.Net.WebException]: {"The request failed with HTTP status 404:
Not Found."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: null
Message: "The request failed with HTTP status 404: Not Found."
Source: "Test.MDC.CRI.SSRS2005.Helper"
StackTrace: " at
Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildren(String parentFolder,
Boolean recursive, CatalogItem[]& items) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
252\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildrenByType(String
parentFolder, ItemTypeEnum itemType, Boolean ignoreDatasourceFolder,
SortedList& childItems) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
105\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetFolders(String
parentFolder, Boolean ignoreDatasourceFolder, SortedList& childFolders) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line 26\r\n
at BrowseFolders.Page_Load(Object sender, EventArgs e) in
c:\\SSRS\\CRI\\Prototype2\\ReportViewerWebClient\\UserCtls\\BrowseFolders.ascx.cs:line
33\r\n at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e)\r\n at
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e)\r\n at System.Web.UI.Control.OnLoad(EventArgs e)\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)"
TargetSite: {Boolean GetChildren(System.String, Boolean,
Test.MDC.CRI.SSRS2005.WebService.CatalogItem[] ByRef)}
-----
Response object of System.Net.WebException:
-----
{System.Net.HttpWebResponse}
[System.Net.HttpWebResponse]: {System.Net.HttpWebResponse}
base {System.MarshalByRefObject}: {System.Net.HttpWebResponse}
ContentLength: 629
ContentType: "text/html"
Headers: {Pragma: no-cache
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Content-Length: 629
Cache-Control: no-cache
Content-Type: text/html
}
IsFromCache: false
IsMutuallyAuthenticated: false
ResponseUri:
{http://ssrs.dev.reports.com:8084/ReportServer/ReportService2005.asmx}
-----
My Report Server configuration:
Web Server: Windows 2003 Standard SP1
SQL Server: SQL Enterprise 2005 SP1
Report Server Web Site: Installed on a non-default web site, running under
ASP.NET 2.0, part of app pool with identity NetWork Service
Reporting Services Windows Service running under Local System account
Identity of the web site: Anonymous access disabled, Windows Authentication
checked
Reports virtual directory - Integrated Windows Authentication, Anonymous
disabled
ReportServer virtual directory - Integrated Windows Authentication,
Anonymous disabled
Patches:
1. Disable loopback entry set as per MSKB article:
http://support.microsoft.com/kb/896861/
2. RSWebApplication.config changed as below:
Before:
<UI>
<ReportServerUrl></ReportServerUrl>
<ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
After:
<UI>
<ReportServerUrl>http://ssrs.dev.reports.com:8084/ReportServer</ReportServerUrl>
<ReportServerVirtualDirectory></ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
The following sites runs OK.
- http://ssrs.dev.reports.com:8084/ReportServer/ (Able to deploy reports
to this using VS2005 designer. Currently displays the version Microsoft SQL
Server Reporting Services Version 9.00.2047.00)
- http://ssrs.dev.reports.com:8084/Reports/ (Displays deployed reports and
able to browse folders)
If you can help me to fix the issue, it would be of great help. Struggling
for few days already with this issue.
Thanks,
Live_Love_LaughOne more thing to mention:
After playing with SSRS2005 for few days, I figured out that if the
WebApplication is running of file system(ASP.NET 2.0 feature), rather than on
a website I could able to see the results through report viewer control but
as soon as I put it on IIS, I am getting the error "The attempt to connect to
the report server failed. Check your connection information and that the
report server is a compatible version. The request failed with HTTP status
404: Not Found."
Any ideas?
Thanks,
Live_Love_Laugh
"Live_Love_Laugh" wrote:
> I am facing a problem when trying to access a report using ReportViewer
> ASP.NET 2.0 WebForms control. The reportviewer displays an error "The attempt
> to connect to the report server failed. Check your connection information and
> that the report server is a compatible version. The request failed with HTTP
> status 404: Not Found". When I try to access any of the SSRS2005 Web Service
> method (For example: ListChildren) with a proxy, I get an error "The request
> failed with HTTP status 404: Not Found."
> Here are the exception details:
> -----
> {"The request failed with HTTP status 404: Not Found."}
> [System.Net.WebException]: {"The request failed with HTTP status 404:
> Not Found."}
> Data: {System.Collections.ListDictionaryInternal}
> HelpLink: null
> InnerException: null
> Message: "The request failed with HTTP status 404: Not Found."
> Source: "Test.MDC.CRI.SSRS2005.Helper"
> StackTrace: " at
> Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildren(String parentFolder,
> Boolean recursive, CatalogItem[]& items) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
> 252\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildrenByType(String
> parentFolder, ItemTypeEnum itemType, Boolean ignoreDatasourceFolder,
> SortedList& childItems) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
> 105\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetFolders(String
> parentFolder, Boolean ignoreDatasourceFolder, SortedList& childFolders) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line 26\r\n
> at BrowseFolders.Page_Load(Object sender, EventArgs e) in
> c:\\SSRS\\CRI\\Prototype2\\ReportViewerWebClient\\UserCtls\\BrowseFolders.ascx.cs:line
> 33\r\n at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
> Object o, Object t, EventArgs e)\r\n at
> System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
> EventArgs e)\r\n at System.Web.UI.Control.OnLoad(EventArgs e)\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint)"
> TargetSite: {Boolean GetChildren(System.String, Boolean,
> Test.MDC.CRI.SSRS2005.WebService.CatalogItem[] ByRef)}
> -----
> Response object of System.Net.WebException:
> -----
> {System.Net.HttpWebResponse}
> [System.Net.HttpWebResponse]: {System.Net.HttpWebResponse}
> base {System.MarshalByRefObject}: {System.Net.HttpWebResponse}
> ContentLength: 629
> ContentType: "text/html"
> Headers: {Pragma: no-cache
> Proxy-Connection: Keep-Alive
> Connection: Keep-Alive
> Content-Length: 629
> Cache-Control: no-cache
> Content-Type: text/html
> }
> IsFromCache: false
> IsMutuallyAuthenticated: false
> ResponseUri:
> {http://ssrs.dev.reports.com:8084/ReportServer/ReportService2005.asmx}
> -----
> My Report Server configuration:
> Web Server: Windows 2003 Standard SP1
> SQL Server: SQL Enterprise 2005 SP1
> Report Server Web Site: Installed on a non-default web site, running under
> ASP.NET 2.0, part of app pool with identity NetWork Service
> Reporting Services Windows Service running under Local System account
> Identity of the web site: Anonymous access disabled, Windows Authentication
> checked
> Reports virtual directory - Integrated Windows Authentication, Anonymous
> disabled
> ReportServer virtual directory - Integrated Windows Authentication,
> Anonymous disabled
> Patches:
> 1. Disable loopback entry set as per MSKB article:
> http://support.microsoft.com/kb/896861/
> 2. RSWebApplication.config changed as below:
> Before:
> <UI>
> <ReportServerUrl></ReportServerUrl>
> <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
> <ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
> </UI>
> After:
> <UI>
> <ReportServerUrl>http://ssrs.dev.reports.com:8084/ReportServer</ReportServerUrl>
> <ReportServerVirtualDirectory></ReportServerVirtualDirectory>
> <ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
> </UI>
> The following sites runs OK.
> - http://ssrs.dev.reports.com:8084/ReportServer/ (Able to deploy reports
> to this using VS2005 designer. Currently displays the version Microsoft SQL
> Server Reporting Services Version 9.00.2047.00)
> - http://ssrs.dev.reports.com:8084/Reports/ (Displays deployed reports and
> able to browse folders)
>
> If you can help me to fix the issue, it would be of great help. Struggling
> for few days already with this issue.
> Thanks,
> Live_Love_Laugh

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 render a horizontal scrollbar in IE7

ReportViewer scrollbars are not rendered correctly in IE7. The Vertical
scrollbar can be recovered and the bottom part of the report can be viewed if
you add the folowing to your page:
string userAgent = Request.ServerVariables.Get("HTTP_USER_AGENT");
if(userAgent.Contains("MSIE 7.0"))
vwrReports.Attributes.Add("style", "margin-bottom: 30px;");
But the horizontal scrollbar is not visible at all and part of the report
can not be viewed.There are 3 solutions:
1. 30px might not be enough, adjust it depending on your page content and
size.
2. Use vwrReports.Attributes.Add("style", "overflow:auto;");
3. Downgrade the ReportViewer control from its earliest version with ns:
Microsoft.Samples.ReportingServices.
Good luck.
"Lance.Wulfers" wrote:
> ReportViewer scrollbars are not rendered correctly in IE7. The Vertical
> scrollbar can be recovered and the bottom part of the report can be viewed if
> you add the folowing to your page:
> string userAgent = Request.ServerVariables.Get("HTTP_USER_AGENT");
> if(userAgent.Contains("MSIE 7.0"))
> vwrReports.Attributes.Add("style", "margin-bottom: 30px;");
> But the horizontal scrollbar is not visible at all and part of the report
> can not be viewed.

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.

reportviewer control with asp.net session expired

I embed a report viewer control into a sharepoint web part to generate a
report.
it works very well in firefox. but once open it in IE6, the error message
will be:
ASP.NET sesison has expired.
I got a solution from internet, it says set "AsyncRendering = False".
it will generate the report once without any images appeared if report has
some images. and if I click the link in the report, the same error message
appears:
ASP.NET sesison has expired.
how can I get it fixed? any ideas would be very appericiated!As a compliment:
if I open the sharepoint page in local server, everything works fine.
so what's on hell the problem?
"dongwang" wrote:
> I embed a report viewer control into a sharepoint web part to generate a
> report.
> it works very well in firefox. but once open it in IE6, the error message
> will be:
> ASP.NET sesison has expired.
> I got a solution from internet, it says set "AsyncRendering = False".
> it will generate the report once without any images appeared if report has
> some images. and if I click the link in the report, the same error message
> appears:
> ASP.NET sesison has expired.
> how can I get it fixed? any ideas would be very appericiated!
>|||got solved. but not sure what's happening.
there is a dash in the server name. after geting rid of the dash or using IP
address, it works fine.
"dongwang" wrote:
> As a compliment:
> if I open the sharepoint page in local server, everything works fine.
> so what's on hell the problem?
> "dongwang" wrote:
> > I embed a report viewer control into a sharepoint web part to generate a
> > report.
> > it works very well in firefox. but once open it in IE6, the error message
> > will be:
> >
> > ASP.NET sesison has expired.
> >
> > I got a solution from internet, it says set "AsyncRendering = False".
> > it will generate the report once without any images appeared if report has
> > some images. and if I click the link in the report, the same error message
> > appears:
> > ASP.NET sesison has expired.
> >
> > how can I get it fixed? any ideas would be very appericiated!
> >sql

ReportViewer control questions

I am using report server on SQL2005. I want to embed a ReportViewer control
in an asp.net (1.1) page. I am using Visual Studio .NET. Is this possible,
or do I need to be using Visual Studio 2005?
And, once the ReportViewer control is there, what steps do I need to take in
order for the asp.net process to access report server on a different box in
the same domain? Do I need to add the Network Service account as a user in
report server?
Thanks,
RobHi Rob,
Report viewer comes with VS 2005 so you need to have the .NET 2.0 to use the
report viewer. you cannot use in asp.net 1.1.
for more FAQ see this http://www.gotreportviewer.com/
Let us know how it goes
Thanks
Bava
"Rob" wrote:
> I am using report server on SQL2005. I want to embed a ReportViewer control
> in an asp.net (1.1) page. I am using Visual Studio .NET. Is this possible,
> or do I need to be using Visual Studio 2005?
> And, once the ReportViewer control is there, what steps do I need to take in
> order for the asp.net process to access report server on a different box in
> the same domain? Do I need to add the Network Service account as a user in
> report server?
> Thanks,
> Rob

ReportViewer Control Internal Secrets

Hi,
unfortuntely, MS has changed the logic of their generated Report HTML
between RS 2000 and SSRS 2005 using the WEB RepotViewer control.
In RS 2005 the generated HTML
a) the values of parameter list are no longer the REAL report values -
now it's only the collection id
b) the name of the parameter control can't be identified anymore
because it shows someting like:
"ReportViewerControl_ctl01_ctl01_ctl01_ctl00" that was in RS 2000
always the name of the control - especially of the parameter values.
Now a few question regarding the RS 2005 Web ReportView internals,
perhaps somebody could answer:
1) Is there a possibilty during the runtime to lookup the parameter
controls ReportViewerControl_ctl01_ctl01_ctl01_ctl00 via webservices or
ReportingServices DB to find out what is the original name of the
control?
2) Is there a possibility during the runtime to lookup the collection
id values to find out the corresponding parameter values via
webservices or ReportingServices DB to find out what is the original
name of the control?
3) Is there the plan of MS to allow customizable parameterwith your own
ASP implementation with the next SP'
4) Has somebody experience/ idea how to extract the underlying SQL for
the report parameter or already an inplemenation of a dynamicly
generated Parameter screen only based on the RDL definition &
dependencies?
Thanks a lot
best regards
BBBruce, curious to know if you made any headway on your #2 problem?
As I understand, your trying to get the values that the dropdown list is
populated with.
The best I've come up with so far is to run your own dataset (ADO.NET) and
load the dataset into a combo box. Then pass the ddlist.selectedvalue to the
report parameter collection and send that along to the webservice when
rendering the report.
Let me know if you have more, I'm really trying to find way to build dynamic
webpages, based off the parameters of a particular report. Hence the user
selects a report from a dropdown, and the page (an aspx page) shows the
appropriate controls to satisfy the parameter requirements.
When a different with different set of parameters is selected the screen is
changed accordingly.
Thanks,
rwiethorn
"BB_Reporting" wrote:
> Hi,
> unfortuntely, MS has changed the logic of their generated Report HTML
> between RS 2000 and SSRS 2005 using the WEB RepotViewer control.
> In RS 2005 the generated HTML
> a) the values of parameter list are no longer the REAL report values -
> now it's only the collection id
> b) the name of the parameter control can't be identified anymore
> because it shows someting like:
> "ReportViewerControl_ctl01_ctl01_ctl01_ctl00" that was in RS 2000
> always the name of the control - especially of the parameter values.
> Now a few question regarding the RS 2005 Web ReportView internals,
> perhaps somebody could answer:
> 1) Is there a possibilty during the runtime to lookup the parameter
> controls ReportViewerControl_ctl01_ctl01_ctl01_ctl00 via webservices or
> ReportingServices DB to find out what is the original name of the
> control?
> 2) Is there a possibility during the runtime to lookup the collection
> id values to find out the corresponding parameter values via
> webservices or ReportingServices DB to find out what is the original
> name of the control?
> 3) Is there the plan of MS to allow customizable parameterwith your own
> ASP implementation with the next SP'
> 4) Has somebody experience/ idea how to extract the underlying SQL for
> the report parameter or already an inplemenation of a dynamicly
> generated Parameter screen only based on the RDL definition &
> dependencies?
> Thanks a lot
> best regards
> BB
>

Wednesday, March 28, 2012

ReportViewer control for WinForms - can I copy text?

I am using the ReportViewer control for Windows Forms, and I would like to be able let my users copy text from the report. Is there any way to configure this? At the moment, the text is not selectable.

Thanks,
Erick

Unfortuntately, the text is not selectable in the winforms reportviewer control. This is something we hope to enable in the future.|||

I understand, thanks. I've been getting a lot of pushback from users on this issue, so I'm glad to hear it's on your radar screen.

Thanks,
Erick

ReportViewer control and logins

I am using a ReportViewer control in an asp.net 2.0 application

The report being run was created in SSRS using a shared data source. When I run the report it requests username and password.

How do I get around this or pass the username and password at runtime??

Thanks

Save the credntial in your datasource and then impersonate user a user who has priviliges on the reporting server as follow

in the web.config

<identity impersonate="true" userName="Domain\username" password="Pass"/>

|||

I tried that but it wants the login info for the dabase that is in the shared data sources.

Do I do that the same?

|||

When you edit the datasource > Properties > General, click 'Credentials stored securely in the report server' and enter a username and password that has rights to your database. It will then use the login info every time the report is invoked, (if that is what I understand you are trying to do).

|||

Yeah thanks

I got it somehow it got lost. When I checked update datasource all got fixed.