From: Alle on
I'm having quite a problem with very poor performance in RS. This is
definately not a data related problem. In order to find the bottle neck I
have created two reports with one grouping. One has a normal static grouping
expression of Fields!MyFieldName.Value while the other also has a static
expression but of the form Fields("MyFieldName").Value. This because I need
to use dynamic grouping and will replace "MyFieldName" with
Parameters!MyGroupParam.Value when this problem is resolved. I am pulling 10k
records into the DataSet with about 200 distinct values in MyFieldName.

When I load these reports as rdl files to the report server and either run
them from the Report Manager OR use a WebViewer or WinForm Viewer in REMOTE
mode there is no problem and both reports render in about the same time
(about 1 to 2 seconds).

When I use the same report definitions as rdlc (Local Mode) then the first
report still renders fast (about 1 to 3 seconds). HOWEVER the second report
requires at least 8 times longer! This is the report with
Fields("MyFieldName").Value as the grouping expression. This means a
rendering time of about 8 seconds in WinForms Viewer and a whopping 18
seconds in the WebForm Viewer. To add insult to injury, each additional
"dynamic" (it isn't really dynamic yet is it) grouping parameter adds the
same time again. This means with 4 "dynamic" parameters the rendering time
in the Web Viewer is over a minute. The behaviour is constant even with
considerably fewer records (down to about 1k).

Unfortunately I can not use remote mode (report server) because I need to
load my data out of a business logic layer in my application. With this poor
performance there is no way that I can use Reporting Services to meet our
goals. At any rate this must be a bad bug in the local processing since all
that is really happening is a quick parse of the expression after which both
syntaxes should behave the same.

The use of a "dynamic" expression in the sort expression or anywhere else
does not seem to cause any problems. It is only the group expression that
can't stand it.

I would be glad to hear from someone whether there is a work around. It
doesn't sound reasonable for a product that has been in use for so many years
now to have this sort of a problem.

I have filed a connect bug at -
https://connect.microsoft.com/VisualStudio/feedback/details/561679/reporting-services-using-parameter-for-dynamic-grouping-very-slow

and have been conversing with Teo Lachev at -
http://prologika.com/CS/forums/p/1272/4541.aspx#4541 on this topic. Teo
suggested that I post here.

Be glad for any insight or help.

Alle