Need expression for start date and end date

  • 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?

  • 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
  • No,we don't have calendar table?

    Any help regarding the expression?

  • 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
  • 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[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply