WizardSleeve
New Member
- Joined
- Oct 9, 2014
- Messages
- 4
I have built a report and, as an example, one of the tables uses unions to bring in various sets of information.
Previously they just wanted to look at the last 6 months, which was fine as I could use the getdate() function to bring back the data to Pivot within excel.
They have since decided they want to select the date that they would like to view six months up until.
Rather than add 7 parameters in for this table linked back to the same cell reference, then repeat this for other tables I though I could use a variable + a parameter
I simply did:
DECLARE @USEDATE AS DATETIME
SET @USEDATE = ?
? references a cell with a date, and I have tried numerous formats for this, but I keep getting the following errors:
Invalid Parameter Number
Invalid Descriptor Index
Putting in a date directly seems to work but using a parameter doesn't
Am I doing something wrong?
Any help is much appreciated! - thank you in advance.
Previously they just wanted to look at the last 6 months, which was fine as I could use the getdate() function to bring back the data to Pivot within excel.
They have since decided they want to select the date that they would like to view six months up until.
Rather than add 7 parameters in for this table linked back to the same cell reference, then repeat this for other tables I though I could use a variable + a parameter
I simply did:
DECLARE @USEDATE AS DATETIME
SET @USEDATE = ?
? references a cell with a date, and I have tried numerous formats for this, but I keep getting the following errors:
Invalid Parameter Number
Invalid Descriptor Index
Putting in a date directly seems to work but using a parameter doesn't
Am I doing something wrong?
Any help is much appreciated! - thank you in advance.