SSRS 2008 Report Snapshot Timestamp

SSRS 2008 Report Snapshot Timestamp



In SSRS 2005 my report was setup to take snapshot history 5pm daily and it would use the Now() expression to capture the date and time. This would capture the date and time of 5:00 PM and preserve the timestamp in the report.



I upgraded to SQL 2008 (Not R2) and the old reports still hold the snapshot timestamp of 5:00PM, but any newly created reports since the update run the expression each time you look at a snapshot of the shistory. It gives you the time it was ran so if I look at a timestamp for a report captured at 4/1/2013 at 5:00PM today it would display 4/22/2013 10:43AM.



When it was SSRS 2005 if I look at a timestamp for a report captured at 4/1/2013 at 5:00PM today it would display 4/1/2013 at 5:00PM.




2 Answers
2



Faced with the same problem, I ended up adding a datetime column to the dataset and set it to GetDate() in the SQL query. Then I used that field in my report. Not the most elegant solution, but it works.


GetDate()





I actually tried that and it seems like it is still getting the current datetime. Did you have to redo the history settings for it to work? I created a DateTime dataset with this query "Select GetDate() as Now" and this is the expression in the report textbox ="Report for:" + " " + First(Fields!Now.Value, "DateTime").
– Ray Clark
Apr 22 '13 at 18:32





Sounds like your snapshot isn't getting stored. Yes, I'd try saving the snapshot settings again. Maybe a job has been lost on the SQL server that takes the snapshot...
– Jamie F
Apr 22 '13 at 19:27





Awesome I did get that to work. Thanks
– Ray Clark
Apr 23 '13 at 11:37



In order to grapple with SSRS reports issues with capturing the correct DateTime when running a “report history snapshot” you should use the ExecutionTime global field, as opposed to Now() or Today() type of functions.



--> = "Run Date: " + =Today() …changed to… "Run Date: " + FormatDateTime(Globals!ExecutionTime, DateFormat.ShortDate)


"Run Date: " + =Today()


"Run Date: " + FormatDateTime(Globals!ExecutionTime, DateFormat.ShortDate)



--> = "Run Time: " + TimeOfDay() …changed to… "Run Time: " + FormatDateTime(Globals!ExecutionTime, DateFormat.LongTime)


"Run Time: " + TimeOfDay()


"Run Time: " + FormatDateTime(Globals!ExecutionTime, DateFormat.LongTime)



The will provide the results you are seeking for printing Execution runtime, instead of the Current time.



Required, but never shown



Required, but never shown






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