Thursday, March 29, 2012
Count Or Running Totals Really Not Sure !
The first problem i want to deal with is to get a count of the short stops we are having.
I have set up a running total that is like so
Field to summarize = tblDowntime.DTCLevel3
Type of Summary = Count
Evaluate
Formula = {tblDowntime.Duration} < 900 (this in seconds so Less than 15 Mins)
Reset
Change of field = tblCoilData.BatchName (this is the works order Number)
Before I put this in i get the correct values except no short stops data so:
Rod Number, Rod Weight, Scrap, EC Stops, Coil Weight
This gives me normally 4 results as follows
544124, 1,9882, 0.00, ,19882
544125, 1,9452, 44, , , 19408
544126, 1,9452, 44, , , 19408
544127, 1,9452, 44, , , 19408
When i put the running total into my report i get
544124, 1,9882, 0.00, 1,19882
544124, 1,9882, 0.00, 2,19882
544124, 1,9882, 0.00, 2,19882
544125, 1,9452, 44, 0, 19408
544126, 1,9452, 44, 0 , 19408
544127, 1,9452, 44, 0 , 19408
I cant understand why it would do this. i know that on Rod Number 544124 there were 2 short stops, i only want to show it like the top version with a total of the short stops
How is this done
Regards
SteveSo you only want one row per rod number? Are you grouping on that and printing in the group footer?|||No, i am not grouping it is just in details, i tried to group but then it screwed my totals for coil wieght. instead of doing 8 Ton per day we ended up with 40 Ton (mmm That looked good but was way out)
Regards
Steve|||Hi, Thanks for your reply i realised that i was not surpressing the details of the report causing me to get some strange results
Regards
Steve
Monday, March 19, 2012
could not obtain information about...
--=_NextPart_000_000A_01C3DE9A.B4361940
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am getting the following message in my event logs since hitting = windows update and installing, among others SP4 for win2k.
"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan = 'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) - Status: = Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job failed. = Unable to determine if the owner (MYSERVER\mylogin) of job DB Backup Job = for DB Maintenance Plan 'Michaels Backup Plan' has server access = (reason: Could not obtain information about Windows NT group/user = 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
the only thing that changed was the updates, which can be significant = but I certainly didn't change anything related to my account. I have = recreated the plan with the same result.
I can open the LOGON section of SQLadmin and see my name there, I can = open it and close it but if I try to make any changes it says messages = similar to the above on.
KB articles suggested ading the everyone group to the pre2000 users = group but that sounds dangerous.
Help? what else can I look at. I am the sysop and should have all the = necessary rights
--=_NextPart_000_000A_01C3DE9A.B4361940
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
I am getting the following message in my = event logs since hitting windows update and installing, among others SP4 = for win2k.
"SQL Server Scheduled Job 'DB Backup Job = for DB Maintenance Plan 'Michaels Backup Plan'' = (0x8E4169EC6E0A93468357CC016A8A9186) - Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job failed. Unable to determine if the owner (MYSERVER\mylogin) of job = DB Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server = access (reason: Could not obtain information about Windows NT group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
the only thing that changed was the = updates, which can be significant but I certainly didn't change anything related = to my account. I have recreated the plan with the same result.
I can open the LOGON section of SQLadmin = and see my name there, I can open it and close it but if I try to make any changes = it says messages similar to the above on.
KB articles suggested ading the everyone = group to the pre2000 users group but that sounds dangerous.
Help? what else can I look at. I am the = sysop and should have all the necessary rights
--=_NextPart_000_000A_01C3DE9A.B4361940--In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
writes
>I am getting the following message in my event logs since hitting windows
>update and installing, among others SP4 for win2k.
>"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
>'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
>Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
>failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
>Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
>access (reason: Could not obtain information about Windows NT
>group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
>the only thing that changed was the updates, which can be significant but
> I certainly didn't change anything related to my account. I have recreated
>the plan with the same result.
>I can open the LOGON section of SQLadmin and see my name there, I
>can open it and close it but if I try to make any changes it says messages
>similar to the above on.
>KB articles suggested ading the everyone group to the pre2000 users
>group but that sounds dangerous.
>Help? what else can I look at. I am the sysop and should have all the
>necessary rights
I assume you have seen KB 241643, but have you tried the first
workaround "Change the job owner to a standard SQL Server user or system
administrator (sa)."? I have read this many times, and the second option
has never worked for me, so I go straight for option 1. I suspect there
may be other causes, perhaps network issues between SQL and the DC.
PRB: 8198 Error Message Returned from Job Owned by Windows NT
Authenticated User
http://support.microsoft.com?kbid=241643
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org|||"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
> >
> >I am getting the following message in my event logs since hitting windows
> >update and installing, among others SP4 for win2k.
> >
> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
> >access (reason: Could not obtain information about Windows NT
> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
> >
> >the only thing that changed was the updates, which can be significant but
> > I certainly didn't change anything related to my account. I have
recreated
> >the plan with the same result.
> >
> >I can open the LOGON section of SQLadmin and see my name there, I
> >can open it and close it but if I try to make any changes it says
messages
> >similar to the above on.
> >
> >KB articles suggested ading the everyone group to the pre2000 users
> >group but that sounds dangerous.
> >
> >Help? what else can I look at. I am the sysop and should have all the
> >necessary rights
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>|||Lets try that again.
I saw the KB article and I couldn't make option 2 work either so that is
encouraging :-?
The DC and the SQL server are the same machine so comms shouldn't be an
issue.
I'll try creating a new backup plan under sa but could you tell me what a
"Standard Sql Server User " is?
"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
news:7r2qD3R8WFEAFwOw@.sqldts.com...
> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
> writes
> >
> >I am getting the following message in my event logs since hitting windows
> >update and installing, among others SP4 for win2k.
> >
> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
> >access (reason: Could not obtain information about Windows NT
> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
> >
> >the only thing that changed was the updates, which can be significant but
> > I certainly didn't change anything related to my account. I have
recreated
> >the plan with the same result.
> >
> >I can open the LOGON section of SQLadmin and see my name there, I
> >can open it and close it but if I try to make any changes it says
messages
> >similar to the above on.
> >
> >KB articles suggested ading the everyone group to the pre2000 users
> >group but that sounds dangerous.
> >
> >Help? what else can I look at. I am the sysop and should have all the
> >necessary rights
> I assume you have seen KB 241643, but have you tried the first
> workaround "Change the job owner to a standard SQL Server user or system
> administrator (sa)."? I have read this many times, and the second option
> has never worked for me, so I go straight for option 1. I suspect there
> may be other causes, perhaps network issues between SQL and the DC.
> PRB: 8198 Error Message Returned from Job Owned by Windows NT
> Authenticated User
> http://support.microsoft.com?kbid=241643
>
> --
> Darren Green (SQL Server MVP)
> DTS - http://www.sqldts.com
> PASS - the definitive, global community for SQL Server professionals
> http://www.sqlpass.org
>|||In message <u1fxN$d4DHA.2612@.tk2msftngp13.phx.gbl>, mmac <no@.thanks.com>
writes
>Lets try that again.
>I saw the KB article and I couldn't make option 2 work either so that is
>encouraging :-?
>The DC and the SQL server are the same machine so comms shouldn't be an
>issue.
>I'll try creating a new backup plan under sa but could you tell me what a
>"Standard Sql Server User " is?
>
A standard SQL Server user, or SQL (Server) login, is what you use as
opposed to and integrated or NT authentication login. This option is
only available if the server is set to Mixed Mode security.
sa is a SQL login, but BUILTIN\Administrators is a integrated login.
Make sense?
Darren
>"Darren Green" <darren.green@.reply-to-newsgroup-sqldts.com> wrote in message
>news:7r2qD3R8WFEAFwOw@.sqldts.com...
>> In message <eoafD3t3DHA.2556@.TK2MSFTNGP10.phx.gbl>, mmac <no@.thanks.com>
>> writes
>> >
>> >I am getting the following message in my event logs since hitting windows
>> >update and installing, among others SP4 for win2k.
>> >
>> >"SQL Server Scheduled Job 'DB Backup Job for DB Maintenance Plan
>> >'Michaels Backup Plan'' (0x8E4169EC6E0A93468357CC016A8A9186) -
>> >Status: Failed - Invoked on: 2004-01-19 02:00:00 - Message: The job
>> >failed. Unable to determine if the owner (MYSERVER\mylogin) of job DB
>> >Backup Job for DB Maintenance Plan 'Michaels Backup Plan' has server
>> >access (reason: Could not obtain information about Windows NT
>> >group/user 'MYSERVER\mylogin'. [SQLSTATE 42000] (Error 8198))."
>> >
>> >the only thing that changed was the updates, which can be significant but
>> > I certainly didn't change anything related to my account. I have
>recreated
>> >the plan with the same result.
>> >
>> >I can open the LOGON section of SQLadmin and see my name there, I
>> >can open it and close it but if I try to make any changes it says
>messages
>> >similar to the above on.
>> >
>> >KB articles suggested ading the everyone group to the pre2000 users
>> >group but that sounds dangerous.
>> >
>> >Help? what else can I look at. I am the sysop and should have all the
>> >necessary rights
>> I assume you have seen KB 241643, but have you tried the first
>> workaround "Change the job owner to a standard SQL Server user or system
>> administrator (sa)."? I have read this many times, and the second option
>> has never worked for me, so I go straight for option 1. I suspect there
>> may be other causes, perhaps network issues between SQL and the DC.
>> PRB: 8198 Error Message Returned from Job Owned by Windows NT
>> Authenticated User
>> http://support.microsoft.com?kbid=241643
>>
>> --
>> Darren Green (SQL Server MVP)
>> DTS - http://www.sqldts.com
>> PASS - the definitive, global community for SQL Server professionals
>> http://www.sqlpass.org
>
--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com
PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
Friday, February 17, 2012
Cost of Comparing Dates, ignoring Time part
Hi, i would like to know what is better when trying to compare two data fields one of them has the format yyyymmdd and then the another is yyyymmdd hh:mms
I need to ignore the time part but when I use this ...
where Convert(CHAR(8),Year(date)*10000+ Month(date)*100+Day(date))
between @.date_ini and @.date_fin
I have also tried this....
where convert(varchar(12), date, 112 )
between @.date_ini and @.date_fin
@.date_ini and @.date_fin are varchar '20070301'
The proble is that the time to execute the query is exagerated
would you pleas help me?
Try:
where date >= @.date_ini
and date < convert(datetime, @.date_fin) + 1
The performance of your query should be improved if you have an index on your "date" field. Also, I have assumed that you have stoerd your field as an SQL datetime field and made the assumption that when you say that you wat @.date_ini and @.date_fin to be the same date that you are wanting all records on that date to be selected.
I do not use the BETWEEN operator because BETWEEN would also select data that occurs exactly on midnight of the next day.
|||Thank you Kent Waldrop
It works better
Tuesday, February 14, 2012
Corrupted PDF attachments in Reporting Services
Most are our own employees (using Microsoft Exchange/Outlook) and the report
is fine. We are, however, having problems sending the report to Yahoo, AOL
and Hotmail users. Here are some tests we've done...
Test #1: I have run the report and exported it as a PDF, opening it
directly into Adobe fine.
Test #2: I then exported it, saved it to my drive, then emailed the report
as a attachment using Outlook /Exchange to my Hotmail account and the report
opens fine.
Test #3: I set up a subscription to email it to simultaneously to both my
Hotmail and Exchange accounts. The report attachment that went to my
Exchange account opens fine in Adobe. The one that arrived attached to the
email to my Hotmail account arrived in a format that Adobe does not
recognize. ("... either not a supported file type or because the file has
been corrupted. For example, it was sent as an email attachment and wasn't
corrected decoded.")
The problem isn't my computer nor a problem with my Adobe Reader. It's not
my Exchange server that is delivering it to my Exchange account (it's the
same server). It's not my Outlook email with attachment sent by Exchange to
Hotmail.
Considering the common path that each of these tests followed and
determining which one didn't work, it appears to me that most likely the
Report Server is not submitting the report to Exchange as an attachment in a
way that services such as Hotmail, AOL, Yahoo, etc can work with or it's
interaction with my mail server when preparing it to send outside my mail
server.
Any help on this? Is this acknowledged by Microsoft?
JonThere is a known issue with a Unicode byte order mark being written out to
the attachment part of the email. This has been fixed in a QFE posted here:
http://support.microsoft.com/default.aspx?scid=kb;[LN];872774
Please note, this fix fixes an attachment problem and not merely a problem
with LOTUS so don't be fooled by the title.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jon Limmer" <jlimmer@.gmbeverage.com> wrote in message
news:ug8%23kLH5EHA.1192@.tk2msftngp13.phx.gbl...
> We use subscriptions to send a list of people the same report in PDF
> format. Most are our own employees (using Microsoft Exchange/Outlook) and
> the report is fine. We are, however, having problems sending the report
> to Yahoo, AOL and Hotmail users. Here are some tests we've done...
> Test #1: I have run the report and exported it as a PDF, opening it
> directly into Adobe fine.
> Test #2: I then exported it, saved it to my drive, then emailed the
> report as a attachment using Outlook /Exchange to my Hotmail account and
> the report opens fine.
> Test #3: I set up a subscription to email it to simultaneously to both
> my Hotmail and Exchange accounts. The report attachment that went to my
> Exchange account opens fine in Adobe. The one that arrived attached to
> the email to my Hotmail account arrived in a format that Adobe does not
> recognize. ("... either not a supported file type or because the file has
> been corrupted. For example, it was sent as an email attachment and
> wasn't corrected decoded.")
> The problem isn't my computer nor a problem with my Adobe Reader. It's
> not my Exchange server that is delivering it to my Exchange account (it's
> the same server). It's not my Outlook email with attachment sent by
> Exchange to Hotmail.
> Considering the common path that each of these tests followed and
> determining which one didn't work, it appears to me that most likely the
> Report Server is not submitting the report to Exchange as an attachment in
> a way that services such as Hotmail, AOL, Yahoo, etc can work with or it's
> interaction with my mail server when preparing it to send outside my mail
> server.
> Any help on this? Is this acknowledged by Microsoft?
> Jon
>|||Thanks, Daniel.
I've downloaded, installed, and tested the package. I works great now!
I wish the package ended with a message that it was successful, though. It
just closes and doesn't leave me feeling that it even completed, much less
successfully.
The DLLs in the .NET Framework area (temporary ASP.NET Files) were updated
but it worries me that the copies in the Reporting Serices folders
(..\ReportManager & ..\ReportServer) are still showing the old SP1 versions.
When will these get updated to versions 8.0.892?
Jon|||The QFE only updates the files necessary for the fix. You should notice
that the ReportingServicesEmailDeliveryProvider.dll assembly was updated.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jon Limmer" <jlimmer@.gmbeverage.com> wrote in message
news:%23n3xu6H5EHA.2608@.TK2MSFTNGP10.phx.gbl...
> Thanks, Daniel.
> I've downloaded, installed, and tested the package. I works great now!
> I wish the package ended with a message that it was successful, though.
> It just closes and doesn't leave me feeling that it even completed, much
> less successfully.
> The DLLs in the .NET Framework area (temporary ASP.NET Files) were updated
> but it worries me that the copies in the Reporting Serices folders
> (..\ReportManager & ..\ReportServer) are still showing the old SP1
> versions. When will these get updated to versions 8.0.892?
> Jon
>|||Shouldn't I expect all instances of this dll to be updated?
I found that this .dll was updated in two places under the
C:\Windows\Microsoft.NET\Framework directory but not in the two places under
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\... The .dll
in the two \bin folders of both \ReportManager and \ReportServer still
reflected the older version, even after a reboot of the server.
Jon
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:eQvUOJI5EHA.4092@.TK2MSFTNGP14.phx.gbl...
> The QFE only updates the files necessary for the fix. You should notice
> that the ReportingServicesEmailDeliveryProvider.dll assembly was updated.
> --
> -Daniel|||I'm a little confused. Where exactly do you see the .dlls? There should
not be any at C:\Windows\Microsoft.NET\Framework (buried a little deeper are
some copies of the .dlls that live in the bin folders)
After the reboot, is the problem still fixed? If it is then that means the
correct .dlls should be installed.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jon Limmer" <jlimmer@.gmbeverage.com> wrote in message
news:uQiGC5p5EHA.4040@.TK2MSFTNGP14.phx.gbl...
> Shouldn't I expect all instances of this dll to be updated?
> I found that this .dll was updated in two places under the
> C:\Windows\Microsoft.NET\Framework directory but not in the two places
> under C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\...
> The .dll in the two \bin folders of both \ReportManager and \ReportServer
> still reflected the older version, even after a reboot of the server.
> Jon
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
> news:eQvUOJI5EHA.4092@.TK2MSFTNGP14.phx.gbl...
>> The QFE only updates the files necessary for the fix. You should notice
>> that the ReportingServicesEmailDeliveryProvider.dll assembly was updated.
>> --
>> -Daniel
>|||I just took a closer look and don't think I still have a problem. Still,
there are a couple of oddities.
First, there really are four copies of these files on my system:
> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportManager\Bin
> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\Bin
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
> Files\reports\5fc3e315\219a7509\assembly\dl2\1463834f\0052e96b_be6ac401
> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
> Files\reportserver\94eb9a55\49df36c9\assembly\dl2\3547c5bb\0052e96b_be6ac401
Second, the first two have a "date modified" of 07/15/04 and the last two
have dates of 12/17/04, the day I applied the patch. That was the confusing
part.
When I had initially looked at the file versions, the first two had older
file versions (ie, not the 8.0.892.0 that the new patch was to apply). When
I looked just now, however, (which is after a reboot), all the file versions
are 8.0.892.0, which is great.
Sorry to get us chasing what is apparently not an issue. I really
appreciate the quickness and accuracy of your replies.
Jon|||The last two files are the shadow copied files used by ASP.Net. By shadow
copying the files and using these files, this allows the original files to
be modified while the application is running. The modified dates are a
reflection of this copying.
I am not sure why you didn't see the new version info immediately after the
install. They should have been updated then.
Anyway, glad to hear that everything is up and running.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jon Limmer" <jlimmer@.gmbeverage.com> wrote in message
news:%23leMrLs5EHA.3120@.TK2MSFTNGP12.phx.gbl...
>I just took a closer look and don't think I still have a problem. Still,
>there are a couple of oddities.
> First, there really are four copies of these files on my system:
>> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
>> Services\ReportManager\Bin
>> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
>> Services\ReportServer\Bin
>> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
>> Files\reports\5fc3e315\219a7509\assembly\dl2\1463834f\0052e96b_be6ac401
>> C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
>> Files\reportserver\94eb9a55\49df36c9\assembly\dl2\3547c5bb\0052e96b_be6ac401
> Second, the first two have a "date modified" of 07/15/04 and the last two
> have dates of 12/17/04, the day I applied the patch. That was the
> confusing part.
> When I had initially looked at the file versions, the first two had older
> file versions (ie, not the 8.0.892.0 that the new patch was to apply).
> When I looked just now, however, (which is after a reboot), all the file
> versions are 8.0.892.0, which is great.
> Sorry to get us chasing what is apparently not an issue. I really
> appreciate the quickness and accuracy of your replies.
> Jon
>