Solved

SQL Reporting Services 2005 Create Report with YTD and LYTD information

Posted on 2006-07-01
2
1,127 Views
Last Modified: 2012-06-27
Hi,

I'm trying to create a tabular report that returns a YTD and LYTD totals for a check register.

The table contains the following fields:

Customer
DateEntered
Amount
Type

I'm new at this - any help is appreciated.

Thanks,

Terry

0
Comment
Question by:tmccull2
2 Comments
 
LVL 4

Accepted Solution

by:
dnsvh earned 250 total points
ID: 17062488
Using MS SQL, your SQL statement would look like this:

SELECT
Customer,
DateEntered,
YEAR(DateEntered) 'EnteredYear',
Amount,
Type
FROM dbo.YourTable
--Display LYTD
WHERE (DateEntered BETWEEN CONVERT(DATETIME, CONVERT(CHAR(4), YEAR(GETDATE()) - 1) + '-01-01') AND DATEADD(YEAR, -1, GETDATE()))
--Display YTD
OR YEAR(DateEntered) = YEAR(GETDATE())

You could then create a table, group on year and do your totals that way.  Does this make sense?

Derrick
0
 

Author Comment

by:tmccull2
ID: 17080453
Derrick,

Makes sense - thank you.

Terry
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now