May 19, 2012  
   Login  
Forum  
 
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Filter: Today, Yesterday and Last WeekFilter: Today, Yesterday and Last Week
Previous Previous
 
Next Next
New Post
 6/7/2010 3:22 PM
 
 Modified By reflex  on 6/7/2010 4:36:55 PM

Hello

I try to provide already for a long time with Visual Studio 2008 a report.
Test for list contents functioned without problems however I has the following two filters problems...

  • I need a SQL statement where me the provided Incidents from the previous day indicate.

This is my Version


inc.ACTUALSTART >=(CAST( FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME ) -1)
AND inc.ACTUALSTART =(CAST( FLOOR( CAST( GETDATE() AS FLOAT ) ) AS DATETIME ))

Whit this i receve the messages:

Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 5, position 10.

This is my Version

  • need a SQL statement where me the provided Incidents from the previous day indicate. DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)-7 to retrieve the previous weeks monday and DATEADD(wk, DATEDIFF(wk,0,getdate()), 0)-1 to retrieve the sunday.

Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 5, position 10.

Can you help me for my Filter settings

Regards Andreas Gilgen

New Post
 6/7/2010 5:27 PM
 

Hi,

You can't use SQL Select statement in version 1.4.

Not sure what you are trying to do but you should try to use a reporting services expression to filter directly at the report level (either dataset or at the table/matrix level).

Regards,


Frederic LATOUR
ENESYS
New Post
 6/7/2010 5:43 PM
 
Hi,

I have one would list with problem incidents where I gladly to now filter would like after day or week.

  1. I need a filter where show me the provided elements from the previous day (filter field:actual_start)
  2. I need a filter with the provided elements, from the past week (Monday until Sunday) (filter field: actual_start).

I have this already times had and used for an Oracle query

/***************************
Incidents Yesterday
***************************/
selectto_char(inc.ACTUALSTART,'dd.mm.yy')as"Day", inc.SERVICE_NAME, inc.INCIDENTCODE1, inc.ACTUALSTART, inc.ACTUALFINISH
, inc.DESCRIPTION, inc.SOLUTION, inc.CATEGORY, inc.ID
from ao_ovsd.v_incident inc
where inc.INCIDENTWORKGROUP1_NAME like'Service Control Center'
andtrunc(inc.ACTUALSTART)=trunc(sysdate-1)
and inc.INCIDENTCODE1 notlike'Service Available'
OrderBy ACTUALSTART asc
/***************************
Incidents Last Week
***************************/
SELECT inc.SERVICE_NAME, inc.INCIDENTCODE1, inc.ACTUALSTART, inc.ACTUALFINISH
, inc.DESCRIPTION, inc.SOLUTION, inc.CATEGORY, inc.ID
FROM ao_ovsd.v_incident inc
WHERE(inc.INCIDENTWORKGROUP1_NAME Like'Service Control Center')
AND(to_char(inc.ACTUALSTART,'YYYY')=to_char(sysdate,'YYYY'))
AND(to_number(to_char(inc.ACTUALSTART,'IW'))=to_number(to_char(sysdate,'IW'))-1)
AND(inc.INCIDENTCODE1 NotLike'Service Available')
OrderBy ACTUALSTART asc

I need now exactly the same however for ms sql

regards

Previous Previous
 
Next Next
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da...Filter: Today, Yesterday and Last WeekFilter: Today, Yesterday and Last Week

 
You need to login for posting to the forums.
If you don't have a login, click here to register.
 
Copyright 2010 Enesys - All rights reserved Terms Of UsePrivacy Statement