Showing posts with label record. Show all posts
Showing posts with label record. Show all posts

Thursday, March 29, 2012

Filter does not work on a group?

I must be missing something. I have a table with two groups. One groups on
the user who created the record the other on the date the record was created.
I sort on the username group by name and the createdate group with a
category type.
My dataset pulls information for the current year however in this table I
want to only display data for the last week. If I apply the filter to the
table I receive expected results however if I apply the filter to the group
nothing comes back.
For either group if I put "= #2/22/2005#" for the expression "<=" as the
operator and "= Fields!CreateDate" as the Value I return 0 records despite
having some. I know my syntax is correct becaus this works at the table
level.
Can anyone tell me what I am missing?And you have date values in there more recent than 2/22/2005?
2/22/2005 <= Fields!CreateDate
I would try "= Fields!CreateDate" in the expression and "= #2/22/2005#" in
the value.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Ben Holcombe" <BenHolcombe@.discussions.microsoft.com> wrote in message
news:41E911DB-58AE-4F74-9A6B-B6144C454DCA@.microsoft.com...
>I must be missing something. I have a table with two groups. One groups
>on
> the user who created the record the other on the date the record was
> created.
> I sort on the username group by name and the createdate group with a
> category type.
> My dataset pulls information for the current year however in this table I
> want to only display data for the last week. If I apply the filter to the
> table I receive expected results however if I apply the filter to the
> group
> nothing comes back.
> For either group if I put "= #2/22/2005#" for the expression "<=" as the
> operator and "= Fields!CreateDate" as the Value I return 0 records despite
> having some. I know my syntax is correct becaus this works at the table
> level.
> Can anyone tell me what I am missing?|||Same result. I know there are values past 2/22/2005 because I see them
without the filter applied. The filter works at the table level just not the
group level. This is strange.
"Jeff A. Stucker" wrote:
> And you have date values in there more recent than 2/22/2005?
> 2/22/2005 <= Fields!CreateDate
> I would try "= Fields!CreateDate" in the expression and "= #2/22/2005#" in
> the value.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "Ben Holcombe" <BenHolcombe@.discussions.microsoft.com> wrote in message
> news:41E911DB-58AE-4F74-9A6B-B6144C454DCA@.microsoft.com...
> >I must be missing something. I have a table with two groups. One groups
> >on
> > the user who created the record the other on the date the record was
> > created.
> > I sort on the username group by name and the createdate group with a
> > category type.
> >
> > My dataset pulls information for the current year however in this table I
> > want to only display data for the last week. If I apply the filter to the
> > table I receive expected results however if I apply the filter to the
> > group
> > nothing comes back.
> >
> > For either group if I put "= #2/22/2005#" for the expression "<=" as the
> > operator and "= Fields!CreateDate" as the Value I return 0 records despite
> > having some. I know my syntax is correct becaus this works at the table
> > level.
> >
> > Can anyone tell me what I am missing?
>
>

Filter date for ToDay, some problem with time.

I all.

In a talbe I've a datatime field. for example it contain '16-4-2007 10:45'.

