Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Services / Reporting Services / July 2008

Tip: Looking for answers? Try searching our database.

Label for Totals

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom Bean - 28 Jul 2008 16:23 GMT
I have a report that contains customer statistics as of a specified date.
For example:

Customer1    Date1    Stat1    Stat2
                    Date2    Stat1    Stat2
                    Date3    Stat1    Stat2
Customer2    Date1    Stat1    Stat2
                    Date2    Stat1    Stat2
                    Date3    Stat1    Stat2

I am summing the statistics in the table footer with no problem, however, I
need to access the dates to label the totals.  What I want in my totals is:

Total             Date1    Total1    Total2
                    Date2    Total1    Total2
                    Date3    Total1    Total2

How can I access Date1, Date2 & Date3 to use as the labels of the total
rows?

Thanks,
Tom
Charles Wang [MSFT] - 29 Jul 2008 06:23 GMT
Hi Tom,
Thank you for using Microsoft MSDN Managed Newsgroup.

Based on my test, you could not reference the dates fields to label the totals, however you can
implement this requirement by embedding a new table to the footer of your existing table. Please
refer to the following steps:
1. Input Total to the first column field of the footer and then select the right three cells in the footer,
right click on it and select Merge Cells;
2. Drag a Table data region to the merged cell;
3. Hide the table Header and Footer of the new table;
4. Drag the date column (assume its name is TestDate) to the first column field;
5. Right click the table data row and click "Edit Group...", select "=Fields!TestDate.Value" as Group
On, switch to the Sorting tab, and select "=Fields!TestDate.Value" with Ascending as Sort on, and
click OK;
6.  Input "=Sum(Fields!STAT1.Value)" and "=Sum(Fields!STAT2.Value)" to the other two column fields
respectively;

Hope this helps. If you have any other questions or concerns, please feel free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

=========================================================
Tom Bean - 29 Jul 2008 23:13 GMT
Charles,

I have had this type of problem several times in the past and the method you
suggested will really help me in the future.

The only thing in your instructions I had to change was the field I group by
since my dates are not in sorted order and I need the totals to be in the
same order as the detail rows.  Due to the dates not being in sorted order,
my data set includes a SortOrder column, so that is what is used to group
by.

Thanks,
Tom

> Hi Tom,
> Thank you for using Microsoft MSDN Managed Newsgroup.
[quoted text clipped - 52 lines]
> rights.
> =========================================================
Charles Wang [MSFT] - 30 Jul 2008 02:51 GMT
Hi Tom,
Thank you for your response.

I am glad to hear that the suggestions are helpful. If you have any other questions or concerns, please
feel free to let me know. Have a nice day!

Best regards,
Charles Wang
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
=========================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

=========================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.