SSAS 2008 R2: How to create dataset fields manually - visual-studio-2010

So, this is a follow up question to this one i made before.
Basically, i wanted to go from
to
which i got.
My final problem is that i dont seem to be able to create a name for these fields for the datasets in ssas.
I tried:
FIELD NAME=CLOSED, FIELD SOURCE=
<?xml version="1.0" encoding="utf-8"?><Field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:type="Level" UniqueName="[Financial Data Month Validation].[Month Validation Status].[Month Validation Status].ALLMEMBERS" />
I tried ALLMEMBERS, CLOSED, OPEN and some other variations. I m new to this but i have been able to manually create fields before. I think its the two header columns crating my problem here. Any help?

Related

Crystal Report 2008 swap data table for identical differently-named table

I have a Crystal Report that gets its data from a SQL Server view. The users want the view to be able to get data from a particular start/end date range which means the view needs parameters passed to it.
I have put the view's query into a SQL Server stored procedure with parameters.
I was able to get the Crystal Report in question to use that SP as part of its data and it prompts for the start/end dates just fine.
I have gone through the formula fields and was able to modify the formulas to point to the corresponding fields in the SP's data in stead of the view.
I need to somehow get the fields that are displaying in the details section of the report and other areas to utilize data from the new SP and not from the view.
I'd like to modify each control and field on the Crystal Report layout to somehow change the tablename of those fields from (CurrentTableName).(FieldName) to (NEWTableName).(FieldName). I think this would be the least intrusive because I think some of the fields being used have formatting and other attributes added to them and I don't want to do a whole bunch of detective work.
I know in other development products there is usually a properties window where you can find the TableName.FieldName for an object in the report and you can just edit it to be NEWTableName.FieldName.

Retrieve the fetchxml in grid via javascript

This might seem a bit of an odd request so I'll try to offer some background. I have a feature on my CRM which requires that user should be able to filter a view and then save the resulting records such that a separate process can pick them up and process them periodically e.g. daily.
Now here's the catch, they want this process to requery the data before it processes it, so basically what should be saved is the query or filters rather than the data in the view.
Having previously written some javascript code which dynamically sets the fetchxml on a subgrid like so
Subgrid.getGrid().setParameter("fetchXml", fetchxml);
I though it should be fairly straight forward to potentially retrieve the fetchxml in the grid
Subgrid.getGrid().getParameter("fetchXml");
However that doesn't work and I can't seem to find any documentation or anything that can point me in the right direction. I have used Developer tools to inspect the properties of Mscrm.XrmControlGridWrapper but I can't find anything useful..
If anyone knows how I can retrieve the fetchxml that powers a subgrid using javascript, it would be massively helpful?
EDIT
I have just found that I can do this
Subgrid.getGrid().getFilter().$3_1.GetParameter("fetchXml")
and that returns exactly what I want, however this just screams of hacky and unsupported.
$3_1 has a type of [object (Mscrm.TurboGridControl)]
Is there a way I can access this object in a supported way?
A few thoughts on this:
You can retrieve the SystemForm record, then parse the FormXml to get the ViewId. Then you can retrieve the view from the SavedQuery entity, and get the FetchXML. Here's an example of the ViewId in the FormXml:
You could add a boolean field to the entity and when the user saves the set they want to process you can flag those records for the later batch process to retrieve.
When the user identifies the set they want to process you could temporarily create a view (SystemQuery or UserQuery) with the the FetchXML using the "in" operator with the list of Guid's to identify the exact records to process. After using the view to retrieve and process the records, the batch process could delete the view. I would probably be comfortable using this approach up to a few dozen records.
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="account">
<filter type="and">
<condition attribute="accountid" operator="in">
<value>{A1CC84F2-BE0D-E711-8104-00155D6FD705}</value>
<value>{A3CC84F2-BE0D-E711-8104-00155D6FD705}</value>
<value>{A5CC84F2-BE0D-E711-8104-00155D6FD705}</value>
</condition>
</filter>
</entity>
</fetch>
If you want to avoid changing the Modified information by setting a boolean flag on the records to be processed, you could create an N:N linking entity and associate the selected records to an instance of that entity.
You can do:
Since you have the fetchxml that previously set as filter for SubGrid, why don't you store this variable directly. You can save this variable in localStorage or maybe even in a dummy field created for this purpose. And use it in the desired process.
Btw, the supported way of getting fetchXml: Xrm.Page.getControl(gridControlName).getFetchXml()
Hope this helps...

LLBLGenPro + VB6 project - accessing new columns added to a typedlist

I have a program made in Visual Basic 6 which access data from a database (made with Microsoft SQL server management studio express 2000 then migrated to 2005) and puts all data into an immense GridView.
The views, typedlists, queries, etc... all have to go through LLBLGenPro, which is used from what i learned to regenerate the entire code of our program in case we need to add anything. The project on LLBL contains entities, typedlists and typedviews. I'm not a pro of LLBLGenPro and i'm just starting to discover it
I have to add two columns to the Gridview with two specific tables columns containing the information i need. So i went onto the database to modify the view i needed to get the required data (which now gives me the two more desired rows), then i loaded the database again in LLBLGenPro and made sure to check my new fields in the typedList that contains them. I regenerated the program, and
started the visual basic project. My columns appear in all the files where they should be, with the right names (the typedlist and the views referring to it). The classes now find 23 column indexes instead of 21. All seems fine for now.
The typedList is then imported into the main class:
Private _typedList As New DBSqlTypedList.MyClassNameTypedListTypedList
All the items from the table in the DB are already loaded correctly by the code using filters and appear in the program without problem. The typedlist we need (imported as _typedList) fills the data in the gridview (GridBT) with the following lines:
If isOpenSoftware Then
With Me.gridBT
.AutoGenerateColumns = True
.AlternatingRowsDefaultCellStyle = Nothing
.DataSource = _typedList
Now here's the problem: _typedList does not see my two news rows at all and they don't appear in the grid at all.
Typing _typedList.item(0).xxxx for example gives me access to all the rows that were already there but none of the two i added appear in it.
Did I forget something in LLBLGenPro?
Don't hesitate to tell me if you think i didn't send enough code or information!

Magento: Not able to save data on multiple tables on DB

I've followed some suggestions to have some data copied over from one table to another table on the DB but it's not working.
Based on the response I received on this questions: Magento: How to save data to order_payment and quote_payment
I tried to do the following on the Mage/Sales/etc/Config.xml file
<sales_convert_order_payment>
<cc_bankname>
<to_quote_payment>cc_bankname</to_quote_payment>
</cc_bankname>
</sales_convert_order_payment>
and this
<sales_convert_quote_payment>
<cc_bankname>
<to_order_payment>cc_bankname</to_order_payment>
</cc_bankname>
</sales_convert_quote_payment>
but the bank name is only saved on the sales_flat_quote_payment table and not on the sales_flat_order_payment table which is the one I need to have this new data displayed on the order invoice and on the admin back-end under order/view.
If I manually input the data on the DB (the bank name that is) I'm able to display this information where it's needed but I cannot keep track of every transaction to manually input the data upon order completion since customers get to see their order details once it has been sumbited and they would not be able to view the new data until I have done so myself.
does anyone know why the data is not being carried over to the sales_fat_order_payment table?
I'm having the same issue with a new mobile number attribute I created but I believe if I can solve this one, then I should be able to handle all other similar issues.
That technique (naming it using same name with Mage) won't work for config.xml.
How it works? You need to read this article written by Alanstorm http://alanstorm.com/magento_config_declared_modules_tutorial
You need to create your own module by defining it in app/etc/modules (of course you should name it other than Mage).
eg:
app/etc/modules/Test_Sales.xml
content:
<?xml version="1.0"?>
<config>
<modules>
<Test_Sales>
<active>true</active>
<codePool>local</codePool>
</Test_Sales>
</modules>
</config>
app/code/local/Test/Sales/etc/config.xml -> define your new config in here
In older version of magento, sales order stored in eav type.
In higher version, it has been flatten.
Look at the name: sales_flat_quote_payment, sales_flat_order_payment
Magento always keep their data backward compatible, that's why it has attribute name cc_owner in eav_attribute.
In your case, you don't need to create new value in eav_attribute (you just need to add column cc_bankname in sales_flat_quote_payment and sales_flat_order_payment which I'm pretty sure you have already created).
As you have said before, the problem why it is not saved to sales_flat_order_payment is because of cache issue (Magento cache the config.xml so you need to refresh it System > Cache Management > Configuration)

Entity Data Model Designer not showing tables

I am trying to create a Entity Data Model via an existing database,
So i follow these steps in visual studio 2010:
Add new Item->Entity Data Model
Select "Generate From Database"
Select a connection string, test the connection string and its ok
Select the tables, stored procs etc to import, no tables show up at this point, but i do check the "tables" selection - im assuming tho that it should list my tables here.
Then after these steps the Entity Data Model visual tool (ie. double click on .edmx file) shows no tables - i have tables in my database, and the username and pass im using to connect has permissions to access these tables ok.
thanks.
Open your edmx file in a text editor. If you see the tables in the file but not in the designer, try clearing out all the EntitySet nodes and EntityType nodes, save the file, then go back to Visual Studio and try the Update Model from Database again.
<edmx:StorageModels>
<Schema Namespace="myModel.Store">
<EntityContainer Name="MyModelStoreContainer">
delete-> <EntitySet Name="Table1" ... />
delete-> <EntitySet Name="Table2" ... />
</EntityContainer>
delete-> <EntityType Name="Table1">...</EntityType>
delete-> <EntityType Name="Table2">...</EntityType>
</Schema></edmx:StorageModels>
I also had a similar problem. But in my case, it was due to missing Primary Key in the selected table. So, I added a primary key, and updated the model from the Database.
After that, I could see the table, and all the columns!
i has the same problem, i solved adding in the DataConnection filter adding all the schemas, i don't now exactly wath table has missing index or primery keys, etc, but doing this i solve and show all the data.

Resources