For First run count should be displayed, second run it should display all the aggregate columns
-
Wednesday, January 09, 2013 10:20 AMMy report has all the aggregated columns and group by columns, my requirement is for the first run it should display the count of the table hiding all the aggregated columns and from second run on-wards it should all the aggregated columns are to be displayed
All Replies
-
Wednesday, January 09, 2013 10:25 AM
Is that possible to have two columns to display?
SELECT MAX(...),MIN(*),AVG(*),COUNT(*) OVER() as cnt_tbl
Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Blog: Large scale of database and data cleansing
Remote DBA Services: Improves MS SQL Database Performance
-
Wednesday, January 09, 2013 10:32 AM
I didnt get you ???
-
Wednesday, January 09, 2013 11:18 AM
Your requirements are not clear. First run? when the user clicks on the report the first time? and 2nd run and onwards, without closing the report, the user refreshes the report?
Why don't you just have a parameter (pulldown) so the user can select what he wants to see and based on that hide/display the aggregated columns?
Please mark as answered or vote helpful if this post help resolved your issue. Thanks!
k r o o t z -
Wednesday, January 09, 2013 11:29 AM
I have parameters in my report and those parameters have default values.
So with default parameters i should display the count of the table and after that the user select the columns and aggregate functions in parameters and clicks "VIEW REPORT" then it should display those column names and aggregated values.
My problem is i am able to get the count of the table with default parameter values but i am unable to hide that column for the subsequent runs.
Let me know if you want anymore information.
-
Wednesday, January 09, 2013 1:15 PM
there's a possible workaround i think.
add a hidden parameter, specify value based on your other parameters
if the values of the other parameters are your "default" values, set this hidden parameter value = 0, if the values are other than your default, set it to 1
the use this hidden parameter as the basis of visibility your aggregated columns.
so this is not really, first run and second run, it's more of default values vs other values. If the user selects your default values on the 3rd run, it will be like the first run.
Please mark as answered or vote helpful if this post help resolved your issue. Thanks!
k r o o t z -
Thursday, January 10, 2013 7:03 AM
Thanks Krootz,
That was helpful but instead of taking a hidden parameter i can specify the visibility condition to if all parameters are set to their default values then hide aggregated columns.
But my requirement is to display count of table which should happen only once and that to when you run for the first time. If i select the the default parameters on the 3rd run then my report will again show the count instead of showing aggregated columns which is not expected.
I hope you understand my requirement , let me know if u need any more info
Thanks
- Edited by Arun Kumar3 Thursday, January 10, 2013 7:03 AM

