Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Dynamic Grouping

Author  Topic 

1sabine8
Posting Yak Master

130 Posts

Posted - 2008-11-11 : 04:05:10
Hi,
I need to build a graph in Reporting services where the grouping is dynamic. It means i need to put as parameter 'Group by' drop down with all the possible groupings. When the user chooses Product, graph results will be grouped by Products, if the user chooses Type, grouping will be done by Type.
How can this be done?
Thanks in advance

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-11 : 04:14:13
This can be done by giving an expression in grouping window

some thing like

=Parameters!Group_By.value
Go to Top of Page

1sabine8
Posting Yak Master

130 Posts

Posted - 2008-11-11 : 05:53:28
hi,
thanks for your reply. but i need the full steps description. need to know how to set my parameters? how to set my 'Group_By' parameter?...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-11 : 05:58:39
http://blogs.msdn.com/chrishays/archive/2004/07/15/DynamicGrouping.aspx
http://www.c-sharpcorner.com/UploadFile/asif.blog/DynamicDataGrouping08042006115320AM/DynamicDataGrouping.aspx
Go to Top of Page

1sabine8
Posting Yak Master

130 Posts

Posted - 2008-11-11 : 08:17:21
hi,
I found the solution:
http://blogs.msdn.com/chrishays/archive/2004/07/15/DynamicGrouping.aspx
thanks anyway
Go to Top of Page

andros30
Yak Posting Veteran

80 Posts

Posted - 2008-11-11 : 15:26:11
Visakh, I am reading this link you provided:
http://www.c-sharpcorner.com/UploadFile/asif.blog/DynamicDataGrouping08042006115320AM/DynamicDataGrouping.aspx

I can't help but to wonder if my situation falls into this category. I had another thread asking about the possibility of splitting my report on multiple tab in a spreadsheet and you pointed me to DocumentMap. I looked into this and am not entirely sure how this can be implemented. Can you analyze the following situation and see if this is the answer I need?

Stored Procedure: dbo.usp_GetWeeklyReport(@Office,@startdate,@enddate)
- Stored procedure calls 4 udfs and based on if records exists, return results or return a message stating no records found.
- Sample of procedure calling one of the functions:
if exists(
Select OfficeNum,EntityCode,AcctNum,PatientName,ConsultDate,[Initial Writeup to be Filed Date]
from dbo.[udf_Consults] (@OfficeNumber, @StartDate, @EndDate)
) begin
set @SQL = 'Select AcctNum,PatientName,ConsultDate,[Initial Writeup to be Filed Date]
from Datasync.dbo.[udf_MedicaidConsults]'+' '+'('''+ @OfficeNumber +''',''' + convert(varchar(10),@StartDate,101) +''',''' + convert(varchar(10),@EndDate,101) +''')
order by ConsultDate DESC, PatientName
--This <title> and <comments> tags are used currently to separate the reports following SQLAnswersMail setup.
/*<title>' + @Title1 + '</title><comments>' + @Desc + '</comments>*/;'
end else begin
set @SQL = 'Select ''No Patient Returned '' /*<title>' + @Title1 + '</title><comments>' + @Desc + '</comments>*/;'
end

Functions:
- dbo.udf_Consults(@Office,@startdate,@enddate)
* Column names: AcctNum|PatientName|ConsultDate|FilingDate
- dbo.udf_Records(@Office,@startdate,@enddate)
* Column names: AcctNum|PatientName|RecordsDate|FilingDate
- dbo.udf_Banding(@Office,@startdate,@enddate)
* Column names: AcctNum|PatientName|BandingDt|TxMnths|MnthsRemain|CntrAmt|PaidtoDt|InsPaid|FilingDt|LastAppt|NextAppt
- dbo.udf_Continuations(@Office,@startdate,@enddate)
* Column names: - AcctNum|PatientName|BandingDt|TxMnths|MnthsRemain|CntrAmt|PaidtoDt|InsPaid|1stQtrBillDt|CurrQtrBillDt|LastAppt|NextAppt


So is DynamicDataGrouping what is called for in my situation?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-12 : 01:08:29
Dynamic Grouping just changes the way data is grouped and aggregated in report to show values. The data will still be shown in same report. what you asked for is to show data in different tabs. This is not something that is determined by dynamic grouping. it only determines what data is to displayed but it does not determine how to display data
Go to Top of Page
   

- Advertisement -