Showing posts with label reportviewer. Show all posts
Showing posts with label reportviewer. Show all posts

Tuesday, March 20, 2012

Associating Report Viewer (without UI) with Data Set

Hello all - I am looking to use the ReportViewer Control to automatically print out some client based reports.

I started with the "Print a report from a console app" sample from http://www.gotreportviewer.com/.

I have managed to convert an existing server based report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I believe I have also successfully passed in the correct parameters to the sproc, but now I need to associate this new Data Set with the RDLC report. The RDLC has a simple table control that has a few fields from the new Data Set. When the report is rendered, I receive an exception indicating the following:

{"A data source instance has not been supplied for the data source "Production_stpProductionByDay"."}

It would seem that I need to programmatically associate my Data Set with the report, but I cannot seem to figure out the correct syntax.

Here is my Run method:

m_PhaseID = 1

m_ShiftID = 1

m_DateTime = Now()

Dim report As LocalReport = New LocalReport()

Dim parReport(2) As ReportParameter

Dim parDay As New ReportParameter("Day", m_DateTime)

Dim parPhaseID As New ReportParameter("PhaseID", m_PhaseID)

Dim parShiftID As New ReportParameter("ShiftID", m_ShiftID)

parReport(0) = parDay

parReport(1) = parPhaseID

parReport(2) = parShiftID

report.ReportPath = "C:\Documents and Settings\Kruse\My Documents\Visual Studio 2005\Projects\ShellyReportPrint\ShellyReportPrint\Production.rdlc"

report.SetParameters(parReport)

Export(report)

m_currentPageIndex = 0

Print()

Any help would be greatly appreciated! Thanks..

I have yet to find a solution for this issue... has anyone else implemented something similar?

If not, I guess I will have to wait until TechEd 2K6!

Monday, February 13, 2012

ASP.NET ReportViewer Problems

Hi,
I am using the web version of the ReportViewer control in a Visual
Studio 2005 Beta 2 project. We have an Oracle database, and SQL
Reporting Services. I have been using the ReportViewer in local mode
therefore.
But I have a problem with printing/output of reports. At the moment
the ReportViewer will only export to Excel, which is the only way to
get a report to print.
Is there a way to get a report to output all pages of a report at once
using the viewer. Then users could simply print the web page to print
out the report without having to export to Excel.
Is there something I am doing wrong? Is there a way to export a report
programmatically somehow? (Remembering I am using local mode. Should I
really be using the SQL Reporting Services server? If so can I using
the SQL 2005 Express tool?).
Thanks for any help,
Regards,
RichardSorry, I meant to say we have an Oracle database and *no* SQL Reporting
services.
Thanks,
Richard|||Now some time has passed, it would be worth trying the release version as it
has lots of improvements over the beta 2 version.

ASP.NET ReportViewer control (IReportServerConnection2) Invalid UR

Hi -- I'm trying to use the ReportViewer control in an ASP.net app. I'm
positive the web.config settings are correct (server url, username, p/w,
etc.).
I keep getting "Invalid URI: the hostname could not be parsed".
Any ideas?
I can get this to work using the WinForms ReportViewer control (same RS2005
server and credentials)...
Thanks!Did you ever figure out your problem with the "Invalid:URI The hostname cannot be parsed"?
I'm running into the same problem.
EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com|||No I didn't...
"Mark" wrote:
> Did you ever figure out your problem with the "Invalid:URI The hostname cannot be parsed"?
> I'm running into the same problem.
> EggHeadCafe - .NET Developer Portal of Choice
> http://www.eggheadcafe.com
>

ASP.NET reportviewer control %width and %height

I'm using the report viewer control on an ASP.net webpage. I'm trying to set
height and width of the control using %. I cannot see any report content on
my screen. (rs 2005) Is this a bug and if so is there a workaround?
ThanksYou too huh? Width = 100% seems to work fine. It's the height that seems
to cause the problem.
"David" <David@.discussions.microsoft.com> wrote in message
news:13BE747E-29F4-473A-88C9-30EF684F4680@.microsoft.com...
> I'm using the report viewer control on an ASP.net webpage. I'm trying to
> set
> height and width of the control using %. I cannot see any report content
> on
> my screen. (rs 2005) Is this a bug and if so is there a workaround?
> Thanks

ASP.NET ReportViewer / Non-String parameters

I am displaying a local report in a ReportViewer control on an asp.net web page. My report contains non-string parameters. How can i set a non-string parameter value on a local report?You will need to call .ToString() on your value to set it on ReportParameter.|||That would result in a string being passed to the report. I want to pass a float or a datetime to the report.

The only way i've been able to get this to work is to create a typed dataset with the "parameters" i want sent and then use aggregation functions (first,sum, etc...) to get to the data into the report. That is a big workaround in order to get a few simple floats and times into my report. Has anyone been able to get this done using another method?
|||If the data type of the parameter is set to integer/float, you can do these operations. And you can always convert between types in a report expression.

ASP.Net ReportingServices & CPU Usage

I have a report (stored procedure) that I have set up in SQL 2005
Reporting Services. In a web app, I put a Reportviewer control on the
page, and call the report. After a lot of trial & error, it appears to
work.
Sort of.
What happens is when I open it on that tab (I am using AJAX Tab panels,
which had been working fine without this behavior prior to finally
getting the reportviewer working), and the report displays, the "e" on
Internet explorer at the top of the tab now flickers, like the page is
reloading. It also runs the CPU up to 100% on the computer and although
I can go from tab to tab in it (I am using AJAX tab panels in the page),
it will take like up to a minute to go to the next tab. I'm not doing
anything really data-intensive on those tabs, and they had been
functioning fine prior to putting in the report viewer (i.e. they
weren't flickering & clocking the CPU).
I eventually have to kill the page to do anything, because it has the
system up to 100%.
Any idea why reportviewer might make this act this way?
Thanks for the help,How much data are you churning in RS? The way to tell is look at how much
data is actaully returned from the sproc.
As much as possible, try to filter down your data and do calcs in the sproc,
not in RS. If you return large data sets to RS, you will churn the machine.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
"Blasting Cap" <goober@.christian.net> wrote in message
news:%23GxNIeu0HHA.5884@.TK2MSFTNGP02.phx.gbl...
>I have a report (stored procedure) that I have set up in SQL 2005 Reporting
>Services. In a web app, I put a Reportviewer control on the page, and call
>the report. After a lot of trial & error, it appears to work.
> Sort of.
> What happens is when I open it on that tab (I am using AJAX Tab panels,
> which had been working fine without this behavior prior to finally getting
> the reportviewer working), and the report displays, the "e" on Internet
> explorer at the top of the tab now flickers, like the page is reloading.
> It also runs the CPU up to 100% on the computer and although I can go from
> tab to tab in it (I am using AJAX tab panels in the page), it will take
> like up to a minute to go to the next tab. I'm not doing anything really
> data-intensive on those tabs, and they had been functioning fine prior to
> putting in the report viewer (i.e. they weren't flickering & clocking the
> CPU).
> I eventually have to kill the page to do anything, because it has the
> system up to 100%.
> Any idea why reportviewer might make this act this way?
> Thanks for the help,
>|||That's just it - the data isn't that much.
I'm calling a stored procedure with 5 parameters, and it returns 1588
rows in Query Analyzer, and runs in 5 seconds there. The only
difference in QA and the Reportviewer is that I am subtotaling & grand
totaling 3 columns.
If I try to run this from within the ReportViewer, when launching that
web page, it will run the CPU up to 100% until I kill it. Pages are
extremely sluggish, and it'll take a minute or two to just go between
tabs on those 3 pages. I'm doing a Gridview on one tab, that returns
about 50 records, and a dropdown box on the second tab that returns
about 25 records, and then this one that I'm doing in the Reportviewer.
If I take out the reportviewer, the other two pages work as they should,
in next to no time at all.
Once I add back the reportviewer, the "e" on the Internet Explorer tab
flickers and I can watch the CPU usage on the computer go to 100% and
stay there until I kill the procedure. I can close it out using the X
on internet explorer, but it takes several minutes for the web browser
to detect that I've killed the window.
This is behavior beyond strange.
BC
Cowboy (Gregory A. Beamer) wrote:
> How much data are you churning in RS? The way to tell is look at how much
> data is actaully returned from the sproc.
> As much as possible, try to filter down your data and do calcs in the sproc,
> not in RS. If you return large data sets to RS, you will churn the machine.
>|||Try returning the aggregates from the stored procedure and see how that
changes things. It could be that your total calculations are causing issue.
I will have to mull over other possibilities.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
"Blasting Cap" <goober@.christian.net> wrote in message
news:ecQXoO30HHA.4344@.TK2MSFTNGP03.phx.gbl...
> That's just it - the data isn't that much.
> I'm calling a stored procedure with 5 parameters, and it returns 1588 rows
> in Query Analyzer, and runs in 5 seconds there. The only difference in QA
> and the Reportviewer is that I am subtotaling & grand totaling 3 columns.
> If I try to run this from within the ReportViewer, when launching that web
> page, it will run the CPU up to 100% until I kill it. Pages are extremely
> sluggish, and it'll take a minute or two to just go between tabs on those
> 3 pages. I'm doing a Gridview on one tab, that returns about 50 records,
> and a dropdown box on the second tab that returns about 25 records, and
> then this one that I'm doing in the Reportviewer.
> If I take out the reportviewer, the other two pages work as they should,
> in next to no time at all.
> Once I add back the reportviewer, the "e" on the Internet Explorer tab
> flickers and I can watch the CPU usage on the computer go to 100% and stay
> there until I kill the procedure. I can close it out using the X on
> internet explorer, but it takes several minutes for the web browser to
> detect that I've killed the window.
> This is behavior beyond strange.
>
> BC
>
> Cowboy (Gregory A. Beamer) wrote:
>> How much data are you churning in RS? The way to tell is look at how much
>> data is actaully returned from the sproc.
>> As much as possible, try to filter down your data and do calcs in the
>> sproc, not in RS. If you return large data sets to RS, you will churn the
>> machine.|||What happens when you run the report from the web interface using Report
Manager. This will tell you if it is a report issue or an integration issue
with ReportViewer. My guess is that you are telling reportviewer over and
over again to get the report.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:ecQXoO30HHA.4344@.TK2MSFTNGP03.phx.gbl...
> That's just it - the data isn't that much.
> I'm calling a stored procedure with 5 parameters, and it returns 1588 rows
> in Query Analyzer, and runs in 5 seconds there. The only difference in QA
> and the Reportviewer is that I am subtotaling & grand totaling 3 columns.
> If I try to run this from within the ReportViewer, when launching that web
> page, it will run the CPU up to 100% until I kill it. Pages are extremely
> sluggish, and it'll take a minute or two to just go between tabs on those
> 3 pages. I'm doing a Gridview on one tab, that returns about 50 records,
> and a dropdown box on the second tab that returns about 25 records, and
> then this one that I'm doing in the Reportviewer.
> If I take out the reportviewer, the other two pages work as they should,
> in next to no time at all.
> Once I add back the reportviewer, the "e" on the Internet Explorer tab
> flickers and I can watch the CPU usage on the computer go to 100% and stay
> there until I kill the procedure. I can close it out using the X on
> internet explorer, but it takes several minutes for the web browser to
> detect that I've killed the window.
> This is behavior beyond strange.
>
> BC
>
> Cowboy (Gregory A. Beamer) wrote:
>> How much data are you churning in RS? The way to tell is look at how much
>> data is actaully returned from the sproc.
>> As much as possible, try to filter down your data and do calcs in the
>> sproc, not in RS. If you return large data sets to RS, you will churn the
>> machine.|||Just for giggles, I did another report, basically taking a product
listing, that would return about 100 records, that had some numeric
fields on it, but I didn't do any summing or totalling.
This report performs the same way when I call it from the reportviewer.
If I go to the website, http://mycomputer/reports$sql2005, and run it,
it takes about 5 seconds to display & you don't get the "flickering" of
the "e" on Internet Explorer like you do when I try to run the same
report from within the report viewer.
How am I telling the reportviewer over & over again to get the report?
The fact that I have no totaling in the report tells me that it's not
the returning of the data that is the problem.
The code that calls the report:
<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
<ContentTemplate>
<rsweb:reportviewer id="ReportViewer1"
runat="server" font-names="Verdana" font-size="8pt"
height="90%" width="90%"
ProcessingMode="Remote">
<ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
ReportPath="/BA10listing"></ServerReport>
</rsweb:reportviewer>
</ContentTemplate>
</cc1:TabPanel>
BC
Bruce L-C [MVP] wrote:
> What happens when you run the report from the web interface using Report
> Manager. This will tell you if it is a report issue or an integration issue
> with ReportViewer. My guess is that you are telling reportviewer over and
> over again to get the report.
>|||I have only used the winform version of the reportviewer control (I assume
you are using the reportviewer control that ships with VS 2005). Somewhere
you have to be responding to an event where you tell the control what report
to render. If you do this over and over again you could be causing it to
thrash.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:OD6qfF60HHA.5380@.TK2MSFTNGP04.phx.gbl...
> Just for giggles, I did another report, basically taking a product
> listing, that would return about 100 records, that had some numeric fields
> on it, but I didn't do any summing or totalling.
>
> This report performs the same way when I call it from the reportviewer.
> If I go to the website, http://mycomputer/reports$sql2005, and run it, it
> takes about 5 seconds to display & you don't get the "flickering" of the
> "e" on Internet Explorer like you do when I try to run the same report
> from within the report viewer.
> How am I telling the reportviewer over & over again to get the report?
> The fact that I have no totaling in the report tells me that it's not the
> returning of the data that is the problem.
> The code that calls the report:
> <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
> <ContentTemplate>
> <rsweb:reportviewer id="ReportViewer1"
> runat="server" font-names="Verdana" font-size="8pt"
> height="90%" width="90%"
> ProcessingMode="Remote">
> <ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
> ReportPath="/BA10listing"></ServerReport>
> </rsweb:reportviewer>
> </ContentTemplate>
> </cc1:TabPanel>
> BC
>
>
> Bruce L-C [MVP] wrote:
>> What happens when you run the report from the web interface using Report
>> Manager. This will tell you if it is a report issue or an integration
>> issue with ReportViewer. My guess is that you are telling reportviewer
>> over and over again to get the report.|||Try the reportviewer control on a simple web page and see if the same thing
happens. I.e. no tabs, just a single simple web page.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:OD6qfF60HHA.5380@.TK2MSFTNGP04.phx.gbl...
> Just for giggles, I did another report, basically taking a product
> listing, that would return about 100 records, that had some numeric fields
> on it, but I didn't do any summing or totalling.
>
> This report performs the same way when I call it from the reportviewer.
> If I go to the website, http://mycomputer/reports$sql2005, and run it, it
> takes about 5 seconds to display & you don't get the "flickering" of the
> "e" on Internet Explorer like you do when I try to run the same report
> from within the report viewer.
> How am I telling the reportviewer over & over again to get the report?
> The fact that I have no totaling in the report tells me that it's not the
> returning of the data that is the problem.
> The code that calls the report:
> <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
> <ContentTemplate>
> <rsweb:reportviewer id="ReportViewer1"
> runat="server" font-names="Verdana" font-size="8pt"
> height="90%" width="90%"
> ProcessingMode="Remote">
> <ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
> ReportPath="/BA10listing"></ServerReport>
> </rsweb:reportviewer>
> </ContentTemplate>
> </cc1:TabPanel>
> BC
>
>
> Bruce L-C [MVP] wrote:
>> What happens when you run the report from the web interface using Report
>> Manager. This will tell you if it is a report issue or an integration
>> issue with ReportViewer. My guess is that you are telling reportviewer
>> over and over again to get the report.|||I tried it in the following ways:
- I took an AJAX enabled web page, and added the reportviewer to it.
Brought up the report, did the same thing - the "flickering" of the "e"
on Internet explorer, acting like the page is loading.
I figured then that it could be that AJAX itself was causing the problem.
- I went in & created just a regular old ASP.NET page. (HTML follows).
It performed exactly the same way as the others, pegging the CPU at
100% until I killed it.
The report itself was a "nothing" report - returned 100 or so records,
no sums, no totals, no formatting.
HTML of the regular aspx page is:
<%@. Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. 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="400px"
ProcessingMode="Remote" Width="400px">
<ServerReport ReportPath="/BA10listing"
ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
</rsweb:ReportViewer>
</div>
</form>
</body>
</html>
I've looked at the properties of it, too.
Under BEHAVIOR:
Enabled = True
EnableTheming = True
EnableViewState = True
Visible = True
Under MISC:
AsyncRendering = True
ExportContentDisposition = OnlyHTMLInline
under LocalReport
EnableExternal Images = False
EnableHyperlinks = False
Processingmode = Remote
Under SERVERREPORT - everything's in there - the report name, the
reportserverURL, that both work.
Under TOOLBAR:
DocumentMapCollapsed = False
ShowbackButton = False
ShowDocumentMapButton = True
ShowExportControls = True
ShowFindControls = True
ShowPageNavigationControls = True
ShowPrintButton = True
ShowPromptAreaButton = True
Show RefreshButton = True
ShowZoomControl = True
I don't see anything that "obviously" would make it refresh/hang like it
does.
Using VS 2005, Windows XP. It performs the same way whether I connect
to the local box(my computer) with both SQL 2000 & SQL 2005 on it, or to
a remote box with both on it too.
Any help, suggestions appreciated.
Thanks,
BC
Bruce L-C [MVP] wrote:
> Try the reportviewer control on a simple web page and see if the same thing
> happens. I.e. no tabs, just a single simple web page.
>|||Again, note that I have only used this with Winform control not webform
control. A couple of things to try. Try turning async off. Next, don't have
the report hardcoded. Instead, put a button that sets the report name and
other information (just as a test)
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:%233ryDeE1HHA.5360@.TK2MSFTNGP03.phx.gbl...
>I tried it in the following ways:
> - I took an AJAX enabled web page, and added the reportviewer to it.
> Brought up the report, did the same thing - the "flickering" of the "e" on
> Internet explorer, acting like the page is loading.
> I figured then that it could be that AJAX itself was causing the problem.
> - I went in & created just a regular old ASP.NET page. (HTML follows).
> It performed exactly the same way as the others, pegging the CPU at 100%
> until I killed it.
> The report itself was a "nothing" report - returned 100 or so records, no
> sums, no totals, no formatting.
> HTML of the regular aspx page is:
> <%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
> Inherits="_Default" %>
> <%@. 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="400px"
> ProcessingMode="Remote" Width="400px">
> <ServerReport ReportPath="/BA10listing"
> ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
> </rsweb:ReportViewer>
> </div>
> </form>
> </body>
> </html>
>
> I've looked at the properties of it, too.
> Under BEHAVIOR:
> Enabled = True
> EnableTheming = True
> EnableViewState = True
> Visible = True
> Under MISC:
> AsyncRendering = True
> ExportContentDisposition = OnlyHTMLInline
> under LocalReport
> EnableExternal Images = False
> EnableHyperlinks = False
> Processingmode = Remote
> Under SERVERREPORT - everything's in there - the report name, the
> reportserverURL, that both work.
> Under TOOLBAR:
> DocumentMapCollapsed = False
> ShowbackButton = False
> ShowDocumentMapButton = True
> ShowExportControls = True
> ShowFindControls = True
> ShowPageNavigationControls = True
> ShowPrintButton = True
> ShowPromptAreaButton = True
> Show RefreshButton = True
> ShowZoomControl = True
> I don't see anything that "obviously" would make it refresh/hang like it
> does.
> Using VS 2005, Windows XP. It performs the same way whether I connect to
> the local box(my computer) with both SQL 2000 & SQL 2005 on it, or to a
> remote box with both on it too.
> Any help, suggestions appreciated.
> Thanks,
> BC
>
> Bruce L-C [MVP] wrote:
>> Try the reportviewer control on a simple web page and see if the same
>> thing happens. I.e. no tabs, just a single simple web page.|||I tried turning off Async, and it didn't make any difference.
On the page (plain old dot net aspx page), what I've found out is that
it will load and act normally, but as soon as the page has been
rendered, it starts the clocking behavior. When you try to move the
scrollbars on the report, etc. it takes a long time to get them to
respond. And when they do, they immediately go back to maxing out the
CPU.
I tried the suggestion of putting a button that sets the report name,
and it didn't make any difference. Code is below.
What happened was that when I ran the page, with the
reportviewer1.visible = false, only the button rendered and the web page
was fine - it wasn't hanging the CPU. I hit the button, and it performs
exactly as I indicated earlier. It displays the report, and it pegs the
CPU at 100% and stays that way until I kill the page.
Here's the code in the codefile:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Me.ReportViewer1.Visible = False
End If
ReportViewer1.ServerReport.ReportPath = ""
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
ReportViewer1.Visible = True
ReportViewer1.ServerReport.ReportPath = "/BA10listing"
End Sub
The code in the aspx part of the page:
<%@. Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. 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>
<asp:Button ID="Button1" runat="server" Text="Button" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana" Font-Size="8pt" Height="400px"
ProcessingMode="Remote" Width="400px" AsyncRendering="False"
ShowDocumentMapButton="False">
<ServerReport ReportPath="/BA10listing"
ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
</rsweb:ReportViewer>
</div>
</form>
</body>
</html>
... so you can see there's a lot going on here. The report returns
~100 records or so, no calculations, no summation, no grand totals.
Basically a "nothing" report, just listing product info data. Both the
IIS and the reportserver are on my computer.
In SQL Reporting Services in the web browser, this report displays fine,
no problems. It's only when I call it from the Reportviewer inside a
web page that it hangs.
Any ideas? Anyone?
BC
Bruce L-C [MVP] wrote:
> Again, note that I have only used this with Winform control not webform
> control. A couple of things to try. Try turning async off. Next, don't have
> the report hardcoded. Instead, put a button that sets the report name and
> other information (just as a test)
>|||I suggest posting this to the web based forums. I know the other MVP hangs
out there and he has used this control a lot. I suggest putting reportviewer
control in the subject.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:eewpPgH1HHA.4652@.TK2MSFTNGP05.phx.gbl...
> I tried turning off Async, and it didn't make any difference.
> On the page (plain old dot net aspx page), what I've found out is that it
> will load and act normally, but as soon as the page has been rendered, it
> starts the clocking behavior. When you try to move the scrollbars on the
> report, etc. it takes a long time to get them to respond. And when they
> do, they immediately go back to maxing out the CPU.
> I tried the suggestion of putting a button that sets the report name, and
> it didn't make any difference. Code is below.
> What happened was that when I ran the page, with the reportviewer1.visible
> = false, only the button rendered and the web page was fine - it wasn't
> hanging the CPU. I hit the button, and it performs exactly as I indicated
> earlier. It displays the report, and it pegs the CPU at 100% and stays
> that way until I kill the page.
> Here's the code in the codefile:
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> If Not Page.IsPostBack Then
> Me.ReportViewer1.Visible = False
> End If
> ReportViewer1.ServerReport.ReportPath = ""
> End Sub
> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> ReportViewer1.Visible = True
> ReportViewer1.ServerReport.ReportPath = "/BA10listing"
> End Sub
> The code in the aspx part of the page:
> <%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
> Inherits="_Default" %>
> <%@. 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>
> <asp:Button ID="Button1" runat="server" Text="Button" />
> <rsweb:ReportViewer ID="ReportViewer1" runat="server"
> Font-Names="Verdana" Font-Size="8pt" Height="400px"
> ProcessingMode="Remote" Width="400px" AsyncRendering="False"
> ShowDocumentMapButton="False">
> <ServerReport ReportPath="/BA10listing"
> ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
> </rsweb:ReportViewer>
>
> </div>
> </form>
> </body>
> </html>
>
> ... so you can see there's a lot going on here. The report returns ~100
> records or so, no calculations, no summation, no grand totals. Basically a
> "nothing" report, just listing product info data. Both the IIS and the
> reportserver are on my computer.
> In SQL Reporting Services in the web browser, this report displays fine,
> no problems. It's only when I call it from the Reportviewer inside a web
> page that it hangs.
> Any ideas? Anyone?
> BC
>
>
> Bruce L-C [MVP] wrote:
>> Again, note that I have only used this with Winform control not webform
>> control. A couple of things to try. Try turning async off. Next, don't
>> have the report hardcoded. Instead, put a button that sets the report
>> name and other information (just as a test)

Sunday, February 12, 2012

Asp.net C# app calling up Reports

Hi,
Does any one have samples(code) on how to have a asp.net app call up
reports. How about
samples on using the Reportviewer control as well?
Thanks,
JJThe link explains step by step procedure on calling a report to a asp.net app
http://www.codeproject.com/aspnet/AHCreatRepsAspNet.asp
Hope this helps
Rajan
"JJ" wrote:
> Hi,
> Does any one have samples(code) on how to have a asp.net app call up
> reports. How about
> samples on using the Reportviewer control as well?
> Thanks,
> JJ
>
>