Showing posts with label business. Show all posts
Showing posts with label business. Show all posts

Wednesday, March 28, 2012

Reportviewer Control (from VS 2005, in conjunction with SQL Reporting Services)

I have a report (stored procedure) that I have set up in SQL 2005 Reporting Services. I've designed this report (using SQL server business intelligence studio), and several other reports, thinking that running totals or summing may be the issue, but it hasn't been. The latest iteration has been just a display of product info, about 100 records, no fields formatted or summed. Very very simple, straight-forward report. If I go to the Report server & upload the rdl file, it displays fine, performs as it should, paging & exporting - everything works fine. The issue comes up when in a web app, I put a Reportviewer control on the page, and call the report.

It works, sort of.

Originally, I had written the page using ASP.NET AJAX Enabled web project, and I had been using the Tab Container on the page. 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).

Thinking that the Tab Container may be the issue, I created just a plain AJAX Enabled web project and put the same reportviewer on it. Same performance. It'll display the report, and then take the system up to 100% and stay there until I kill the browser.

After that, I did just a plain old ASP.Net web project and put the report viewer control on it. Same result. The report will display, but as soon as it does, the "e" on Internet Explorer tab starts flickering and you see the CPU go to 100% and stay there. I've left it for 20-30 minutes with no change. It appears as if the page is constantly refreshing.

Thinking that the issue may be related to having the reportviewer report hard coded in the app, I put a button on the page, and assigned the button to put in the report. It displays, but it again runs the CPU up to 100% and stays there.

I thought that having Asynch = True (run the report asynchronously) might be the issue, but setting it to false made no difference.

I eventually have to kill the page to do anything, because it has the system up to 100%.

The code I am using on this page follows:

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>
&nbsp;

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

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 idea why reportviewer might make this act this way?

My system is running Windows XP, VS 2005, I have both SQL 2000 and SQL 2005 on this same box. I have a server that has both SQL 2000 & SQL 2005 on it as well, and the behavior is the same for both, whether I run the web page with the Reportviewer control on it with the report being on the local system, or the remote system.

Any help or advice would be very much appreciated.

Thanks!!!

SC

Is this your thread?

http://aspalliance.com/groups/microsoft_public_dotnet_framework_aspnet/ng-1328888_ASP_Net_ReportingServices_CPU_Usage.aspx

|||Greg - yes it is.

I was following Bruce L-C [MVP]'s suggestion:

"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"

I had combined several of the things I tried into one post.

SC

|||

I think there is a page refresh time interval on the report viewer. You may have set that to a small amount of time therefore causing the report to refresh itself very frequently.

I'll see if I can dig up where that is.

|||

On the report properties screen -> general tab see if you have autorefresh checked and if yes then is it set to a very small number of seconds?

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

|||If I go to the web page: SQL Server Reporting Services:

http://mycomputer/Reports$SQL20005 and go to the Properties link, on the General tab, the only checkbox I see is "Hide in list view" which is not checked.

On the Data Sources link:
Custom data source is selected, Connection type is Microsoft SQL Server, and it has the connection string for it. Connect Using is set to Credentials Stored Securely in the Report Server. Nothing else is checked or selected.

On the Execution Link:
Always Run this report with the most recent data is selected.
Do Not Cache temporary copies of this report
and under Report Execution Timeout, Use the System Default Setting is selected.

On History link:
Allow report history to be created manually is selected
and under the Select Number of Snapshots to keep, Use Default Setting is selected.

On the Security tab, there are 2 groups of users, one is Builtin\Administrators, and the other is me.

If you're talking about the Reportviewer properties, the only timer number I see is the Timeout number, which is 60000.

If I go back in to the VS 2005 (SQL Server Business Intelligence Development Studio), there is an Autorefresh property there, that's set to 0.

Assuming that's the one you're referring to, is there a way to disable that, to make it a static report? I'm going to set it to a large number & see if that makes any difference.

SC

|||

Schatham wrote:

If I go back in to the VS 2005 (SQL Server Business Intelligence Development Studio), there is an Autorefresh property there, that's set to 0.

Assuming that's the one you're referring to, is there a way to disable that, to make it a static report? I'm going to set it to a large number & see if that makes any difference.

SC

Either uncheck the box so that there is no autorefresh or set it to a large number. I have a feeling that setting that to zero will actually make the page refresh every .00000000000001 seconds and this is the thrashing that you are seeing.

|||I made the change, changing the setting from 0 to 10000. It says that that is in seconds, which 10,000 should be plenty. However, when I call it from the reportviewer, it still does not seem to make any difference.

I cannot find a way to set that same property from within the web application.

SC
|||

So you think it is report viewer? Do other reports do the same thing in report viewer?|||This is in the Report designer (SQL Server Business Intelligence Development Studio), where I'm looking at the report, in design & preview mode. There isn't a checkbox to enable or disable it, Autorefresh is just a property underneath MISC (properties of Report), where you can populate Author, Description, etc. I'm looking at the BA10listing.rdl That's an XML file with my query and the formatting in it.

SC
|||

http://i55.photobucket.com/albums/g121/Farsight38/report.jpg

This is the autorefresh I was referring to. What is this value set to?

|||I had edited that report and set it to 10,000. It had been 0.

When the 10,000 didn't appear to make any difference, I visited the link you sent, and went in to that. In there Autorefresh was checked, and the value showed 10,000. I unchecked it, rebuilt the report and uploaded BA10listing.rdl into SQL Server Reporting Services. Displayed it there to confirm it worked, then re-ran the ASP.Net web page with the Reportviewer control in it.

The reportviewer web control still behaved the same way. As soon as the report was generated, the CPU on that instance of Internet Explorer then zooms up to between 90-100% and stays there.

