Re: Attributes text in Pivotview
Data Dynamics Analysis Support
Attributes text in Pivotview
02-26-2010, 8:35 AM
Hi,
I am currently porting a program from using DynamiCube to DDA.
My problem now is setting different pivotview layout names to the Measures names or the attribute names, then from the column names from the SQL database.
The DynamiCube had an add method, which took one param as the db column field name and one other to display in the view.
Public Function Add( ByVal sourceName As String, ByVal Name As String, ByVal location As OrientationConstants
) As Field
The closes thing i found in the DDA is this method:
myLayoutActions.InsertField("[Attributes].["CustNr"]", DataDynamics.Analysis.Layout.ShelfKind.RowShelf, rwCol.Rank)
But then the name of the “attributBox” in the RowShelf will become “CustNr”, which is not as good as I want it to be. Is it a better method of doing this or do I have to make a custom schemebuilder to fixs it? (Iam now using a automatic generated scheme file)
Description
Adds a new field to the collection.
Syntax
Public Function Add( _
ByVal sourceName As String, _
ByVal Name As String, _
ByVal location As OrientationConstants _
) As Field
Parameters
sourceName
The name of the field as it appears in the data source recordset. This is used as a key in the collection.
Name
The name of the field as it would be displayed in the DynamiCube view.
location
Re: Attributes text in Pivotview
02-26-2010, 9:09 AM
Hi,
You will need to alter your schema. By default the schema is generated using the names as the database fields. Under the covers, however the database field and the attribute/measure names are separate.
In the terminology of the schema, a Query Field is the value coming from the database. You can also create calculated query fields based off of these values. From the Query Fields you create the Attributes (and hierarchies) and Measures using expressions.
This section of the product help
shows you how to create various parts of a schema through code. You can also open the .schema file and edit its XML manually.
James