Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Programmatically assigning report parameters

Author  Topic 

neostar
Starting Member

18 Posts

Posted - 2005-02-08 : 08:56:36
I have a report allready created for our accounts department, but instead of them having to access the website to generate the report, I want to use the subscription service to simply email an excel copy of the report on the first of each month.

The problem with this is the report uses a single parameter called 'fiscal date' which takes the format 0105 for January 2005, 0205 for february etc..

Is there anyway I can build some logic into the report using either reporting services or the embedded SQL statement itself to workout that if the month is febuary 2005 the paramter will be 0205.

Any help would be appreciated

Dan

jhermiz

3564 Posts

Posted - 2005-02-08 : 22:26:34
errr...u wont need this as a parameter if you want it done automatically. In your query just limit the records by saying:

WHERE myField...

The ... is where you would use the DATE functions, look them up in BOL there is GetDate, Day, Month, etc...




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

neostar
Starting Member

18 Posts

Posted - 2005-02-09 : 09:20:26
Sorted, used the getdate() function along with a convert and a case statement.

Thanks

Dan
Go to Top of Page
   

- Advertisement -