显示标签为“date”的博文。显示所有博文
显示标签为“date”的博文。显示所有博文

2012年3月29日星期四

Display "Last Run Date" in report!

Is there a way to display the "Last Run Date" in the actual report?The short answer is no, though you could try writing a custom assembly that
passes a report path on the server and then return the ExecutionDate
property via soap.
The properties you will need to build the report path are ReportServerURL,
ReportFolder, and ReportName.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"St Matthew" <StMatthew@.discussions.microsoft.com> wrote in message
news:FE56C3C8-9FB6-4320-9AF9-8FD3C3612AC2@.microsoft.com...
> Is there a way to display the "Last Run Date" in the actual report?|||Do you really want the "Last Run Date", or do you just want to know the
actual timestamp of data and report processing of a particular report (or
history snapshot)?
If it is the latter one, then just add a textbox with =Now to the report.
When the report is rendered live and no execution caching is involved, then
the expression will return the current timestamp (because the data and the
report layout is processed live). If execution caching is involved the
textbox with have the timestamp of the execution snapshot. Finally, if you
render an historic snapshot, the textbox will have the timestamp when the
snapshot has been created (unless you re-process a parameterized history
snapshot where expressions will get re-evaluated).
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:ewzyGxTlEHA.3876@.TK2MSFTNGP15.phx.gbl...
> The short answer is no, though you could try writing a custom assembly
that
> passes a report path on the server and then return the ExecutionDate
> property via soap.
> The properties you will need to build the report path are ReportServerURL,
> ReportFolder, and ReportName.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "St Matthew" <StMatthew@.discussions.microsoft.com> wrote in message
> news:FE56C3C8-9FB6-4320-9AF9-8FD3C3612AC2@.microsoft.com...
> > Is there a way to display the "Last Run Date" in the actual report?
>

2012年3月22日星期四

Disecting date into segments

I have a date that I get from my now() function that returns:

2/10/2004 2:17:16 PM

I would like to be able to break this value up. Is there a function that
allows me to pull whatever I want out of this?

For example, if I just want the year 2004 pulled out (for a drop down
list I'm creating) what would the function be to do that?
And If I just want the day, 10 pulled out, then how would I do that?

part of the problem is that depending on the month, is the number of
digits one counts from the front. 10,11,12 add one digit to the front of
the string, making this difficult.

I'm creating a search between dates so someone can select the day, month
and year as beginning value, and the end value. So how would I go about
disecting this string?

Thanks,

Bill

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Bill <williamzim2000@.yahoo.com> wrote in message news:<40295fcd$0$202$75868355@.news.frii.net>...
> I have a date that I get from my now() function that returns:
> 2/10/2004 2:17:16 PM
> I would like to be able to break this value up. Is there a function that
> allows me to pull whatever I want out of this?
> For example, if I just want the year 2004 pulled out (for a drop down
> list I'm creating) what would the function be to do that?
> And If I just want the day, 10 pulled out, then how would I do that?
> part of the problem is that depending on the month, is the number of
> digits one counts from the front. 10,11,12 add one digit to the front of
> the string, making this difficult.
> I'm creating a search between dates so someone can select the day, month
> and year as beginning value, and the end value. So how would I go about
> disecting this string?
> Thanks,
> Bill
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Via Book online (7.0 / 2000)

DATEPART ( datepart , date )

Arguments
datepart

Is the parameter that specifies the part of the date to return. The
table lists dateparts and abbreviations recognized by Microsoft SQL
Server.

Datepart Abbreviations
year yy, yyyy
quarter qq, q
month mm, m
dayofyear dy, y
day dd, d
week wk, ww
weekday dw
hour hh
minute mi, n
second ss, s
millisecond ms

Also be aware of the data in the table. If it includes time, you'll
want to accomodate for that in your between / ( >= <= ).|||Bill (williamzim2000@.yahoo.com) writes:
> I have a date that I get from my now() function that returns:
> 2/10/2004 2:17:16 PM
> I would like to be able to break this value up. Is there a function that
> allows me to pull whatever I want out of this?

In SQL Server there is datepart. On the other hand there is no Now()
function, so I suspect that you are in the wrong newsgroup. Hm, let's
see, Now() smells like Access but also Visual Basic. I think that there
is a datepart() function in VB too. Then again, whatever you are using
it's likely to come with online documentation, so check there.,

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

2012年3月7日星期三

Disappearing databases - HELP!

Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
Server, using MacAfee VirusScan Enterprise
Over the lunchtime, we seem to have lost several databases from a couple of
server groups on our server!
It appears no-one was working on the server at the time.
Does anyone know if there is a virus/worm which is capable of this?
Any ideas gratefully received ;-)
TIA
SteveCyberDwarf wrote:
> Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
> Server, using MacAfee VirusScan Enterprise
> Over the lunchtime, we seem to have lost several databases from a couple of
> server groups on our server!
> It appears no-one was working on the server at the time.
> Does anyone know if there is a virus/worm which is capable of this?
> Any ideas gratefully received ;-)
> TIA
> Steve
>
Do you have Internet sites talking to these databases, and are those
sites properly protected from SQL injection attacks? Have you checked
the SQL logs to see if there are clues there? The Windows event logs?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy
Thx for your rapid reply.
No, there are no connections to this server from the Net.
Am in the process of checking the logs
Regards
Steve|||SQL Server log shows no unusual activity at all!!
Doh!|||On Wed, 9 Aug 2006 16:14:37 +0100, "CyberDwarf"
<steve.ingle@.lineone.net> wrote:
in <eWTymY8uGHA.4756@.TK2MSFTNGP02.phx.gbl>
>Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
>Server, using MacAfee VirusScan Enterprise
>Over the lunchtime, we seem to have lost several databases from a couple of
>server groups on our server!
>It appears no-one was working on the server at the time.
>Does anyone know if there is a virus/worm which is capable of this?
>Any ideas gratefully received ;-)
>TIA
>Steve
>
I've seen System Restore wipe out databases.
Stefan Berglund|||Cyber
As you're desribing the issue, it looks like (very sad to say) that
someone who has/have permissions just droped the databases. I have
experience at our shop unfortunatly.
"CyberDwarf" <steve.ingle@.lineone.net> wrote in message
news:eWTymY8uGHA.4756@.TK2MSFTNGP02.phx.gbl...
> Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
> Server, using MacAfee VirusScan Enterprise
> Over the lunchtime, we seem to have lost several databases from a couple
> of server groups on our server!
> It appears no-one was working on the server at the time.
> Does anyone know if there is a virus/worm which is capable of this?
> Any ideas gratefully received ;-)
> TIA
> Steve
>

