This is one of those "where the **** did Visual Studio put the button to do that? You must be able to..." questions.
A dimension in an SSAS project runs off a table in the DSV. Now I've created a named query (which just excludes certain unwanted rows from the table). How do I switch the dimension over to point to this named query? Nothing's changed in the set of columns.
What I did was to go to every attribute, and change the Source of its KeyColumn (and NameColumn, where appropriate) to the named query - which involved reselecting the same column name.
There just has to be a better way to do this...
I found it in the end.
You don't do this in the dimension itself, which takes the "friendly name" of the object overlaid on the real datasource in the DSV as its source.
Instead, you "point" that friendly name to a different database object (table, view) in the DSV itself: right-click the object and select "Replace Table".
Note that the "friendly name" won't change, so that it will look as if nothing has happened, until you see that the Name property has changed to point to the object you just chose. (I usually change the friendly name to give at least some information about the underlying database object).
Related
I have two fields on a form. Field 1 is auto number field named 5sID. Field 2 is a lookup field named 5sType.
When I open the VBA code for both the oncurrent and on open, I try to reference either field with a "Me.5sID" or "Me.5sType". In either case when I type in the "Me." the auto list shows the other eight fields in the table, but not these two.
I have used this for years on both datasheets or continuous forms. There are only the two fields on the form and they were selected from the table field list in the design view.
If I change the name on the Other tab of the property options, the fields then appear.
I have now rebuilt the table and the form, I have created a database and linked to the same table and still get the same results.
If I add another short text field it shows up when I type "Me." in VBA, but any other type of field does not show up.
Naming an identifier with a number as first character is a bad idea! Always start with a letter!
On Access 2013 that creates a compile error as the compiler expects a=as he interprets.5as a decimal-number.
That worked for you on older versions? Hard to believe!
As workaround use square-brackets like on identifiers containing spaces or other crap.
Me.[5sID]
or turn onShow hidden Elementsin Object-Browser , what fixes Inteli-Sense and creates automatic brackets. Seems like this is a way to create hidden members ;)
I have a problem with SSRS report builder. Basically what I want to do is to delete a column. I have a report that someone else made and there is 1 column (xxx) that no longer exists in data source tables so I need to delete it.
When I go to query designer and delete this column from the code and run it there, it works. I close query designer window and see that list of columns (fields) is updated now and xxx column is not there. Then, I delete this column manually in designer (default screen) and when I try to run the report, It doesn't work:
"The Value expression for the text box ‘XXXDataField’ refers to the field ‘xxx’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case."
But that field should be already deleted. So I don't know what else I can do, or what it can be linked to. I just want to delete it. Any Idea?
Thank you
If your dataset does not contain xxx but your DataTable has this error is normal
You either delete that column from your table or at lease delete DataSet Binding from table so that SSRS does not try to retrieve that column from DataSet
It will be a reference to the field in another field. For example, if you deleted a column that showed an OrderShipped status, then you might have another text box highlighted based on this.
The error is telling you which textbox is in error. So, click somewhere on the designer, then in the properties window, right at the top, click the dropdown which allows you to choose specific report items, choose XXXDataField (the one named in the error message) and then check the value expression. In there you will find the reference to the column you deleted.
In my Qlik View document I want to change the Current Selections information to use the Label applied to the field rather than the table.field format.
For example
PartsTable.PartNo
Would be
Part Number
Unfortunately there's no way to do this in the Current Selections object. However, you may have some alternatives depending on your requirements.
First of all, if you're just happy with seeing the current selections as text (rather than having the functionality of the Current Selections object), you can create a Text object and use the expression:
=replace(GetCurrentSelections(), 'PartsTable.PartNo', 'Part Number')
This will then look something like the below:
The other alternative is to use the RENAME statement in the load script after all your table loads are complete. RENAME allows you to rename a single field or a collection of fields by using a mapping table. The syntax for a single field is shown below:
RENAME FIELD oldname to newname
If you should need to rename more than one field at a time, you can expand this to:
RENAME FIELD oldname1 to newname1, oldname2 to newname2,...
More detail on the syntax including using a mapping table can be found in the QlikView installed help file.
For your example, I put together a small demo:
QUALIFY *;
PartsTable:
LOAD * INLINE [
PartNo
100
200
300
];
UNQUALIFY *;
RENAME FIELD PartsTable.PartNo to [Part Number];
This then results in:
RENAME is similar to the alias (AS) statement, except that you can first load all of your data, and then do the rename at the end. This will then rename your field so that it appears under its new name in any front-end controls (e.g. Current Selections etc.) However, this may not be suitable for you if you already have an existing field named Part Number in your script.
I've created a derived column that translates a 1 to an 'M' and a 2 to 'F'. i.e. a gender indicator. The derived column feeds into a Fuzzy Lookup transformation and then to a conditional split. The problem is the derived field does not show up in any of the downstream components. In the Fuzzy Lookup transform the "Pass Through" checkbox is checked for the derived column, but in the following Conditional Split transform the column does not show up at all. Funny thing is that the _Similarity_Gender_Derived does show up in the column list for the conditional split.
Hopefully someone else has seen this type of behavior.
Thanks - Mr. Do
Right click on the Fuzzy Lookup task and select Show Advanced Editor.
Go to the "Input and Output Properties" tab.
Expand the "Output" item, and then the "Output Columns" item.
Is your derived column listed there?
If it is, it should also show up on the available input columns of the Conditional Split task. If not ...
Right click on the Derived Column task and select Show Advanced Editor.
Go to the "Input and Output Properties" tab.
Expand the "Derived Column Output" item, and then the "Output Columns" item, and select your derived gender column.
Note its LineageID attribute.
Repeat the earlier steps to get the Fuzzy Lookup's Output Columns.
Hit the "Add Column" button. Name the column the same name as your derived column, and in the "SourceInputColumnLineageID" attribute, enter the LineageID you noted earlier.
Alternate answer: is your derived column creating an all new column, or simply replacing your existing "1/2" column? In the Derived Column Editor, check your "Derived Column" .. umm .. column. If you are just replacing your existing column with the new value (instead of adding a new column) you may just be looking in the wrong place.
Thanks for the response. Turns out that issue had to do with some corruption with the meta data. I ended up going back into the Derived Column Transform, renamed the column in error, then added a new derived column with the old name. I saved the transform, and then removed the original column. That fixed the problem.
Thanks for the responses.
Did you add the Derived Column into an already existing transform chain?
If you did then there's a good chance that one of the transforms further down the queue is set to not pass on this newly derived column. Check all the transforms below and make sure that you're derived column is set to be passed through.
In visual studio 2008, when I drag a database table into my dbml screen, any tables that end with the letter s automatcially get the s removed from the dbml object. Is there any way to disable this?
Also, the collection of rows also gets an s appended to the collection property name. Is there a way to change that as well?
Thanks
You need to disable the Pluralize Table Names for the LINQ to SQL designer.
To do this navigate to Tools -> Options -> Database Tools -> O/R Designer and change the Pluralization of names to false.
Then you will need to recompile your project and it should address the naming
In a code first scenario, you can handle some problems that pop up like this on a more granular level by simply specifying the name of the table on the entity with the Table attribute:
[Table("QTPhotos")]
public class QTPhoto
What I found was, originally, we had a simple entity name "Photo," but this was conflicting with some things (with a number of our entity names), so we started qualifying them ("QT" as a sample prepend), and suddenly this problem popped up. So I bet this is because "Photo" is a recognized word ending in 'o' that does not pluralize to "..oes" (as in Potatoes), but "QTPhoto" was not, meaning it was trying to find a table named "QTPhotoes".
Simply setting the table name fixes this.