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

Datetime Parameter Question Expand / Collapse
Author
Message
Posted Friday, April 11, 2014 7:48 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 6:35 AM
Points: 18, Visits: 77
Is it possible to change the value of a datetime parameter depending on the value of another?

Basically I have a Parameters!FromDate.Value = yesterdays date (EG '2014-04-10')

I have another parameter called Parameters!WeekStart.Value which equals the start of the current week (EG '2014-04-07').

When I go to run the report and change FromDate to say '2014-04-02' I want the WeekStart value to change '2014-03-31'.

Is this possible?
Post #1560925
Posted Friday, April 11, 2014 7:54 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 1,014, Visits: 3,289
What you want to do is called Cascading Parameters and if you have a look at this article it'll explain it better than I can.




On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
—Charles Babbage, Passages from the Life of a Philosopher
Post #1560934
Posted Friday, April 11, 2014 8:04 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 6:35 AM
Points: 18, Visits: 77
Thank you! It was so simple in the end.
Post #1560940
Posted Friday, April 11, 2014 8:15 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 2:09 PM
Points: 1,014, Visits: 3,289
You're welcome. It's not actually something I've got personal experience of using but several of the reports our company run use them. I'm waiting for a chance to try it out myself!


On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
—Charles Babbage, Passages from the Life of a Philosopher
Post #1560951
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse