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

Thursday, March 29, 2012

Get back data from Reports

I have just started working with RS 2005 and was wondering if / how I can do the following.

I created an asp.net website that has a report viewer to show my reports on the web.
In addition there is a page that lists all of the reports a user has access to, which is pretty much a series of links:

Report 1
Report 2
Report 3
.....

Now in my reports I generally create a grand total of one of the column and was wondering if there was some way to get that information back into an asp page, ie:

Report 1 - $125,713
Report 2 - ($23,111)
Report 3 - $1,762,142

I was thinking if there was some way to send a parameter to the report like Summary=True which would tell it to just return a XML bit of data holding the total for that report (Anything will work, doesn't have to be XML). So the page with the report links would call each of the reports.

I realize that it would probably be possible to do this through a stored procedure, but that would just create another point of maintenace. Instead I could create some function in all of my reports and have a standardized way of doing this so my webserver or database wouldnt have to be updated all the time.

Thanks, and let me know if there is any other information I can provide to make this clearer.

Try using the XML renderer. You will get a "report" which is really just an XML stream with the data. You can then XPath into it to get the values you are interested in.|||

Sounds promising. Being rather new to reports, are there any pages you can think of off hand that provide examples or explanations?

Get All Possible Values of a Report Parameter

Hi,
I need an application that displays reports, and prompts the user
for the parameter values. I have used the GetReportParameters() to retrieve
the list of parameters. However, i could not find a way to get the available
values when the parameter is of a list type. For example a countries
parameter would include a number of countries to choose from ( retrieved
from a dataset ). How could i retrieve the list of all the countries
dynamically? Can someone help me out.
Thanks,
Loui MerciecaHi Loui:
It sounds as if you are looking for the ValidValues property of a
parameter. See my article here for some tips:
Using GetReportParameters
http://odetocode.com/Articles/123.aspx
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Wed, 29 Sep 2004 12:20:06 +0200, "Loui Mercieca" <loui@.gfi.com>
wrote:
>Hi,
> I need an application that displays reports, and prompts the user
>for the parameter values. I have used the GetReportParameters() to retrieve
>the list of parameters. However, i could not find a way to get the available
>values when the parameter is of a list type. For example a countries
>parameter would include a number of countries to choose from ( retrieved
>from a dataset ). How could i retrieve the list of all the countries
>dynamically? Can someone help me out.
>Thanks,
>Loui Mercieca
>|||Make sure to pass in true for the forRendering parameter. Check here for
more information:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_ak_6x4n.asp
Here is the relevant text from that page:
If ForRendering has a value of false, the parameter meta data returned
represents the parameter data that is currently associated with the
specified report. If any parameters values are based on a query and you are
interested in returning the query-based parameters valid values list, you
need to set ForRendering to true, In addition, for query based parameters,
you need to ensure that you have passed in all of the credential information
required to return the query parameters.
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Loui Mercieca" <loui@.gfi.com> wrote in message
news:eeseq3gpEHA.1300@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I need an application that displays reports, and prompts the user
> for the parameter values. I have used the GetReportParameters() to
retrieve
> the list of parameters. However, i could not find a way to get the
available
> values when the parameter is of a list type. For example a countries
> parameter would include a number of countries to choose from ( retrieved
> from a dataset ). How could i retrieve the list of all the countries
> dynamically? Can someone help me out.
> Thanks,
> Loui Mercieca
>|||THANK YOU! That ForRendering = true worked great for me. I was having
a similar problem. I wish they explained better what all of these
setting were. But thanks to you, I bypassed this problem.

Get a timeout error when trying to export to excel

Hi I generate a report successfully in SQL reporting services . Once
the report is generated I then select the export option to export it
to excel
I then get this error message( see below) after waiting about 20 mins
for the excel file to be generated.
There is a lot of data in this report . There is 1240 pages and there
is about 50 rows for each page. That makes it 62000 rows in the
report.
I'm using excel 2007 on my pc. I've updated sql server 2005 to sp2.
Is there some limitation to the amount of data you can export to
excel.'
thanks in advance
Aidan Geraghty
Server Error in '/Reports' Application.
________________________________________
For more information about this error navigate to the report server on
the local server machine, or enable remote errors
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Exception: For more information about this
error navigate to the report server on the local server machine, or
enable remote errors
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.
Stack Trace:
[Exception: For more information about this error navigate to the
report server on the local server machine, or enable remote errors]
[Exception: An error occurred during rendering of the report.]
[Exception: The operation has timed out. The report server has
canceled the operation.]
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean
isAbortable, String url, Stream outputStream, String& mimeType,
String& fileNameExtension) +489
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean
isAbortable, String format, String deviceInfo, NameValueCollection
urlAccessParameters, Stream reportStream, String& mimeType, String&
fileNameExtension) +958
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String
format, String deviceInfo, NameValueCollection additionalParams,
String& mimeType, String& fileExtension) +84
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection
urlQuery, HttpResponse response) +143
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
context) +75
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +64
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.210
When I look at the log files on the server I find this error message:
2007-03-30 14:12:44 65.53.207.181 50411 10.251.129.151 80 HTTP/1.1
GET /Reports/ - 478678319 Connection_Dropped DefaultAppPool
2007-03-30 14:17:43 65.53.206.137 21323 10.251.129.151 80 HTTP/1.1
GET /Reports/Reserved.ReportViewerWebControl.axd?
ReportSession=refs1e553cirzg45tdvejtuw&ControlID=ec48b970-2dd3-438c-9b98-
df1db9c941ab&Culture=1033&UICulture=9&ReportStack=1&OpType=Export&FileName=RebateCoopFundsUploadSixMonthsReport&ContentDisposition=OnlyHtmlInline&Format=EXCEL
- 478678319 Connection_Dropped DefaultAppPool
2007-03-30 14:19:13 65.53.206.137 21501 10.251.129.151 80 HTTP/1.1
GET /reports/ - 478678319 Connection_Dropped DefaultAppPool
2007-03-30 14:23:42 65.53.207.181 50419 10.251.129.151 80 HTTP/1.1
GET /Reports/ - 478678319 Connection_Dropped DefaultAppPool
2007-03-30 14:24:54 10.253.212.85 3385 10.253.212.85 80 HTTP/1.1 GET /
ReportServer?%2fReports
%2fRebateCoopFundsUploadSixMonthsReport&rs:SessionID=refs1e553cirzg45tdvejtuw&rs:command=Render&rs:Format=EXCEL&rc:Toolbar=false&rs:ErrorResponseAsXml=true&rs:AllowNewSessions=false
- 478678319 Connection_Abandoned_By_AppPool DefaultAppPool
2007-03-30 14:24:54 65.53.206.137 21338 10.251.129.151 80 HTTP/1.1
GET /Reports/Reserved.ReportViewerWebControl.axd?
ReportSession=refs1e553cirzg45tdvejtuw&ControlID=ec48b970-2dd3-438c-9b98-
df1db9c941ab&Culture=1033&UICulture=9&ReportStack=1&OpType=SessionKeepAlive&TimerMethod=KeepAliveMethodctl160TouchSession0&CacheSeed=Fri
%20Mar%2030%2014%3A49%3A52%202007 - 478678319
Connection_Abandoned_By_AppPool DefaultAppPool
2007-03-30 14:24:54 10.251.129.151 3419 10.251.129.151 80 HTTP/1.1
POST /reports/ReportService2005.asmx - 478678319
Connection_Abandoned_By_AppPool DefaultAppPool
2007-03-30 14:24:54 65.53.207.181 50461 10.251.129.151 80 HTTP/1.1
GET /Reports/ - 478678319 Connection_Abandoned_By_AppPool
DefaultAppPool
2007-03-30 14:27:09 65.53.206.137 21553 10.251.129.151 80 - - - - -
Timer_ConnectionIdle -
2007-03-30 15:07:17 10.253.212.85 3710 10.253.212.85 80 - - - - -
Timer_ConnectionIdle -
2007-03-30 15:07:17 10.253.212.85 3714 10.253.212.85 80 - - - - -
Timer_ConnectionIdle -On Apr 2, 9:04 am, aidan.gerag...@.gmail.com wrote:
> Hi I generate a report successfully in SQL reporting services . Once
> the report is generated I then select the export option to export it
> to excel
> I then get this error message( see below) after waiting about 20 mins
> for the excel file to be generated.
> There is a lot of data in this report . There is 1240 pages and there
> is about 50 rows for each page. That makes it 62000 rows in the
> report.
> I'm using excel 2007 on my pc. I've updated sql server 2005 to sp2.
> Is there some limitation to the amount of data you can export to
> excel.'
> thanks in advance
> Aidan Geraghty
> Server Error in '/Reports' Application.
> ________________________________________
> For more information about this error navigate to the report server on
> the local server machine, or enable remote errors
> Description: An unhandled exception occurred during the execution of
> the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
> Exception Details: System.Exception: For more information about this
> error navigate to the report server on the local server machine, or
> enable remote errors
> Source Error:
> An unhandled exception was generated during the execution of the
> current web request. Information regarding the origin and location of
> the exception can be identified using the exception stack trace
> below.
> Stack Trace:
> [Exception: For more information about this error navigate to the
> report server on the local server machine, or enable remote errors]
> [Exception: An error occurred during rendering of the report.]
> [Exception: The operation has timed out. The report server has
> canceled the operation.]
> Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean
> isAbortable, String url, Stream outputStream, String& mimeType,
> String& fileNameExtension) +489
> Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean
> isAbortable, String format, String deviceInfo, NameValueCollection
> urlAccessParameters, Stream reportStream, String& mimeType, String&
> fileNameExtension) +958
> Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String
> format, String deviceInfo, NameValueCollection additionalParams,
> String& mimeType, String& fileExtension) +84
> Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection
> urlQuery, HttpResponse response) +143
> Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext
> context) +75
> System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
> +154
> System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
> Boolean& completedSynchronously) +64
> ________________________________________
> Version Information: Microsoft .NET Framework Version:2.0.50727.42;
> ASP.NET Version:2.0.50727.210
> When I look at the log files on the server I find this error message:
> 2007-03-30 14:12:44 65.53.207.181 50411 10.251.129.151 80 HTTP/1.1
> GET /Reports/ - 478678319 Connection_Dropped DefaultAppPool
> 2007-03-30 14:17:43 65.53.206.137 21323 10.251.129.151 80 HTTP/1.1
> GET /Reports/Reserved.ReportViewerWebControl.axd?
> ReportSession=refs1e553cirzg45tdvejtuw&ControlID=ec48b970-2dd3-438c-9b98-
> df1db9c941ab&Culture=1033&UICulture=9&ReportStack=1&OpType=Export&FileName=RebateCoopFundsUploadSixMonthsReport&ContentDisposition=OnlyHtmlInline&Format=EXCEL
> - 478678319 Connection_Dropped DefaultAppPool
> 2007-03-30 14:19:13 65.53.206.137 21501 10.251.129.151 80 HTTP/1.1
> GET /reports/ - 478678319 Connection_Dropped DefaultAppPool
> 2007-03-30 14:23:42 65.53.207.181 50419 10.251.129.151 80 HTTP/1.1
> GET /Reports/ - 478678319 Connection_Dropped DefaultAppPool
> 2007-03-30 14:24:54 10.253.212.85 3385 10.253.212.85 80 HTTP/1.1 GET /
> ReportServer?%2fReports
> %2fRebateCoopFundsUploadSixMonthsReport&rs:SessionID=refs1e553cirzg45tdvejtuw&rs:command=Render&rs:Format=EXCEL&rc:Toolbar=false&rs:ErrorResponseAsXml=true&rs:AllowNewSessions=false
> - 478678319 Connection_Abandoned_By_AppPool DefaultAppPool
> 2007-03-30 14:24:54 65.53.206.137 21338 10.251.129.151 80 HTTP/1.1
> GET /Reports/Reserved.ReportViewerWebControl.axd?
> ReportSession=refs1e553cirzg45tdvejtuw&ControlID=ec48b970-2dd3-438c-9b98-
> df1db9c941ab&Culture=1033&UICulture=9&ReportStack=1&OpType=SessionKeepAlive&TimerMethod=KeepAliveMethodctl160TouchSession0&CacheSeed=Fri
> %20Mar%2030%2014%3A49%3A52%202007 - 478678319
> Connection_Abandoned_By_AppPool DefaultAppPool
> 2007-03-30 14:24:54 10.251.129.151 3419 10.251.129.151 80 HTTP/1.1
> POST /reports/ReportService2005.asmx - 478678319
> Connection_Abandoned_By_AppPool DefaultAppPool
> 2007-03-30 14:24:54 65.53.207.181 50461 10.251.129.151 80 HTTP/1.1
> GET /Reports/ - 478678319 Connection_Abandoned_By_AppPool
> DefaultAppPool
> 2007-03-30 14:27:09 65.53.206.137 21553 10.251.129.151 80 - - - - -
> Timer_ConnectionIdle -
> 2007-03-30 15:07:17 10.253.212.85 3710 10.253.212.85 80 - - - - -
> Timer_ConnectionIdle -
> 2007-03-30 15:07:17 10.253.212.85 3714 10.253.212.85 80 - - - - -
> Timer_ConnectionIdle -
I'm not sure about a limitation in MS Excel 2007; but, in MS Excel
2003, the limit was somewhere around 65000 rows. In my opinion, it
sounds like it might be too much data to stream into Excel. Sorry I
could not be of greater assistance.
Regards,
Enrique Martinez
Sr. Software Consultant

Tuesday, March 27, 2012

Get "Do you want to save this file?" when trying to launch Report Builder

This may be a simple setup issue on my XP client, but whenever I click "Report Builder" I get a "Do you want to save this file?" dialog box and nothing happens.

I believe Reporting Services is installed correctly on my Win Server 2003 because when I click "Report Builder" on the server itself it does the proper click-once stuff (checks to see if the app is there and downloads it if isn't) and launched Report Builder. Also, all other Reporting Services functions are working fine on both the server and XP clients - its just launching "Report Builder" on the client that is wierd.

So is there anything special I have to do for an XP client? It does have SP2. Its also probably worth noting that the server is not in our corporate domain - it is it's own test workgroup. I have set up anonymous access to the server for the Windows XP clients to access for testing, and that seems to be working fine for running all other types of reports.

Any suggestions appreciated. Thanks!Do you have the .NET framework 2.0 installed on the client machine? The ClickOnce technology that report builder uses is installed as part of it.

Thanks
Tudor|||DOH! That did it! Thanks!!!

I was under the (mistaken) understanding that .net 2.0 was auto-installed on a client as part of the click-once process.

Gerating Excel Reports from SSIS

I want to be able to create an Excel report in SSIS after querying the data from a SQLSERVER table.

I have a IS package where I'm loading all the data required in the report and the final step of the IS package I would like to build the reports. I think it makes sense to take this approach instead of setting up a RSS package.

AS anyone seen any Blogs which explains such a flow?

You can use an Excel destination in your data flow, but beyond that, you won't be able to apply unique formatting rules, grid lines, images, charts, etc...

Not without programming a script component, anyway.

Monday, March 26, 2012

Generic way to style reports (CSS Style)

I want to make a CSS Style solution for my reports. I have few ideas related to this, changing the report properties on the fly, but I am not sure for which I should go for.

- We know that we can put expression on reports almost everywhere, and can also call custom code for setting up those expressions. i.e.

Public Shared Function GetValue(ByVal Key As String) As String

Dim myDataReader As SqlDataReader
Dim mySqlConnection As SqlConnection
Dim mySqlCommand As SqlCommand

mySqlConnection = New SqlConnection("server=localhost;Trusted_Connection=yes;database=tempMIQB")
mySqlCommand = New SqlCommand("SELECT * FROM [Properties] Where PropertyName='" & Key & "'", mySqlConnection)
mySqlConnection.Open()
myDataReader = mySqlCommand.ExecuteReader(CommandBehavior.CloseConnection)

If myDataReader.Read() Then
GetValue = myDataReader.Item("PropertyValue").ToString
Else
GetValue = "None"
End If

End Function

and in textbox or any where I can say =Code.GetValue("BGColor") or from .NET dll.

For going further on with this idea I can create an .NET dll and get the list from database or XML file. (Please give suggestions for performance/scalability issue.)

- second idea is to write a custom application (script) which can go through all the reports and change the color and fonts and every thing.

- third is to use parameters and use Array.IndexOf method to search for the value, but in this case i need to add dataset to all reports and, I think we cannot access report properties i.e. Parameters from custom code, just to make a generic function to access parameter value.

Hi Noordin,

I'm also trying to do this. Could you give me some leads as to how you accomplished it in the end?

Thanks,
Phil

Generic way to style reports (CSS Style)

I want to make a CSS Style solution for my reports. I have few ideas related to this, changing the report properties on the fly, but I am not sure for which I should go for.

- We know that we can put expression on reports almost everywhere, and can also call custom code for setting up those expressions. i.e.

PublicSharedFunction GetValue(ByVal Key AsString) AsString

Dim myDataReader As SqlDataReader
Dim mySqlConnection As SqlConnection
Dim mySqlCommand As SqlCommand

mySqlConnection = New SqlConnection("server=localhost;Trusted_Connection=yes;database=tempMIQB")
mySqlCommand = New SqlCommand("SELECT * FROM [Properties] Where PropertyName='" & Key & "'", mySqlConnection)
mySqlConnection.Open()
myDataReader = mySqlCommand.ExecuteReader(CommandBehavior.CloseConnection)

If myDataReader.Read() Then
GetValue = myDataReader.Item("PropertyValue").ToString
Else
GetValue = "None"
EndIf

EndFunction

and in textbox or any where I can say =Code.GetValue("BGColor") or from .NET dll.

For going further on with this idea I can create an .NET dll and get the list from database or XML file. (Please give suggestions for performance/scalability issue.)

- second idea is to write a custom application (script) which can go through all the reports and change the color and fonts and every thing.

- third is to use parameters and use Array.IndexOf method to search for the value, but in this case i need to add dataset to all reports and, I think we cannot access report properties i.e. Parameters from custom code, just to make a generic function to access parameter value.

Hi Noordin,

I'm also trying to do this. Could you give me some leads as to how you accomplished it in the end?

Thanks,
Phil

Generic report and dataset

Hello,
I am new to SRS. So this is a new-be question.
When creating a new report in visual studio. When creating a new dataset.
Do you always need to create a query string to retrieve the fields that can
be used on the form?
Is there some SQL picker query builder. Where you can build a query by
picking and choosing from all tables?
To help people out?
thanksOn Nov 2, 4:52 pm, "greg" <g...@.nospam.com> wrote:
> Hello,
> I am new to SRS. So this is a new-be question.
> When creating a new report in visual studio. When creating a new dataset.
> Do you always need to create a query string to retrieve the fields that can
> be used on the form?
> Is there some SQL picker query builder. Where you can build a query by
> picking and choosing from all tables?
> To help people out?
> thanks
In the Report Wizard, there is a Generic Query Builder; however, I'm
not sure if that will meet your needs completely. Also, there is a
technology called Linq that is being used in Visual Studio 2008 that
allows this type of functionality; however, I'm not sure if it will be
available in SSRS/Reporting Services 2008. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Generic report and dataset

Hello,
I am new to SRS. So this is a new-be question.
When creating a new report in visual studio. When creating a new dataset.
Do you always need to create a query string to retrieve the fields that can
be used on the form?
Is there some SQL picker query builder. Where you can build a query by
picking and choosing from all tables?
To help people out?
thanksOn Nov 2, 4:52 pm, "greg" <g...@.nospam.com> wrote:
> Hello,
> I am new to SRS. So this is a new-be question.
> When creating a new report in visual studio. When creating a new dataset.
> Do you always need to create a query string to retrieve the fields that can
> be used on the form?
> Is there some SQL picker query builder. Where you can build a query by
> picking and choosing from all tables?
> To help people out?
> thanks
In the Report Wizard, there is a Generic Query Builder; however, I'm
not sure if that will meet your needs completely. Also, there is a
technology called Linq that is being used in Visual Studio 2008 that
allows this type of functionality; however, I'm not sure if it will be
available in SSRS/Reporting Services 2008. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Generic Query Designer Disabled

Hi,

This is really a Visual Studio 2005 Report Designer problem but I didn't see a good place to post this question in the Visual Studion forum.

On some reports when looking at the Data tab the Generic Query Designer is disabled. Anybody know why? The report runs. Other reports have it enabled.

I am using Visual Studio 2005 sp1.

Thanks,

Darren

Just answered my own question.

It seems the Generic Query Designer is disabled when you are using an expression for a connection string.

Generation of report takes a long time (performance issue)

Hi,

My company is using MS SQL Server 2000 Developer Edition and Report Services.
We have some tables which are have now around 4000000 rows. When we genarating report
SELECT sessionNum, moteID, dbo.MacAddrConv(macAddr) AS macAddr, chID, dbo.TimestampConv(timestamp) AS timestamp, value
FROM NotificationData
ORDER BY timestamp
it takes 15 minute. Our table is located in the Server whic has these parametres:

1- Currently there are about 4.0 million entry in the database that uses 1638.44 MB of memory

2- The new SQL server has 3.39 GHz Intel Xeon processor, 3.00 GB of RAM and 192 GB of hard drive.

Why it takes so long time to generate the reports? Could you help us to improve the performance for our Database?

Thanks a lot,

Alice

The query selects 4 million rows. If you just show all the rows in the report with about 40 rows per page, you would really want to generate a report with 100.000 pages?

If however, you just show aggregated values in the report (but not the detail rows), you should rather perform the aggregations inside the query - because the aggregations will be performed much more efficiently inside the database.

-- Robert

|||i'm not impressed with reporting services' scalability

i have reports that are much smaller than yours that take forever to run

figure out a way to make it smaller, it isn't going to handle it nicely|||1st question, does ur report must show so many record at 1 time?i believe that even you can show up but u still having the printing problem.
2nd question, how you layout ur report?

my suggestion would be try to put more parameter or fixed the output record no for each page, and try to do any math calculation in query instead of report. hope can help|||

Generating ridiculously huge reports is a problem with every reporting system I've seen. However, I think there are a couple of options here.

First, use the new query execution plan tools to make sure the query isnt too complicated.|||Changing the report source to a SQL Server stored procedure also can have dramatic performance boosts. This is mainly due to procs being pre-compiled.sql

Generation of report takes a long time (performance issue)

Hi,

My company is using MS SQL Server 2000 Developer Edition and Report Services.
We have some tables which are have now around 4000000 rows. When we genarating report
SELECT sessionNum, moteID, dbo.MacAddrConv(macAddr) AS macAddr, chID, dbo.TimestampConv(timestamp) AS timestamp, value
FROM NotificationData
ORDER BY timestamp
it takes 15 minute. Our table is located in the Server whic has these parametres:

1- Currently there are about 4.0 million entry in the database that uses 1638.44 MB of memory

2- The new SQL server has 3.39 GHz Intel Xeon processor, 3.00 GB of RAM and 192 GB of hard drive.

Why it takes so long time to generate the reports? Could you help us to improve the performance for our Database?

Thanks a lot,

Alice

The query selects 4 million rows. If you just show all the rows in the report with about 40 rows per page, you would really want to generate a report with 100.000 pages?

If however, you just show aggregated values in the report (but not the detail rows), you should rather perform the aggregations inside the query - because the aggregations will be performed much more efficiently inside the database.

-- Robert

|||i'm not impressed with reporting services' scalability

i have reports that are much smaller than yours that take forever to run

figure out a way to make it smaller, it isn't going to handle it nicely|||1st question, does ur report must show so many record at 1 time?i believe that even you can show up but u still having the printing problem.
2nd question, how you layout ur report?

my suggestion would be try to put more parameter or fixed the output record no for each page, and try to do any math calculation in query instead of report. hope can help|||

Generating ridiculously huge reports is a problem with every reporting system I've seen. However, I think there are a couple of options here.

First, use the new query execution plan tools to make sure the query isnt too complicated.|||Changing the report source to a SQL Server stored procedure also can have dramatic performance boosts. This is mainly due to procs being pre-compiled.

Generation of report takes a long time (performance issue)

Hi,

My company is using MS SQL Server 2000 Developer Edition and Report Services.
We have some tables which are have now around 4000000 rows. When we genarating report
SELECT sessionNum, moteID, dbo.MacAddrConv(macAddr) AS macAddr, chID, dbo.TimestampConv(timestamp) AS timestamp, value
FROM NotificationData
ORDER BY timestamp
it takes 15 minute. Our table is located in the Server whic has these parametres:

1- Currently there are about 4.0 million entry in the database that uses 1638.44 MB of memory

2- The new SQL server has 3.39 GHz Intel Xeon processor, 3.00 GB of RAM and 192 GB of hard drive.

Why it takes so long time to generate the reports? Could you help us to improve the performance for our Database?

Thanks a lot,

Alice

The query selects 4 million rows. If you just show all the rows in the report with about 40 rows per page, you would really want to generate a report with 100.000 pages?

If however, you just show aggregated values in the report (but not the detail rows), you should rather perform the aggregations inside the query - because the aggregations will be performed much more efficiently inside the database.

-- Robert

|||i'm not impressed with reporting services' scalability

i have reports that are much smaller than yours that take forever to run

figure out a way to make it smaller, it isn't going to handle it nicely|||1st question, does ur report must show so many record at 1 time?i believe that even you can show up but u still having the printing problem.
2nd question, how you layout ur report?

my suggestion would be try to put more parameter or fixed the output record no for each page, and try to do any math calculation in query instead of report. hope can help|||

Generating ridiculously huge reports is a problem with every reporting system I've seen. However, I think there are a couple of options here.

First, use the new query execution plan tools to make sure the query isnt too complicated.|||Changing the report source to a SQL Server stored procedure also can have dramatic performance boosts. This is mainly due to procs being pre-compiled.

Generation of a report in background or asynchronously.?

Hello, I have a report that takes many seconds to generate, as I am making an spanish application I dont want the user to see that the report is being generating, I would like to put my own message and then show the report when its ready.

Any ideas?

If you are using the report in a windows application I would suggest using the new backgroundworker control. It is very easy to use and works great! You could also you the subscriptions feature to schedule large reports to run in off hours and be delivered automatically to a windows share or email.

|||I am using a web application not winforms|||Ajax may be what you are looking for?
http://ajax.schwarz-interactive.de/csharpsample/default.aspx
Another workaround may be to run the report in an Iframe that is very small, and then redirect to the exported html afterwards.

Wednesday, March 21, 2012

Generating reports from flat files

Hi

I got two text files with data.I got to compare two files and if there is any inconsistancy between two files I need to dispaly as a report using sql reporting services.I do not know how to do that?

Any source code or suggestion.

Thanx in advance

What is the format of the data files? By "comparing", is this line-for-line, character-for-character, or is the structure of the files regular data rows?

>L<

|||line-for-line|||

Different people will give you different advice about the best thing to do here, depending on which environment they are comfortable working in. All the different types of advice will boil down to the following steps:

consume both files into the same structure, which has one row for each row of the file(s).

It doesn't matter whether this is an XML structure or a database table, or how the data gets into that structure, that is a detail of implementation we can discuss when you tell us more about your background. You could use an SSIS package, read the files in CLR code a line at a time, etc.

Here are some thoughts about exactly what you should store:
I think it would be useful to have an integer value representing line number in this case as well, for reporting purposes.
Make some determinations about what represents a significant change between the files. This will make some differences in how you store the rows. For example: do you omit "whitespace" lines -- can they be safely skipped? Suppose that (for instance) the two files are identical but row 80 has an extra carriage return in one file. Does that mean that all the rows from 81 down are counted as different from each other, working on line number basis only? Or are they the same, even though the line numbers are offset by 1? is punctuation significant? Is case-sensitivity?
|||

Thanx for you advice.

I have done like this but how will you give the xml structure generated from flat files to the reporting engine.

Any idea

Thanx

|||

You can use the XML files as a datasource directly, if you design the XML to look like ADO dataset XML.

You can also have a "real" database consume the XML (regardless of its schema) and then do the report from there.

What does your XML look like?

>L<

Generating report using batch process

Hi all,

I have tried asking the same question in other forums. All i get is links Sad

Please help me. I have the following requirement:

I have the following tables:
Theater - TheaterId, TheaterName, Revenues,locationid, stateid
State - StateId, StateName
Location - LocationId, LocationName, StateId

I want to generate reports that will tell me the revenue generated for each theater in each location in a state. I want to run a batch process which will loop through the 3 tables and will passing the location and state id as parameters one by one. I want each report to be generated as a pdf and stored in a location. How do I do this?

Thanks.

Two methods come to mind:

1. You can run reports from the command line using the rs command (documentation) as described in the following SQLJunkies article:

http://sqljunkies.com/Article/B197B9E7-EF3D-4D70-9B5E-47B74E57EF38.scuk

which doesn't seem to be up for me so here is the Google cache link:

http://64.233.167.104/search?q=cache:XvoyQYWNs50JTongue Tiedqljunkies.com/Article/B197B9E7-EF3D-4D70-9B5E-47B74E57EF38.scuk&hl=en&gl=us&strip=1

Within the VB script that you run, query your tables and feed the parameters.

2. You could use a variant of a Data Driven Subscription. You will need the Enterprise version of SSRS to use Data Driven Subscriptions. Here is a tutorial on building one:

http://msdn2.microsoft.com/en-us/library/ms169673.aspx

The change that you will make to the standard script is in the Define a query to retrieve subscriber data section. You will just add to the standard query a join to your three tables and use the query results as parameters to the report.

I came accross this article by Jason Selburg which claims to allow you to build your own data driven subscriptions using Standard Edition:

http://www.sqlservercentral.com/columnists/jselburg/datadrivensubscriptions.asp

and his follow up:

http://www.sqlservercentral.com/columnists/jselburg/2824.asp

The reason that you are getting links is that people are willing take the time to give assistance and pointers but not specific solutions. The problem you describe is an interesting one and one that will I will now probably try and cover in my blog in the near future. When I do, I will post the link here and you should be able to get code that is closer to a complete solution.

Larry Smithmier

|||

dear larry,

thanks for the link.

vidkshi

Generating report is very TEDIOUS

Hello everybody, I have a problem in generating the report. It takes 1 and half hours just to view my report. Is there anyone know how to make it fast. Im using MySQL and i used 16 views for my report thats why its very tedious.
Thank a lot!!!Whatever query or stored procedure u r using execute it outside report and test the time.|||Also check that the fields you are joining on are indexed. When you look at the SQL for the report is there a where clause? If not the entire report is being processed on the local machine. Do you have the option "perform grouping on server" checked?

generating report in web form

i would like to ask if using the Render() function is the ONLY way to get the
report in the web?(exclude the url access)
how about SOAP? how to use SOAP to generating report in web?
by the way, is render() a method which comes from SOAP?
i am confuse about it...please help
thanks in advanceHi Jason:
Render is part of the web service (aka SOAP) API.
There are other methods you can come up with to get a report to the
web. For instance, you could set up a report subscription and have the
report delivered to a network share. A web site could map to the same
network share and make the reports available.
--
Scott
http://www.OdeToCode.com
On Mon, 20 Sep 2004 21:05:01 -0700, "Jasonymk"
<Jasonymk@.discussions.microsoft.com> wrote:
>i would like to ask if using the Render() function is the ONLY way to get the
>report in the web?(exclude the url access)
>how about SOAP? how to use SOAP to generating report in web?
>by the way, is render() a method which comes from SOAP?
>i am confuse about it...please help
>thanks in advance|||hi Scott,
thanks you very much for helping me...i have make a web reference to the
reportservice.asmx...like the online book said...does it mean that i am
already using SOAP?
mmm i think for the method you mentioned i think thats more or less the same
as URL access right? i think that may not be useful for me cos i would like
to have report like invoice with a partiular number chosen by the user.
So...constant delivery may not be useful(subscription is set in the report
server right?)
once again...ths for helping....
"Scott Allen" wrote:
> Hi Jason:
> Render is part of the web service (aka SOAP) API.
> There are other methods you can come up with to get a report to the
> web. For instance, you could set up a report subscription and have the
> report delivered to a network share. A web site could map to the same
> network share and make the reports available.
> --
> Scott
> http://www.OdeToCode.com
> On Mon, 20 Sep 2004 21:05:01 -0700, "Jasonymk"
> <Jasonymk@.discussions.microsoft.com> wrote:
> >i would like to ask if using the Render() function is the ONLY way to get the
> >report in the web?(exclude the url access)
> >
> >how about SOAP? how to use SOAP to generating report in web?
> >by the way, is render() a method which comes from SOAP?
> >
> >i am confuse about it...please help
> >thanks in advance
>|||Hi jason:
Yes - if you have a web reference you are already using SOAP.
It doesn't sound as if having a report delivered would fit what you
need to do.
--
Scott
http://www.OdeToCode.com
On Mon, 20 Sep 2004 23:07:04 -0700, "Jasonymk"
<Jasonymk@.discussions.microsoft.com> wrote:
>hi Scott,
>thanks you very much for helping me...i have make a web reference to the
>reportservice.asmx...like the online book said...does it mean that i am
>already using SOAP?
>mmm i think for the method you mentioned i think thats more or less the same
>as URL access right? i think that may not be useful for me cos i would like
>to have report like invoice with a partiular number chosen by the user.
>So...constant delivery may not be useful(subscription is set in the report
>server right?)
>once again...ths for helping....
>"Scott Allen" wrote:
>> Hi Jason:
>> Render is part of the web service (aka SOAP) API.
>> There are other methods you can come up with to get a report to the
>> web. For instance, you could set up a report subscription and have the
>> report delivered to a network share. A web site could map to the same
>> network share and make the reports available.
>> --
>> Scott
>> http://www.OdeToCode.com
>> On Mon, 20 Sep 2004 21:05:01 -0700, "Jasonymk"
>> <Jasonymk@.discussions.microsoft.com> wrote:
>> >i would like to ask if using the Render() function is the ONLY way to get the
>> >report in the web?(exclude the url access)
>> >
>> >how about SOAP? how to use SOAP to generating report in web?
>> >by the way, is render() a method which comes from SOAP?
>> >
>> >i am confuse about it...please help
>> >thanks in advance
>>

Generating report from Code

I need to generate and save a report to disk from a standard Windows
Application without user intervention.
So basically, a user clicks a button, and a report is saved to his c:\ in a
predefined format and with a predefined filename.
Anyone?
J. Jespersen> So basically, a user clicks a button, and a report is saved to his c:\ in
> a
> predefined format and with a predefined filename.
Correction: File should just be saved to the servers c:\|||This code will allow you to generate a report, and create a PDF file from it.
You can tweak the parameters to export the format and type you wish:
public static void deliverReport()
{
MyReportingService.ReportingService rs = new ReportingService();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Render arguments
byte[] rpt = null;
string reportPath = "/ReportProject1/Report1";
string format = "PDF";
string historyID = null;
string devInfo =@."<DeviceInfo><StartPage>0</StartPage><PageHeight>8.5in</PageHeight><PageWidth>14in</PageWidth></DeviceInfo>";
ParameterValue[] parameters = new ParameterValue[0];
DataSourceCredentials[] credentials = null;
string showHideToggle = null;
string encoding;
string mimeType;
Warning[] warnings = null;
ParameterValue[] reportHistoryParameters = null;
string[] streamIDs = null;
SessionHeader sh = new SessionHeader();
rs.SessionHeaderValue = sh;
rpt = rs.Render(reportPath, format, historyID, devInfo,
parameters, credentials,
showHideToggle, out encoding, out mimeType, out
reportHistoryParameters, out warnings,
out streamIDs);
FileStream stream = File.Create("test.pdf", rpt.Length);
stream.Write(rpt, 0, rpt.Length);
stream.Close();
}
This URL may help you as well:
http://www.csharphelp.com/archives3/archive545.html
Cheers,
Rich
"Jeppe Dige Jespersen" wrote:
> > So basically, a user clicks a button, and a report is saved to his c:\ in
> > a
> > predefined format and with a predefined filename.
> Correction: File should just be saved to the servers c:\
>
>|||Thank you Rich. Works perfectly! :-)
Jeppe Jespersen
Denmark
> This code will allow you to generate a report, and create a PDF file from
> it.
> You can tweak the parameters to export the format and type you wish:
> public static void deliverReport()
> {
> MyReportingService.ReportingService rs = new
> ReportingService();
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
> // Render arguments
> byte[] rpt = null;
> string reportPath = "/ReportProject1/Report1";
> string format = "PDF";
> string historyID = null;
> string devInfo => @."<DeviceInfo><StartPage>0</StartPage><PageHeight>8.5in</PageHeight><PageWidth>14in</PageWidth></DeviceInfo>";
> ParameterValue[] parameters = new ParameterValue[0];
> DataSourceCredentials[] credentials = null;
> string showHideToggle = null;
> string encoding;
> string mimeType;
> Warning[] warnings = null;
> ParameterValue[] reportHistoryParameters = null;
> string[] streamIDs = null;
> SessionHeader sh = new SessionHeader();
> rs.SessionHeaderValue = sh;
> rpt = rs.Render(reportPath, format, historyID, devInfo,
> parameters, credentials,
> showHideToggle, out encoding, out mimeType, out
> reportHistoryParameters, out warnings,
> out streamIDs);
> FileStream stream = File.Create("test.pdf", rpt.Length);
> stream.Write(rpt, 0, rpt.Length);
> stream.Close();
> }
> This URL may help you as well:
> http://www.csharphelp.com/archives3/archive545.html
> Cheers,
> Rich
> "Jeppe Dige Jespersen" wrote:
>> > So basically, a user clicks a button, and a report is saved to his c:\
>> > in
>> > a
>> > predefined format and with a predefined filename.
>> Correction: File should just be saved to the servers c:\
>>

Generating Report Error, Local Administrator Group

Hi,
I finished creating my reports and have had an issue with generating the
reports on http://localhost/reports. When I login to
http://localhost/reports with a user that is part of the Local Administrators
Group the reports run perfectly correct. But when I login with a user that
is not part of the Local Administrators Group I get the Reporting Services
Error:
An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
Cannot create a connection to data source 'OVSDPROD'.
(rsErrorOpeningConnection) Get Online Help
ERROR [08004] [Oracle][ODBC][Ora]Error while trying to retrieve text for
error ORA-12154 ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
SQLSetConnectAttr failed
The user that I am logged in with has the same exact item-level and
system-level roles as the BUILTIN\Administrators and can navigate throughout
the site to get to the reports but when its time to actually generate the
reports I get the error above.
The data source is configured with "Credentials stored securely in the report
server"...
Even though the error states that this is an ODBC issue, it confuses me
since I am able to generate reports with users that are part of the Local
Administrator Group, but anyone outside of that group can not Generate
Reports. If everyone was having problems generating reports then I would
definitely see how it is an ODBC issue.
I am using ODBC Drivers from Oracle.....
Thanks,
MikeI figured out my problem had to do with the security permissions that were
assigned to the folder where my tnsnames.ora file was located. I needed to
set permissions for Everyone to be able to read that folder so they can
access the file and therefore run the reports.
"mtam79" wrote:
> Hi,
> I finished creating my reports and have had an issue with generating the
> reports on http://localhost/reports. When I login to
> http://localhost/reports with a user that is part of the Local Administrators
> Group the reports run perfectly correct. But when I login with a user that
> is not part of the Local Administrators Group I get the Reporting Services
> Error:
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Cannot create a connection to data source 'OVSDPROD'.
> (rsErrorOpeningConnection) Get Online Help
> ERROR [08004] [Oracle][ODBC][Ora]Error while trying to retrieve text for
> error ORA-12154 ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> The user that I am logged in with has the same exact item-level and
> system-level roles as the BUILTIN\Administrators and can navigate throughout
> the site to get to the reports but when its time to actually generate the
> reports I get the error above.
> The data source is configured with "Credentials stored securely in the report
> server"...
> Even though the error states that this is an ODBC issue, it confuses me
> since I am able to generate reports with users that are part of the Local
> Administrator Group, but anyone outside of that group can not Generate
> Reports. If everyone was having problems generating reports then I would
> definitely see how it is an ODBC issue.
> I am using ODBC Drivers from Oracle.....
> Thanks,
> Mike|||I
"mtam79" wrote:
> Hi,
> I finished creating my reports and have had an issue with generating the
> reports on http://localhost/reports. When I login to
> http://localhost/reports with a user that is part of the Local Administrators
> Group the reports run perfectly correct. But when I login with a user that
> is not part of the Local Administrators Group I get the Reporting Services
> Error:
> An error has occurred during report processing. (rsProcessingAborted) Get
> Online Help
> Cannot create a connection to data source 'OVSDPROD'.
> (rsErrorOpeningConnection) Get Online Help
> ERROR [08004] [Oracle][ODBC][Ora]Error while trying to retrieve text for
> error ORA-12154 ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's
> SQLSetConnectAttr failed
> The user that I am logged in with has the same exact item-level and
> system-level roles as the BUILTIN\Administrators and can navigate throughout
> the site to get to the reports but when its time to actually generate the
> reports I get the error above.
> The data source is configured with "Credentials stored securely in the report
> server"...
> Even though the error states that this is an ODBC issue, it confuses me
> since I am able to generate reports with users that are part of the Local
> Administrator Group, but anyone outside of that group can not Generate
> Reports. If everyone was having problems generating reports then I would
> definitely see how it is an ODBC issue.
> I am using ODBC Drivers from Oracle.....
> Thanks,
> Mikesql