Showing posts with label building. Show all posts
Showing posts with label building. Show all posts

Monday, March 26, 2012

Ragged Hierarchies in RS2005

Hi...

I am connecting to Analysis Sercices 2000 from Reporting Services 2005.

When building a dataset, just in the data pane graphical designer, I have dragged 5 levels of the dimension 'Organisation' into the data pane.

The dimension has members at level 4 that have no children. But the dimenension also has members at level 5 WITH children, meaning that the dimension is ragged. If I only select levels 1-4 on the data pane, I see all level 4 children. However, if I also drag level 5 to the data pane, I loose any level 4 members that do not have children.

This means I loose vallid members that have data. Does anyone know of any way around this?

Thanks

Jeremy

Does anyone have any experience on getting this to work?

I have managed to display a ragged hierarchy by hacking the MDX, with the use of the DrillDownMember function.

Unfortunatlely, altough the ragged hierarchy does now display correctly in the data pane, it does not display in a table or matrix. So I have the situation where by my result set in the data pane does not match my result set in the actual report.

If anyone can offer any assistance it would be appreciated,

Thank you

Jeremy

|||

I have now managed to get this to work.

As I was using an AS2000 cube with the Adomd client, which according to Microsoft is not supported. If you want to use an AS2000 cube, then you have to use the OLE DB data provider.

Unfortunately I still had to use the DillDownMember function, this seems to be the only way I can get ragged hierachies to work correctly.

|||

Sorry I had not seen your post before.

Considering that the returned cellset gets flattened into a result set, if you put your set of members on the ROWS axis of the MDX query, you will actually end up with a separate column per level in you result set.

So if you structure your query like this

SELECT
{[Measures.[x]]} ON COLUMNS,
{Descendants([YourDimension].[All], [YourDimension].[Level 5], SELF_BEFORE_AFTER)} ON ROWS
FROM [YourCube]

The returned dataset should have these columns

Level_1, Level_2, Level_3, Level_4, Level_5, x

This should cater for your ragged hierarchies requirement.

sql

Friday, March 9, 2012

Quick question on 2005 relationship diagrams

sql 2005 management studio 2005
When building and setting up a table diagram with the sql 2005 tools, is
there a way to Distinguish between a left join, and inner join?
For the most part from a technical point of view, the two enforced
relationships are NOT different, but from a *developers* point of view, I
can thus infer that the designer of the database application will assume
that a child record needs to be created when you setup the relationship as
a (inner join).
And, of course a child record does NOT need to be created by the application
when the relationship is setup as a left join. For the most part here the
distinction between the two different joins is really ONLY for documentation
purposes to the developer(s), and does not change the actual referential
integrity enforced by the data engine.
Is there any means in the database diagramming tools to distinguish between
the above two types of joins?
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com
The diagramming tool doesn't document joins; it documents constraints. You
would check the nullability of the referencing column to determine if you
would use an inner or outer join when retrieving data.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Albert D. Kallal" <PleaseNOOOsPAMmkallal@.msn.com> wrote in message
news:OUPaEk8cIHA.4172@.TK2MSFTNGP02.phx.gbl...
sql 2005 management studio 2005
When building and setting up a table diagram with the sql 2005 tools, is
there a way to Distinguish between a left join, and inner join?
For the most part from a technical point of view, the two enforced
relationships are NOT different, but from a *developers* point of view, I
can thus infer that the designer of the database application will assume
that a child record needs to be created when you setup the relationship as
a (inner join).
And, of course a child record does NOT need to be created by the application
when the relationship is setup as a left join. For the most part here the
distinction between the two different joins is really ONLY for documentation
purposes to the developer(s), and does not change the actual referential
integrity enforced by the data engine.
Is there any means in the database diagramming tools to distinguish between
the above two types of joins?
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com
|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message

> One thing you can do is to add comments to the diagram. That would not
> cause the joins to be "automagically created" in any particular way, but
> it might assist the programmer.
>
Yes, the assisting of the developers at design time is the goal here. You
well grasp my reasons for wanting to note the type of join. And, by the way,
I am likely going to adopt your suggestion of placing comments in the
diagram.
Coming from a ms-access background, the Relationship designer *did*
distinguish between the two type of joins. (left join, and inner join). As I
said, this does nothing to the actual behavior of the data engine, but you
get 2 nice benefits.
1) when you do build joins, the query builder can create the join based on
your original design assumptions. (left, or inner)
2) Any other developer can *note* the design assumptions I made by simply
looking at the ER diagram. The big question this answers is does the
code/application assume that I have to create a child record or not when a
parent record is created?
Note that in a typical application, only about 10%, or even less of the
relationships assume that a child record must be created when a parent
record is made.
So, I just wanted a way to document and covey this issue to developers, and
comments in the diagram will have to do.
Thanks a bunch for the input...
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com

Quick question on 2005 relationship diagrams

sql 2005 management studio 2005
When building and setting up a table diagram with the sql 2005 tools, is
there a way to Distinguish between a left join, and inner join?
For the most part from a technical point of view, the two enforced
relationships are NOT different, but from a *developers* point of view, I
can thus infer that the designer of the database application will assume
that a child record needs to be created when you setup the relationship as
a (inner join).
And, of course a child record does NOT need to be created by the application
when the relationship is setup as a left join. For the most part here the
distinction between the two different joins is really ONLY for documentation
purposes to the developer(s), and does not change the actual referential
integrity enforced by the data engine.
Is there any means in the database diagramming tools to distinguish between
the above two types of joins?
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.comShort answer: No.
Long answer:
The diagram is a representation of your tables and constraint. A foreign key (FK) constraint say
that a row in the referencing table cannot exist unless there's a value in the referenced table for
the FK column. A FK constraint do not say that you need a row in the referencing table in order for
a row in the referenced table to exist. That would be difficult, one row has to come before the
other!
One thing you can do is to add comments to the diagram. That would not cause the joins to be
"automagically created" in any particular way, but it might assist the programmer.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Albert D. Kallal" <PleaseNOOOsPAMmkallal@.msn.com> wrote in message
news:OUPaEk8cIHA.4172@.TK2MSFTNGP02.phx.gbl...
> sql 2005 management studio 2005
> When building and setting up a table diagram with the sql 2005 tools, is there a way to
> Distinguish between a left join, and inner join?
> For the most part from a technical point of view, the two enforced relationships are NOT
> different, but from a *developers* point of view, I can thus infer that the designer of the
> database application will assume that a child record needs to be created when you setup the
> relationship as a (inner join).
> And, of course a child record does NOT need to be created by the application when the relationship
> is setup as a left join. For the most part here the distinction between the two different joins is
> really ONLY for documentation purposes to the developer(s), and does not change the actual
> referential integrity enforced by the data engine.
> Is there any means in the database diagramming tools to distinguish between the above two types of
> joins?
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal@.msn.com
>|||The diagramming tool doesn't document joins; it documents constraints. You
would check the nullability of the referencing column to determine if you
would use an inner or outer join when retrieving data.
--
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"Albert D. Kallal" <PleaseNOOOsPAMmkallal@.msn.com> wrote in message
news:OUPaEk8cIHA.4172@.TK2MSFTNGP02.phx.gbl...
sql 2005 management studio 2005
When building and setting up a table diagram with the sql 2005 tools, is
there a way to Distinguish between a left join, and inner join?
For the most part from a technical point of view, the two enforced
relationships are NOT different, but from a *developers* point of view, I
can thus infer that the designer of the database application will assume
that a child record needs to be created when you setup the relationship as
a (inner join).
And, of course a child record does NOT need to be created by the application
when the relationship is setup as a left join. For the most part here the
distinction between the two different joins is really ONLY for documentation
purposes to the developer(s), and does not change the actual referential
integrity enforced by the data engine.
Is there any means in the database diagramming tools to distinguish between
the above two types of joins?
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com|||"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message
> One thing you can do is to add comments to the diagram. That would not
> cause the joins to be "automagically created" in any particular way, but
> it might assist the programmer.
>
Yes, the assisting of the developers at design time is the goal here. You
well grasp my reasons for wanting to note the type of join. And, by the way,
I am likely going to adopt your suggestion of placing comments in the
diagram.
Coming from a ms-access background, the Relationship designer *did*
distinguish between the two type of joins. (left join, and inner join). As I
said, this does nothing to the actual behavior of the data engine, but you
get 2 nice benefits.
1) when you do build joins, the query builder can create the join based on
your original design assumptions. (left, or inner)
2) Any other developer can *note* the design assumptions I made by simply
looking at the ER diagram. The big question this answers is does the
code/application assume that I have to create a child record or not when a
parent record is created?
Note that in a typical application, only about 10%, or even less of the
relationships assume that a child record must be created when a parent
record is made.
So, I just wanted a way to document and covey this issue to developers, and
comments in the diagram will have to do.
Thanks a bunch for the input...
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@.msn.com|||> Coming from a ms-access background, the Relationship designer *did*
> distinguish between the two type of joins. (left join, and inner join). As I
> said, this does nothing to the actual behavior of the data engine
It is an interesting concept to add meta-data for this type of information so that tools like
query-builder can be smarter (guess what type of join to perform). The place for this would be the
system tables, exposed through catalog views. Possibly as extended properties, assuming that tool
vendors could agree on the structure...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Albert D. Kallal" <PleaseNOOOsPAMmkallal@.msn.com> wrote in message
news:%23taEL4%23cIHA.3736@.TK2MSFTNGP04.phx.gbl...
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message
>
>> One thing you can do is to add comments to the diagram. That would not
>> cause the joins to be "automagically created" in any particular way, but
>> it might assist the programmer.
> Yes, the assisting of the developers at design time is the goal here. You
> well grasp my reasons for wanting to note the type of join. And, by the way,
> I am likely going to adopt your suggestion of placing comments in the
> diagram.
> Coming from a ms-access background, the Relationship designer *did*
> distinguish between the two type of joins. (left join, and inner join). As I
> said, this does nothing to the actual behavior of the data engine, but you
> get 2 nice benefits.
> 1) when you do build joins, the query builder can create the join based on
> your original design assumptions. (left, or inner)
> 2) Any other developer can *note* the design assumptions I made by simply
> looking at the ER diagram. The big question this answers is does the
> code/application assume that I have to create a child record or not when a
> parent record is created?
> Note that in a typical application, only about 10%, or even less of the
> relationships assume that a child record must be created when a parent
> record is made.
> So, I just wanted a way to document and covey this issue to developers, and
> comments in the diagram will have to do.
> Thanks a bunch for the input...
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal@.msn.com
>
>