Showing posts with label contain. Show all posts
Showing posts with label contain. Show all posts

Friday, March 23, 2012

Question on subreports

Right now we have one report with two tables in it. The tables are
populated from two different stored procedures. The two tables contain
detail and summary information respectively.
We call the report from a web app, and users can elect to see detail,
summary, or both.
We pass a parameter to control this, and set the tables visiblity
based on it.
Now, I just realized that each of the stored procedures is going to
execute, even if one or the reports is not visible, and I wondered if I
could set this up so I could keep a procedure from executing if we
weren't going to use it.
I wondered if I could do this by using subreports, and including them
based on a parameter.
I thought I'd ask before I started in on this to see if anybody has
done this already.
TIA,
JimMy understanding is when a table or any other data region item is hidden the
underlying dataset is not executed.
You can try to check it by running the SQL Server Profiler Tool.
Med Bouchenafa
<jhcorey@.yahoo.com> a écrit dans le message de news:
1138307871.859110.33690@.z14g2000cwz.googlegroups.com...
> Right now we have one report with two tables in it. The tables are
> populated from two different stored procedures. The two tables contain
> detail and summary information respectively.
> We call the report from a web app, and users can elect to see detail,
> summary, or both.
> We pass a parameter to control this, and set the tables visiblity
> based on it.
> Now, I just realized that each of the stored procedures is going to
> execute, even if one or the reports is not visible, and I wondered if I
> could set this up so I could keep a procedure from executing if we
> weren't going to use it.
> I wondered if I could do this by using subreports, and including them
> based on a parameter.
> I thought I'd ask before I started in on this to see if anybody has
> done this already.
> TIA,
> Jim
>|||In our situation the procedure it's easy to see because one of the
procedures throws an error depending on the data we pass it. There is
a table that uses the dataset from this procedure, and if we set the
table's visibility property to false based on a report parameter, we
still see the error and the reference to the procedure.
It may be that there is somewhere else the procedure is referenced, so
I'll look some more before changing everything.

Wednesday, March 7, 2012

Question on dynamic sorting

Hi,
I am trying to implement dynamic sorting using Reporting Services. I have 3
dropdowns on a page which contain the list of fields returned by a
stored procedure. What I am doing is creating the <Sorting> tag and its
children dynamically based on the sort the user selected. Then I am loading
the report definition (.rdl) into an Xml doc and I am adding the dynamically
created <Sorting> string to the doc at the appropriate location in the
document as if I had added sorting to the report using the Visual Studio IDE.
Then I turn the Xml doc into Byte[] and I am using this updated Byte[] array
to update the report definition. The problem is when I render the report
using the Render method, sorting does not take place as if the original .rdl
is used instead of the one I updated? Is there a way to dynamically deploy
the updated report definition? Is caching the culprit? Am I missing a step?
Is there a simpler way to implement dynamic sorting using RS?
Thanks muchyou could use the parameter "value" to drive the sorting for your table or
list. Under the sort properties, use =Fields(Parameters!SortBy.Value).Value
to have dynamic sorting.
"ISGADMIN" wrote:
> Hi,
> I am trying to implement dynamic sorting using Reporting Services. I have 3
> dropdowns on a page which contain the list of fields returned by a
> stored procedure. What I am doing is creating the <Sorting> tag and its
> children dynamically based on the sort the user selected. Then I am loading
> the report definition (.rdl) into an Xml doc and I am adding the dynamically
> created <Sorting> string to the doc at the appropriate location in the
> document as if I had added sorting to the report using the Visual Studio IDE.
> Then I turn the Xml doc into Byte[] and I am using this updated Byte[] array
> to update the report definition. The problem is when I render the report
> using the Render method, sorting does not take place as if the original .rdl
> is used instead of the one I updated? Is there a way to dynamically deploy
> the updated report definition? Is caching the culprit? Am I missing a step?
> Is there a simpler way to implement dynamic sorting using RS?
> Thanks much