I like to write a SQL that return all record with the date field equals '16-4-2007' (it's not important the time). how to?

thank you.

Try this query to retrive data

select

*from clientswhere clientAddressbetween'2007-04-12 00:00:00.000'and'2007-04-12 23:59:59.999'

The alternative query is

select

*from clientswhere clientAddress>='2007-04-12'and clientAddress<'2007-04-13'

The time format is yyyy-MM-dd and time. Since you are saving time in DB the query should be framed as above

Hope this will help you

|||

try this syntax

print

convert(varchar(20),convert(datetime,'16-04-2006 16:45',105),105)

how it works: convert string to date time with correct format for date string and next convert date time back to string with format you need.

See help for CONVERT in T-SQL help for more format info.

Tuesday, March 27, 2012

Filter

I need a query that returns every n record from the database and the last record.

For every n-th is easy, but I need a

WHERE Index % n = 0

but I need a last one too.

Any Help.

How about a UNION statement? The new code you want is in green.

SELECT Col1, idx

FROM MyTable

WHERE idx % 12 = 0

UNION

SELECT Col1, idx

FROM MyTable

WHERE idx = (SELECT MAX(idx) FROM MyTable)

|||

In 2005, you can do something like:

select *
from (

select row_number() over (order by object_id) as rowNum,
object_id
from sys.objects

) as objects
where rowNum % 5 = 0
or rowNum = (select count(*) from sys.objects)

There is a (more messy) way to do it in 2000 also. The key is that tables don't have order, so you will need to define an order in order to calculate N.

Wednesday, March 7, 2012

File System Error: The record ID is incorrect

Hi,

We have deployed SQL Server 2005 with Analysis Services and Reporting Services.

When running a report, we get the following error:

An error has occurred during report processing.

Cannot read the next data row for the data set DM_GASTOS.

File system error:

The record ID is incorrect. Physical file: . Logical file: .

The error occurs both with a local user account and domain user account. The user account is member of a role which has Cell Data Security restriction in Analysis Services. When other member run the report, the error goes away.

Anybody has seen this before? Any solutions?

Cheers

This looks like a data corruption issue. Try fully re-processing your entire database.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi. I'm encountering the same problem. I have re-processed my database but I still get the error message when I generate my report. Any other suggestions?

Thanks

|||

I'm having the same problem.

I have the same OLAP data base in 3 servers, and the error is the same.

Any other suggestions?

File System Error: The record ID is incorrect

Hi,

We have deployed SQL Server 2005 with Analysis Services and Reporting Services.

When running a report, we get the following error:

An error has occurred during report processing.

Cannot read the next data row for the data set DM_GASTOS.

File system error:

The record ID is incorrect. Physical file: . Logical file: .

The error occurs both with a local user account and domain user account. The user account is member of a role which has Cell Data Security restriction in Analysis Services. When other member run the report, the error goes away.

Anybody has seen this before? Any solutions?

Cheers

This looks like a data corruption issue. Try fully re-processing your entire database.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi. I'm encountering the same problem. I have re-processed my database but I still get the error message when I generate my report. Any other suggestions?

Thanks

|||

I'm having the same problem.

I have the same OLAP data base in 3 servers, and the error is the same.

Any other suggestions?

File System Error: The record ID is incorrect

Hi,

We have deployed SQL Server 2005 with Analysis Services and Reporting Services.

When running a report, we get the following error:

An error has occurred during report processing.

Cannot read the next data row for the data set DM_GASTOS.

File system error:

The record ID is incorrect. Physical file: . Logical file: .

The error occurs both with a local user account and domain user account. The user account is member of a role which has Cell Data Security restriction in Analysis Services. When other member run the report, the error goes away.

Anybody has seen this before? Any solutions?

Cheers

This looks like a data corruption issue. Try fully re-processing your entire database.

Edward Melomed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

Hi. I'm encountering the same problem. I have re-processed my database but I still get the error message when I generate my report. Any other suggestions?

Thanks

|||

I'm having the same problem.

I have the same OLAP data base in 3 servers, and the error is the same.

Any other suggestions?

File System Access With Custom Assembly Method

Hello All,
I am building a dashboard report that will read through the file system
for a record's document folder on our server and report to the user if
there are any files missing in the directory. I am using a custom
assembly to house the method. When using the assembly in the dev
environment, everything works just fine. When the report is deployed
to the server, the assembly seems to work fine, but on closer
inspection, it looks like I cannot read the file system. Can someone
point me to a link that can bypass this (safely)? Do I need to suck it
up and create an ASP.NET app that does the same thing?
Thanks
JeffHi Jeff.
You need to change the "rssrvpolicy.config" to permit file access to your
assembly. In Visual Studio you have all permissions, but running on the
report server permission checks is performed.
In "rssrvpolicy.config" you can see several codegroups giving other
assemblies certain permissions. The file is found in "%SQL
SERVER%\MSSQL\Reporting Services\ReportServer"
You can put you CodeGroup below the one ending with Url="$CodeGen$/*". Se
sample:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCodeGroup"
Description="Code group for my assembly">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MyAssembly.MyNamespace.MyClass.dll"
/>
</CodeGroup>
This way you give you assemmbly Full thrust. To limit persmission to file
access you can change PermissionSet to "FileIOPermission".
Kind regards
Martin Bring (Sogeti AB)
*****************
"jeffjones176@.gmail.com" wrote:
> Hello All,
> I am building a dashboard report that will read through the file system
> for a record's document folder on our server and report to the user if
> there are any files missing in the directory. I am using a custom
> assembly to house the method. When using the assembly in the dev
> environment, everything works just fine. When the report is deployed
> to the server, the assembly seems to work fine, but on closer
> inspection, it looks like I cannot read the file system. Can someone
> point me to a link that can bypass this (safely)? Do I need to suck it
> up and create an ASP.NET app that does the same thing?
> Thanks
> Jeff
>