Wednesday, March 28, 2012
report viewer web.config settings for remote mode without session state
I am using the new report viewer control that comes with VS2005. My
application does not use session state as it is clustered and so I have been
following the Microsoft article for implementing the IReportViewerConnection
and then adding a key for the ReportServerConnection in the web.config file.
http://msdn2.microsoft.com/en-us/library/ms251661.aspx
My implementation of the interface is called ReportServerConnection and is
within a namespace called eNate.ESP.ESPWeb.
In my web.cofig file I have the following key
<add key="ReportViewerServerConnection"
value="eNate.ESP.ESPWeb.ReportServerConnection, ReportServerConnection" />
When I try to load the asp.net page which contains the report viewer control
I get the following error message
Microsoft.Reporting.WebForms.InvalidConfigFileTypeException: The type
eNate.ESP.ESPWeb.ReportServerConnection,
eNate.ESP.ESPWeb.ReportServerConnection does not implement
IReportServerConnection or could not be found.
I am definately implementing the interface but which ever way I try to
reference the class in the web.config key I always get this error.
The documentation about how to add this key file is not very clear and I
have not seen any other posts about this subject.
Could somebody please let me know how to reference this class correctly as I
think that is causing the error.
Thanks
Lewis Holmes
eNateHi Lewis,
Welcome to the MSDN newsgroup.
As for the custom IReportServerConnection class, we need to specify the
AssemblyQualified name which include the Class's full name, assembly name,
version, culture and publickeytoken info. For example:
<add key="ReportViewerServerConnection"
value="ControLibrary.SimpleReportServerConnection, ControLibrary,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
You can printout the class's assemblyQualified name through the below code:
Response.Write("<br/>" +
typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
In addition, I agree that the document about the ReportViewer web.config
interfaces is not quite complete and sufficient. I suggest you also submit
this to the msdn product feedback center:
http://lab.msdn.microsoft.com/productfeedback/default.aspx
If there is anything else we can help, please feel free to post here.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Thanks so much Steven!
I have got it to work now.
Regards
Lewis Holmes
eNate
"Steven Cheng[MSFT]" <stcheng@.online.microsoft.com> wrote in message
news:ZYha8E$RGHA.6904@.TK2MSFTNGXA03.phx.gbl...
> Hi Lewis,
> Welcome to the MSDN newsgroup.
> As for the custom IReportServerConnection class, we need to specify the
> AssemblyQualified name which include the Class's full name, assembly name,
> version, culture and publickeytoken info. For example:
> <add key="ReportViewerServerConnection"
> value="ControLibrary.SimpleReportServerConnection, ControLibrary,
> Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
> You can printout the class's assemblyQualified name through the below
> code:
> Response.Write("<br/>" +
> typeof(ControLibrary.SimpleReportServerConnection).AssemblyQualifiedName);
> In addition, I agree that the document about the ReportViewer web.config
> interfaces is not quite complete and sufficient. I suggest you also submit
> this to the msdn product feedback center:
> http://lab.msdn.microsoft.com/productfeedback/default.aspx
> If there is anything else we can help, please feel free to post here.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>sql
Friday, March 23, 2012
Report Viewer control Javascript error with empty report
I'm having an issue with the reportviewer control for vs2005. I've tried both local and remote reports and it's the same for both... but here's the issue. I have a group of parameters that are passed from the page into the report to filter out the data, simple. Problem is if the parameters cause no data to be returned, then i get a javascript error 'Object required' on line 13 char 692 of page Reserverd.ReportViewerWebControl.axd
I've looked in google to see if there has been anyone else with this issue and haven't found anything. I've checked IIS to make sure that the file manager for axd does not have the check box 'check if exists'. Any help would be greatly appreciated
TIA
Jeff Dupont
HI, Jeff:
I suggest that you can set the default value of the parameter:
http://msdn.microsoft.com/msdnmag/issues/06/06/datapoints/default.aspx
I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be
of assistance
Friday, March 9, 2012
Report Server Web Site Shows File Not Found
Hi -
I have installed VS2005 and SQL Server 2005, with all reporting services features turned on. When I look at IIS i see applications for ReportingServer and Reports.
But i cannot seem to browse or run any reports. From SQL Server management Studio, from IIS, from browser all give same results - page not found. Did I miss a configuration? Who needs permissions to what? I created the report in VS2005 and deployed it but i cannot see it in the IIS virtual directory for ReportServices. When i look at folders in management studio, i see the folders for the project, and the report, but they dont show up in IIS.
HELP! nothing works!
Deployed reports don't go into IIS. They are stored internally in the reporting services databases.
Go to http://localhost/reports
This should show you 'Report Manager'. You can execute your reports from there.
Regards
Paul
|||When you deploy reports in VS, what is the ReportServerUrl property of the project? You should be able to access the same url from IE.|||The ReportServer settings on the project are to the Reporting Services web services. For URL access to a report you need to look at the help file. Here is an example:
http://servername/reportserver?/SampleReports/Employee Sales Summary&rs:Command=Render&rs:format=HTML4.0Monday, February 20, 2012
Report Render in VS2005 slower than stored proc
I have searched many forums and found some cases of people also reporting slower rendering in RS than in Management Studio / Query Analyzer. However, none of the other solution suggestions seem to make a difference for me.
I'm a VS/VB developer and have got multiple reports built -- all using stored procedures on the backend -- that all take many times longer to run than if executed via Management Studio (SSMS). My simplest proc takes a couple of parameters (no defaults included) and does a simple select against one table with a few joins. Nothing complicated. It runs in 8 secs for 6867 rows via SSMS. Through RS (running locally through Visual Studio 2005 at this point) it takes around 25-28 secs. Yet, when I'm in the report on the DATA tab (not the PREVIEW tab) the run takes the expected 8 secs ?!?!
All reports are behaving this way.
I am not using cursors.
I have no default values on parameters.
I have added the "WITH RECOMPILE" to the proc statement.
I have "SET NOCOUNT ON" as the first line of the proc.
I hate to say this, but I even connected the proc to Crystal Reports to see how it behaved. It ran in the expected 8 secs.
I've seen some mention by someone that perhaps this is a known issue of RS that it reads the proc twice. Any truth to this?
Also a couple posts have traced and demonstrated that the report is generating significantly more data "reads" via RS than through SSMS.
We're a shop that is considering a switch from Crystal to RS, but we do everything through stored procedures. I need to clear up this issue before I can go forward recommending a switch. I'm including a copy of a typical proc below for review... What am I missing? What's the deal here with RS?
IF OBJECT_ID('dbo.rpt_InactiveAccounts') IS NOT NULL
DROP PROCEDURE dbo.rpt_InactiveAccounts
GO
CREATE PROCEDURE dbo.rpt_InactiveAccounts
(@.pRunDate datetime
,@.pSalesperson varchar(5000)
,@.pIncludeOpen char(1)
)
WITH RECOMPILE
AS
SET NOCOUNT ON
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
-- CREATE/SETUP TEMP TABLE FOR USE IN PARSING MULTI-VALUED STRING INPUTS
DECLARE @.NumberPivot TABLE (NumberID INT PRIMARY KEY)
DECLARE @.intLoopCounter INT
SELECT @.intLoopCounter =0
WHILE @.intLoopCounter <=4999 BEGIN
INSERT INTO @.NumberPivot
VALUES (@.intLoopCounter)
SELECT @.intLoopCounter = @.intLoopCounter +1
END
-- CREATE TEMP TABLES TO HOLD PARSED VALUES FROM MULTI-VALUE STRING INPUT PARAMETERS
DECLARE @.SalespersonTable TABLE
(tmpSalesperson varchar(30))
-- PARSE OUT @.pSALESPERSON PARAMETER AND STORE VALUES IN TEMP TABLE
INSERT INTO @.SalespersonTable
SELECT SUBSTRING(',' + @.pSalesperson + ',', NumberID + 1,
CHARINDEX(',', ',' + @.pSalesperson + ',', NumberID + 1) - NumberID -1)
FROM @.NumberPivot
WHERE NumberID <= LEN(',' + @.pSalesperson + ',') - 1
AND SUBSTRING(',' + @.pSalesperson + ',', NumberID, 1) = ','
SELECT DISTINCT
CASE
WHEN s.Name IS NULL THEN '<< OPEN >>'
ELSE s.Name
END As SalespersonName
,c.ClassId
,c.CustId
,c.Name
,c.Addr1
,c.Addr2
,c.Addr3
,c.City
,State
,CASE
WHEN Len(c.Zip) = 9 And CharIndex(' ', c.Zip, 0) = 0 THEN Left(c.Zip, 5) + '-' + Right(c.Zip, 4)
ELSE c.Zip
END As Zip
,ac1.descr As Terms
,ac2.descr As Status
FROM
ACTCustomer c (NOLOCK)
LEFT OUTER JOIN CustSales cs ON c.CustId = cs.CustId
LEFT OUTER JOIN ACTSalesperson s ON cs.SlsId = s.SalesId
INNER JOIN @.SalespersonTable st ON s.Name = st.tmpSalesperson OR (s.Name IS NULL AND @.pIncludeOpen = 'Y')
INNER JOIN ACTCode ac1 ON ac1.Code = c.Terms And ac1.FieldId = 'CustTerms'
INNER JOIN ACTCode ac2 ON ac2.Code = c.Status And ac2.FieldId = 'Status'
WHERE
c.LastInvcDate <= @.pRunDate
And c.ClassId <> 'TR'
ORDER BY
SalespersonName, Name, CustId
Hi Dave,
I don't think that this will solve you performance issue but I have a recommendation for you, since you are passing some comma separated list to your reports as parameter, maybe you should create a user-defined function that will convert you list into a table. This would allow you to reuse this same function in all of you reports.
Sample Here:
Here is an example of a function that would convert comma separated list into a table:
http://blogs.vandamme.com/development/2007/06/parse_comma_sep.html
Then you could modify your SQL statement in the stored procedure tu use this function, something like this should do:
SELECT <Fields>
FROM <Table> a
JOIN <Function> (@.CommaSeparatedList) b ON b.uid = a.id
For the performance issue, did you try to profile and compare your SSMS execution and the Report execution?
HTH,