Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need expression for start date and end date Expand / Collapse
Author
Message
Posted Friday, January 24, 2014 2:09 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 10:46 AM
Points: 30, Visits: 63
Hello I am creating an SSRS report where in the header I am trying to insert a text box with expression;in that expression the date should be july 1,2013 - june 30,2014

because july to june is one year for us in our company;so july 1 and june 30 are constant for every report;just years will be changing

how can I subtract previous year ...any help for the expression in order to get that format?
Post #1534645
Posted Friday, January 24, 2014 2:27 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:14 PM
Points: 2,763, Visits: 5,908
Do you have a calendar table?


Luis C.
I am a great believer in luck, and I find the harder I work the more I have of it. Stephen Leacock

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1534654
Posted Monday, January 27, 2014 7:39 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 10:46 AM
Points: 30, Visits: 63
No,we don't have calendar table?

Any help regarding the expression?
Post #1535013
Posted Monday, January 27, 2014 1:31 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 6:14 PM
Points: 2,763, Visits: 5,908
I would create a calendar table and include the expression in a column so you can use it in the queries.


Luis C.
I am a great believer in luck, and I find the harder I work the more I have of it. Stephen Leacock

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1535182
Posted Monday, January 27, 2014 1:41 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 3:16 PM
Points: 5,986, Visits: 6,931
I don't know if you need a full on table for this, but yes, you need to create a list somewhere, somehow, for this.

You can create the list in the report (which would have to be maintained eventually), you can generate a list via a relatively simple view showing, say, this year +10 years back, or you can create a table as Luis recommended, which would also need to be maintained just differently (as data, intead of as a code launch).

The real question is, what is the list's requirements for future/past value allowances?



- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Post #1535188
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse