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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, June 2, 2014 1:06 PM
Points: 55, Visits: 109
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


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 3,580, Visits: 8,033
Do you have a calendar table?


Luis C.
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, June 2, 2014 1:06 PM
Points: 55, Visits: 109
No,we don't have calendar table?

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


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 10:59 AM
Points: 3,580, Visits: 8,033
I would create a calendar table and include the expression in a column so you can use it in the queries.


Luis C.
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

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: Yesterday @ 10:53 PM
Points: 5,383, Visits: 7,456
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