Wednesday, March 21, 2012
Excluding weekend dates from calculated data pull
of users 3 bussiness days before everyone else is allowed to see it.
THere are many fields I will be displaying across many tables. The date I am
using is ONLY in the primary table (meaning I don't have to include or
exclude data based on a date match from the other tables).
What I need to know is if there is a way in the SQL Query to not count the
weekend days as part of the 3 bussiness days. My query right now uses "WHERE
datafield < (GetDate + 5)". But this lets the users see data for the week's
Friday on the week's Monday. Not acceptable. If I only use "WHERE datafield <
(GetDate + 3) Then data to been displayed on This week's Tuesday can not be
seen on the previous Friday. Also Not Acceptable.
Any ideas?
Thanks.
Carrie E. Wells
Web Architect/Developer
Oh, and if Ihave this posted int eh wrong place tell me where to put it an I
move it.
On Wed, 25 May 2005 08:43:25 -0700, Wells wrote:
(snip)
>What I need to know is if there is a way in the SQL Query to not count the
>weekend days as part of the 3 bussiness days. My query right now uses "WHERE
>datafield < (GetDate + 5)". But this lets the users see data for the week's
>Friday on the week's Monday. Not acceptable. If I only use "WHERE datafield <
>(GetDate + 3) Then data to been displayed on This week's Tuesday can not be
>seen on the previous Friday. Also Not Acceptable.
Hi Carrie,
The simple, quick and dirty solution would be to use a CASE expression
to add either 3 or 5 to the current date, depending on the result of
DATEPART(day, GetDate()). But that would not take public holidays and
company holidays into account.
The best solution is to use a calendar table. You'll have to create it
once; after that, you can use it in this and many other situations. How
to make a calendar table, and many possible usees, is described at this
site: http://www.aspfaq.com/show.asp?id=2519
>Oh, and if Ihave this posted int eh wrong place tell me where to put it an I
>move it.
I don't think you can move posts on Usenet :-)
Anyway, this group is actually intended for MSEQ (Microsoft English
Query). In practice, nobody ever posts anything about MSEQ, but the
group does catch some stray questions about SQL Server queries.
A better place for this kind of questions is the programming group at
microsoft.public.sqlserver.programming. That group is frequented by many
more experts than this one.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Since the site is 24/7 then that should be ok. The whole reason for 3 days
was to work around the schedules of our foriegn customers, who of course
don't have the same holidays. This issue was about certian Key Customers
getting the data first but not before the company rules said they could.
Thanks for the solution. I never even thought about using a Case statement
and this has been driving me crazy for two weeks. :-)
Thanks Again,
Carrie Wells
Carrie E. Wells
Web Architect/Developer
"Hugo Kornelis" wrote:
> On Wed, 25 May 2005 08:43:25 -0700, Wells wrote:
> (snip)
> Hi Carrie,
> The simple, quick and dirty solution would be to use a CASE expression
> to add either 3 or 5 to the current date, depending on the result of
> DATEPART(day, GetDate()). But that would not take public holidays and
> company holidays into account.
> The best solution is to use a calendar table. You'll have to create it
> once; after that, you can use it in this and many other situations. How
> to make a calendar table, and many possible usees, is described at this
> site: http://www.aspfaq.com/show.asp?id=2519
>
> I don't think you can move posts on Usenet :-)
> Anyway, this group is actually intended for MSEQ (Microsoft English
> Query). In practice, nobody ever posts anything about MSEQ, but the
> group does catch some stray questions about SQL Server queries.
> A better place for this kind of questions is the programming group at
> microsoft.public.sqlserver.programming. That group is frequented by many
> more experts than this one.
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
Friday, March 9, 2012
exception_int_divied_by_zero..
message "Exception_Int_Divided_By_Zero" display, what does this mean? And
alos, when I try to generate SQL script, drop a view, use DTS to export
data, I also receive this error message, any idea how to solve it?
begin 666 Au Yeung.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D%U(%EE=6YG#0I&3CI!=2!9
M975N9PT*14U!24P[4%)%1CM)3E1%4DY%5#IA<G1H=7)A>4!H; W1M86EL+F-O
D;0T*4D56.C(P,#4P-C$S5# W-#@.R-EH-"D5.1#I60T%21 T*
`
end
You mean, you are getting this error from Enterprise Manager? If so, could
you try the same from Enterprise Manager on another machine?
What exactly are you trying to do? You can probably do the same using
scripts from Query Analyzer.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Chung" <chung@.utaxhk.com.hk> wrote in message
news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
Hi all, once I try to change to the design mode of any table, an error
message "Exception_Int_Divided_By_Zero" display, what does this mean? And
alos, when I try to generate SQL script, drop a view, use DTS to export
data, I also receive this error message, any idea how to solve it?
|||I found that this error is associates with the database, not with the
Enterprise Management. Because not all of database has these error, only one
database. And even I backup, and restore it, the error still there. Without
EM, how can I generate the SQL script of the database? and copy data from
the database?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> glsD:%23HfYeNAcFHA.3184@.TK2MSFTNGP15.phx .gbl...
> You mean, you are getting this error from Enterprise Manager? If so, could
> you try the same from Enterprise Manager on another machine?
> What exactly are you trying to do? You can probably do the same using
> scripts from Query Analyzer.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Chung" <chung@.utaxhk.com.hk> wrote in message
> news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi all, once I try to change to the design mode of any table, an error
> message "Exception_Int_Divided_By_Zero" display, what does this mean? And
> alos, when I try to generate SQL script, drop a view, use DTS to export
> data, I also receive this error message, any idea how to solve it?
>
>
>
|||Sounds more like either your connection, API, or database environment
settings...like SET NUMERIC_ROUNDABORT or SET ARITHABORT. Check your
database properties.
Another possibility would be that your client tools have been corrupted.
Did you install the Beta 1 for SQL Server 2005? There was an MDAC 9 Beta 1
that was included that caused all sorts of issues with SQL Server 2000
tools. You basically have to do a file replace and registry clean to clear
everything off. A new download of an older MDAC won't fix anything becuase
version 9 is newer, the MDAC will not deploy.
Sincerely,
Anthony Thomas
"Chung" <chung@.utaxhk.com.hk> wrote in message
news:u$cDkLLcFHA.3120@.TK2MSFTNGP12.phx.gbl...
I found that this error is associates with the database, not with the
Enterprise Management. Because not all of database has these error, only one
database. And even I backup, and restore it, the error still there. Without
EM, how can I generate the SQL script of the database? and copy data from
the database?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com>
glsD:%23HfYeNAcFHA.3184@.TK2MSFTNGP15.phx .gbl...
> You mean, you are getting this error from Enterprise Manager? If so, could
> you try the same from Enterprise Manager on another machine?
> What exactly are you trying to do? You can probably do the same using
> scripts from Query Analyzer.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Chung" <chung@.utaxhk.com.hk> wrote in message
> news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi all, once I try to change to the design mode of any table, an error
> message "Exception_Int_Divided_By_Zero" display, what does this mean? And
> alos, when I try to generate SQL script, drop a view, use DTS to export
> data, I also receive this error message, any idea how to solve it?
>
>
>
exception_int_divied_by_zero..
message "Exception_Int_Divided_By_Zero" display, what does this mean? And
alos, when I try to generate SQL script, drop a view, use DTS to export
data, I also receive this error message, any idea how to solve it?
begin 666 Au Yeung.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..D%U(%EE=6YG#0I&3CI!=2!9
M975N9PT*14U!24P[4%)%1CM)3E1%4DY%5#IA<G1H=7)A>4!H;W1M86EL+F-O
D;0T*4D56.C(P,#4P-C$S5# W-#@.R-EH-"D5.1#I60T%21 T*
`
endYou mean, you are getting this error from Enterprise Manager? If so, could
you try the same from Enterprise Manager on another machine?
What exactly are you trying to do? You can probably do the same using
scripts from Query Analyzer.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Chung" <chung@.utaxhk.com.hk> wrote in message
news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
Hi all, once I try to change to the design mode of any table, an error
message "Exception_Int_Divided_By_Zero" display, what does this mean? And
alos, when I try to generate SQL script, drop a view, use DTS to export
data, I also receive this error message, any idea how to solve it?|||I found that this error is associates with the database, not with the
Enterprise Management. Because not all of database has these error, only one
database. And even I backup, and restore it, the error still there. Without
EM, how can I generate the SQL script of the database? and copy data from
the database?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:%23HfYeNAcFHA.3184@.TK2MSFTNGP15.phx.gbl...
> You mean, you are getting this error from Enterprise Manager? If so, could
> you try the same from Enterprise Manager on another machine?
> What exactly are you trying to do? You can probably do the same using
> scripts from Query Analyzer.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Chung" <chung@.utaxhk.com.hk> wrote in message
> news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi all, once I try to change to the design mode of any table, an error
> message "Exception_Int_Divided_By_Zero" display, what does this mean? And
> alos, when I try to generate SQL script, drop a view, use DTS to export
> data, I also receive this error message, any idea how to solve it?
>
>
>|||Sounds more like either your connection, API, or database environment
settings...like SET NUMERIC_ROUNDABORT or SET ARITHABORT. Check your
database properties.
Another possibility would be that your client tools have been corrupted.
Did you install the Beta 1 for SQL Server 2005? There was an MDAC 9 Beta 1
that was included that caused all sorts of issues with SQL Server 2000
tools. You basically have to do a file replace and registry clean to clear
everything off. A new download of an older MDAC won't fix anything becuase
version 9 is newer, the MDAC will not deploy.
Sincerely,
Anthony Thomas
"Chung" <chung@.utaxhk.com.hk> wrote in message
news:u$cDkLLcFHA.3120@.TK2MSFTNGP12.phx.gbl...
I found that this error is associates with the database, not with the
Enterprise Management. Because not all of database has these error, only one
database. And even I backup, and restore it, the error still there. Without
EM, how can I generate the SQL script of the database? and copy data from
the database?
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com>
¼¶¼g©ó¶l¥ó·s»D:%23HfYeNAcFHA.3184@.TK2MSFTNGP15.phx.gbl...
> You mean, you are getting this error from Enterprise Manager? If so, could
> you try the same from Enterprise Manager on another machine?
> What exactly are you trying to do? You can probably do the same using
> scripts from Query Analyzer.
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Chung" <chung@.utaxhk.com.hk> wrote in message
> news:%238S2Dw%23bFHA.584@.TK2MSFTNGP15.phx.gbl...
> Hi all, once I try to change to the design mode of any table, an error
> message "Exception_Int_Divided_By_Zero" display, what does this mean? And
> alos, when I try to generate SQL script, drop a view, use DTS to export
> data, I also receive this error message, any idea how to solve it?
>
>
>
Wednesday, March 7, 2012
Exception with ReportViewer in local mode
I use a ReportViewer to display a report in local mode (WinForm). As long as I use VS2005 in debug mode, the report is displayed correct without any problems. If I run the compiled application directly, I get a crash message :
"xxx has encountered a problem and needs to close. We are sorry for the inconvenience."....
None of the exception handlings are called (the one where the "Me.ReportViewer1.RefreshReport()" is located and the one from the application "MyApplication_UnhandledException")
Thanks for help
Peter
Hi Panpan,
I'm experiencing the exact same problem right now and I can't find out what's the cause. Did you ever figure it out? If you did I'd appreciate your answer!
Greetings,
Sjako
Exception with ReportViewer in local mode
I use a ReportViewer to display a report in local mode (WinForm). As long as I use VS2005 in debug mode, the report is displayed correct without any problems. If I run the compiled application directly, I get a crash message :
"xxx has encountered a problem and needs to close. We are sorry for the inconvenience."....
None of the exception handlings are called (the one where the "Me.ReportViewer1.RefreshReport()" is located and the one from the application "MyApplication_UnhandledException")
Thanks for help
Peter
Hi Panpan,
I'm experiencing the exact same problem right now and I can't find out what's the cause. Did you ever figure it out? If you did I'd appreciate your answer!
Greetings,
Sjako
Sunday, February 19, 2012
Excel report migration + html display
We have the following 2 problem areas in our application:
1) We have a excel report that calls a SQL SP which returns 13 resultsets.
These resultsets are then read by a excel macro and a report is printed in
the worksheet. We now want to move this to SSRS 2000. I was trying to find a
easy way out by embedding a excel object in the report and use the same
macro. Is this possible? If not then can anyone suggest any workaround? For
the SP's returning multiple resultsets, we are thinking of creating 13
datasets each of them will have their own SP.
In order to convert to SSRS 2000, do i need to recode the entire logic of
the macro in SSRS? or is there any better way.
2) As displaying of RTF is not supported in SSRS 2000, I was thinking of
writing some code which will parse the RTF and spit out a formatted HTML. Is
it possible to display HTML in the report? If not, then is there any
workaround?
3) I read in some of the posts that supporting HTML in SSRS will be a
security hole-what does that mean?
Thanks in advance
--
Afaq> <snip>
> We now want to move this to SSRS 2000. I was trying to
> find a
> easy way out by embedding a excel object in the report and use the
> same
> macro. Is this possible? If not then can anyone suggest any
> workaround? For
> the SP's returning multiple resultsets, we are thinking of creating 13
> datasets each of them will have their own SP.
> In order to convert to SSRS 2000, do i need to recode the entire logic
> of
> the macro in SSRS? or is there any better way.
> <snip>
> Thanks in advance
Hello Afaq,
SoftArtisans OfficeWriter is a report designer and custom rendering extension
for SSRS that lets you use real Excel and Word files as report templates,
and deliver those files intact. If you put VBA code in the template, it
will be preserved when it's delievered by Reporting Services:
http://officewriter.softartisans.com/officewriter-250.aspx
Best,
Chris
Friday, February 17, 2012
Excel rendering problem(s)
The matrix cells contain a textbox with the data to display.
I need that textbox to appear only some times, so i wrote a function that
returns true or false depending on some field value that i pass as
parametter.
The report renders fine as PDF, but when i try to render it as XLS i get a
null refference error.
Does anyone know what the problem is ?
Also in another report i have 3 images in a cell (of a table or a matrix..
behave the same) and i set only one of them visible at a time based on other
fields values
in PDF also works fine, but when i try to render it in excel. Only one of
the images appear, and where the conditions call for one of the other two
images should
appear no image is visible.
The two problems might be related....
Thank you.
RazvanI had the same problem, it is a bug that Microsoft won't fix it.
Here's another one even worse, try exporting a report containing subreports
in Excel. None of the subreports will be rendered.
Needles to say all my clients want all their reports in Excel because it
allows them to easily do adhoc massages to their data.
Microsoft do you hear me, this is pretty basic stuff ! Fix it please!
Tzepesh
"Razvan Popov" wrote:
> I have a report containing a matrix.
> The matrix cells contain a textbox with the data to display.
> I need that textbox to appear only some times, so i wrote a function that
> returns true or false depending on some field value that i pass as
> parametter.
> The report renders fine as PDF, but when i try to render it as XLS i get a
> null refference error.
> Does anyone know what the problem is ?
> Also in another report i have 3 images in a cell (of a table or a matrix..
> behave the same) and i set only one of them visible at a time based on other
> fields values
> in PDF also works fine, but when i try to render it in excel. Only one of
> the images appear, and where the conditions call for one of the other two
> images should
> appear no image is visible.
> The two problems might be related....
> Thank you.
> Razvan
>
>