Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Friday, March 30, 2012

Is this valid query? Query builder hangs


Hi,

I'm trying to display previous year's last month inventory beside current month inventory
by

with MEMBER [Measures].[CF Inventory] as
([DM TIME].CurrentMember.Parent.PrevMember.LastChild,[Measures].[Inventory])

SELECT

{ [Measures].[CF Inventory], [Measures].[Inventory] } ON COLUMNS,

NON EMPTY { ([DM City].[City].[CityA], [DM TIME].[YEAR].[YEARA], [DM TIME].[MONTH].[MONTHA], [DM WH].[DM WH].[WHA]) } ON ROWS

FROM [Cube]

When I try to parse this query the tool hangs.

Should I change [Measures].[CF Inventory] definition as

(ParallelPeriod([DM Time].[Year]).LastChild, [Measures].[Inventory])

Thanks
Rasyq

I do not think this is a valid query.

In your calculated measure you have a reference to [DM TIME].CurrentMember, but if you are using SSAS 2005, then you cannot do <dimension>.CurrentMember, you have to use <dimension>.<hierarchy>.CurrentMember. So I assume that you meant something like [DM TIME].[MONTHA].CurrentMember.

To answer your second question, yes, personally I would think that the parallel period approach is better as I think it more clearly expresses your intent (although I think both options should return the same result).

Monday, March 26, 2012

is this possible?

hi

I would like to display agregated data, as well as my image, but it seems that this requires me to put my image file field in my group by statement too, but sql does not seem to allow sorting of images. Is what I am trying to possible? Or do I have to do both things separate?

here is the code:

select tbltimesheets.weekno, sum(tblentries.hrsnorm) as hrsnorm, sum(tblentries.hrspot) as hrspot, sum(tblentries.hrsnpot) as hrsnpot, tblusers.username, images.imagefile from
tbltimesheets
inner join tblentries on tbltimesheets.tskey = tblEntries.TSKey
inner join tblusers on tbltimesheets.userkey = tblusers.userkey
inner join images on images.userkey = tblusers.userkey
group by tbltimesheets.weekno, tblusers.username, images.imagefileYou have to ddo the thing separate. YOu can use some smart SQL for this, though, working, and still do it in one query.

Or, instead summing, you could use another method (like one returning the first image in the group).

Is this possible?

hey guys,

I have a column called Error Count, which display the the error count values (Fields!error_count.value) from the dataset. And assume the report has some parameters.I want to change the values of this column by comparing the parameters value that the user specified with the values in the database. For instance, If sessions.timestamp == parameters!date.value then do something, where timestamp is a field in the sessions table and parameters!date.value is the the parameter value.

Please let me know if anybody came across this kind of situation and how you solve it.

Any idea is appreciated

Sincerely

Amde

Two approaches come to mind for accomplishing this.

The first way is to use a stored procedure, where you pass the report parameters to the stored procedure. In the stored procedure you have complete control over what values get put in the dataset.

The second approach would be to use a custom data processing extension. You could change the contents of the .Net data set returned by your sql query before returning it to reporting services. Or, another way would be to change the values on the fly when reporting services asks for a particular field from the data set.

I suggest using the first way, as it will require less code and infrastructure complexity.

Wednesday, March 7, 2012

Is there ANY way to display "recurrent" data in Crystal?

I wonder if it is possible to somehow display self-recurrent data in Crystal reports.

Say, I have a "Department" table that contains link to itself. Since the department structure of a company can be complicated, I don't know how many levels of department will be in any "root" department. I want user to "drill in" via some kind of a tree until the final department level is reached. Ideally, it should be possible to display other data (such as names of employees) for each department.

I realize that each step down in department tree will require a separate SQL query to be sent to the server. And I also want the data to appear in the same window, just like an ordinary drill-down feature of Crystal. Is there any way to something like this via RDC and VB?

Thanks in advanceGroup it by DepartId and goto Report-->Hierarchical Grouping Options and set the child

Friday, February 24, 2012

Is there any Property Like Rownum in oracle

Hi All...

I have to write one query where i have to display the ID as 1,2 3, 4 in oracle we used to ROWNUM to display ...in MS SQL server is there any property to show?

i have to display like

ID ProgramCount
1 4
2 6
3 5
4 1
5 2

AshutoshHave look here:
http://www.microsoft.com/resources/documentation/sql/2000/all/reskit/en-us/part2/c0761.mspx