Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
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-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 14, 2016 7:30 PM
Points: 108, Visits: 247
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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:51 AM
Points: 7,451, Visits: 16,187
Do you have a calendar table?


Luis C.
General Disclaimer:
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?


How to post data/code on a forum to get the best help: Option 1 / Option 2
Post #1534654
Posted Monday, January 27, 2014 7:39 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 14, 2016 7:30 PM
Points: 108, Visits: 247
No,we don't have calendar table?

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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:51 AM
Points: 7,451, Visits: 16,187
I would create a calendar table and include the expression in a column so you can use it in the queries.


Luis C.
General Disclaimer:
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?


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


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Wednesday, September 23, 2015 3:34 PM
Points: 5,467, Visits: 7,660
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