Disappearing databases - HELP!

Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
Server, using MacAfee VirusScan Enterprise
Over the lunchtime, we seem to have lost several databases from a couple of
server groups on our server!
It appears no-one was working on the server at the time.
Does anyone know if there is a virus/worm which is capable of this?
Any ideas gratefully received ;-)
TIA
SteveCyberDwarf wrote:
> Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
> Server, using MacAfee VirusScan Enterprise
> Over the lunchtime, we seem to have lost several databases from a couple o
f
> server groups on our server!
> It appears no-one was working on the server at the time.
> Does anyone know if there is a virus/worm which is capable of this?
> Any ideas gratefully received ;-)
> TIA
> Steve
>
Do you have Internet sites talking to these databases, and are those
sites properly protected from SQL injection attacks? Have you checked
the SQL logs to see if there are clues there? The Windows event logs?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Tracy
Thx for your rapid reply.
No, there are no connections to this server from the Net.
Am in the process of checking the logs
Regards
Steve|||SQL Server log shows no unusual activity at all!!
Doh!|||On Wed, 9 Aug 2006 16:14:37 +0100, "CyberDwarf"
<steve.ingle@.lineone.net> wrote:
in <eWTymY8uGHA.4756@.TK2MSFTNGP02.phx.gbl>

>Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
>Server, using MacAfee VirusScan Enterprise
>Over the lunchtime, we seem to have lost several databases from a couple of
>server groups on our server!
>It appears no-one was working on the server at the time.
>Does anyone know if there is a virus/worm which is capable of this?
>Any ideas gratefully received ;-)
>TIA
>Steve
>
I've seen System Restore wipe out databases.
Stefan Berglund|||Cyber
As you're desribing the issue, it looks like (very sad to say) that
someone who has/have permissions just droped the databases. I have
experience at our shop unfortunatly.
"CyberDwarf" <steve.ingle@.lineone.net> wrote in message
news:eWTymY8uGHA.4756@.TK2MSFTNGP02.phx.gbl...
> Running SQL Server 2000 - patched up to date, behind firewall, on Win2003
> Server, using MacAfee VirusScan Enterprise
> Over the lunchtime, we seem to have lost several databases from a couple
> of server groups on our server!
> It appears no-one was working on the server at the time.
> Does anyone know if there is a virus/worm which is capable of this?
> Any ideas gratefully received ;-)
> TIA
> Steve
>

2012年2月24日星期五

Disabled or Locked Date Parameters

Hi
I'm fairly new to Reporting Services. We have three or four parameters in
our reports. The FirstDate and LastDate parameters (datetime) are disabled
or locked until we fill in information in the other parameter fields. If the
date parameters are first in the list, they are not disabled or locked. But
we would like them to be last most of the time. Is there a way to "unlock"
them so they are enabled when the report is run instead of having to fill out
the other parameters first?
TIA
MarieJOn Apr 19, 8:08 am, MarieJ <Mar...@.discussions.microsoft.com> wrote:
> Hi
> I'm fairly new to Reporting Services. We have three or four parameters in
> our reports. The FirstDate and LastDate parameters (datetime) are disabled
> or locked until we fill in information in the other parameter fields. If the
> date parameters are first in the list, they are not disabled or locked. But
> we would like them to be last most of the time. Is there a way to "unlock"
> them so they are enabled when the report is run instead of having to fill out
> the other parameters first?
> TIA
> MarieJ
As long as they are not dependent on preceding report parameters, they
should not appear locked. Make sure that the datasets that are
sourcing the parameters are not dependent on the wrong parameters
themselves. To check this, select the Data tab and select the correct
Dataset name from the drop-down list and select the Edit Selected
Dataset [...] button and then check the parameter mappings of the
dataset via the Parameters tab. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant