Solved

Textbox containing a date expression changes in snapshots ?

Posted on 2008-06-20
1
431 Views
Last Modified: 2013-11-05
Hello,

My report contains a TextBox with an expression "=Now()" in the Page Header
in order to display the date and time the report was generated.

Now, when I open a snapshot of the report the value in the TextBox changes
to the current date and time, instead of preserving the value that was there
at the time the snapshot was generated.

I thought snapshots were static.

1. What exactly remains static for snapshots ?

2. Can or do parameters also change ? The reason I am asking is because I am
also displaying the paraemter values in the Page Header and I don't want
those values to change.

3. Is there a workaround ? I would like to preserve the date and time and I
don't want it to change every time someone generates the report from the
snapshot.

4. I also have two other textboxes on the Page Header which are VB.NET code expression which calculate dates. Will these change ?

Thank you for your help !
0
Comment
Question by:LiorRon
1 Comment
 
LVL 13

Accepted Solution

by:
rickchild earned 250 total points
ID: 21844805
1.  The following is stored as part of a snapshot:

- Data result set
- Report Definition (the code in the .rdl)
- Parameter Values
- Embedded objects such as images

2. Regarding parameters see the quote below from this link, but it looks like the parameters do not change.

http://technet.microsoft.com/en-us/library/aa274411(SQL.80).aspx

You can create a snapshot for a report using one set of parameter values.
If a parameterized report supports multiple values for a single parameter (for example, an EmployeeID parameter that takes an employee-specific value), only one of those values is stored with the snapshot.
If a user requests the report using a different parameter value, the value is ignored.
The snapshot that the user sees is based on the parameter value that is stored with the snapshot.

3. You could try using this instead of =Now()

=Globals!ExecutionTime

Also if that doesn't work the date and time of snapshot is stored with the snapshot in the database, as you can see the "When Run" in report manager next to the report.  Not sure exactly where this is stored, but a workaround may involve running a trace, opening that page to see which Stored Procedure is used by the server to pull this date, and using it in the report as a data source.

4. Unsure sorry, may need to test.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
How to increase the row limit in Jasper Server.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now