At this point, I don't know if its some sort of issue between the Reportviewer AND the .rdl report or what exactly it is.

This is the 3rd or 4th report I've tried to do. All of them were either more complex or returned more data than this one, but all have performed the same way.

SC
|||

Have you tried using a different internet browser like firefox or netscape? There is some variable in this equation that just isn't quite right. I suspect it is the report viewer.

|||I've tried it in Firefox.

Although the formatting of the data isn't quite right (it collapses all the columns up next to each other), it displays & you can page back & forth thru the document. It doesn't "spike" the CPU & hold it at or near 100%.

I'm not sure what settings to check inside ReportViewer (the web control in VS 2005). None of them "obviously" lend themselves to be a refresh setting.

SC
|||

What version of Internet Explorer are you using? Have you tried uninstalling and installing the latest version?

Monday, March 12, 2012

Reports Delivered Email On Demand

The business people at my office would like be able to generate emails with
the results of a SQL query attached as an excel spreadsheet on demand.
Please note that these queries take more than 30 seconds so any use needs to
be asynchronous. Iâ'd like to have the same functionality as email sent to
subscribers, but without creating a subscription. Is there a way to do this
in SQL Reporting Services? If not is there a good alternative?
Thanks for any help.Hello,
Based on my experience, you need to write your customer .net code to
generate the excel file and send it to the user.
Reporting Services has provide a Web Services Interface and you could use
this to render the report to Excel.
Then you could use the code to send the file to the customer.
Here are the articles about how to use Web Services to render the Report:
How to create a sample application that uses the Reporting Services SOAP
APIs to render a report to a selected file format on a Web page
http://support.microsoft.com/kb/875447/en-us
ReportingService.Render Method (Reporting Services 2000)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/
rsp_ref_soapapi_service_lz_6x0z.asp
ReportExecutionService.Render Method (Reporting Services 2005)
http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswe
bservice.rsexecutionservice2005.reportexecutionservice.render.aspx
Also, here is a sample for how to send the email
Send Mail Sample
http://msdn2.microsoft.com/en-us/library/ms173026.aspx
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Monday, February 20, 2012

Reporting Services/BI Model processing

My company is in the process of migrating to SQL Reporting Services 2005. At
this time we are most interested in the Business Intelligence functionality
included in SS2K5. While we were testing this product we had everything all
on the same box...SS, Reporting Services, web tools...everything. Now, we are
scaling out the project and are trying to determine where the processing of
the reports and BI models takes place. Is it on the SQL Server box or on the
Reporting Services box?
Thanks in advance!!
--
ManuelRS is a aps.net application. It uses SQL Server databases for its object and
metadata storage. It stores reporting definitions, subscriptions, etc.
Rendering occurs in RAM. So, a big report can definitely really drag on the
server. Then, if your data is also coming from SQL Server then SQL Server DB
engine has the work to retrieve the data. This is totally separate from the
work that RS is doing.
When RS is put on its own server you still need to have a SQL Server license
for the box. It doesn't matter where the RS databases reside (ReportServer
and ReportServerTempDB). My advice is, unless you are doing a web farm,
install the SQL Server database for the metadata storage on the box that
will run RS. Then keep the data you are reporting off of on a second box. In
that way, the temp data storage, the report definitions, etc are close at
hand. And, a big report won't slow down your database server which contains
your data.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"mlg1906" <mlg1906@.discussions.microsoft.com> wrote in message
news:256AEE4E-AC81-4388-A20B-67247EE7EA59@.microsoft.com...
> My company is in the process of migrating to SQL Reporting Services 2005.
> At
> this time we are most interested in the Business Intelligence
> functionality
> included in SS2K5. While we were testing this product we had everything
> all
> on the same box...SS, Reporting Services, web tools...everything. Now, we
> are
> scaling out the project and are trying to determine where the processing
> of
> the reports and BI models takes place. Is it on the SQL Server box or on
> the
> Reporting Services box?
> Thanks in advance!!
> --
> Manuel
>|||We're a lot clearer on what our approach will be. Thanks a million!
--
Manuel
"Bruce L-C [MVP]" wrote:
> RS is a aps.net application. It uses SQL Server databases for its object and
> metadata storage. It stores reporting definitions, subscriptions, etc.
> Rendering occurs in RAM. So, a big report can definitely really drag on the
> server. Then, if your data is also coming from SQL Server then SQL Server DB
> engine has the work to retrieve the data. This is totally separate from the
> work that RS is doing.
> When RS is put on its own server you still need to have a SQL Server license
> for the box. It doesn't matter where the RS databases reside (ReportServer
> and ReportServerTempDB). My advice is, unless you are doing a web farm,
> install the SQL Server database for the metadata storage on the box that
> will run RS. Then keep the data you are reporting off of on a second box. In
> that way, the temp data storage, the report definitions, etc are close at
> hand. And, a big report won't slow down your database server which contains
> your data.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "mlg1906" <mlg1906@.discussions.microsoft.com> wrote in message
> news:256AEE4E-AC81-4388-A20B-67247EE7EA59@.microsoft.com...
> > My company is in the process of migrating to SQL Reporting Services 2005.
> > At
> > this time we are most interested in the Business Intelligence
> > functionality
> > included in SS2K5. While we were testing this product we had everything
> > all
> > on the same box...SS, Reporting Services, web tools...everything. Now, we
> > are
> > scaling out the project and are trying to determine where the processing
> > of
> > the reports and BI models takes place. Is it on the SQL Server box or on
> > the
> > Reporting Services box?
> >
> > Thanks in advance!!
> > --
> > Manuel
> >
>
>