I am building a GI in Acumatica. I a have it all completed, but I am getting the error: (Unsupported formula operator 'IIf.')
I used some extensive relationships to try and get the result I want and need.
These are the tables and relationships used:
These snippets were took from and GI created by Tim Rodman on a report perpared by: Shawn Slavin.
My tables are little different than these tables, but set up with the same format. Is there any way anyone can point out why I would be getting this error?
Related
I'm trying to create a report in Report Designer. It uses three tables: SOShipment, SOShipLine, and Inventory Item. But when I try to run it, I get the following error:
System.Exception: The table SOShipLine does not exist.
But SOShipLine definitely exists. It's a core part of Acumatica, I got it from the instance in the Schema Builder, and I even double-checked the database to be absolutely sure that it exists. What's going on here?
I figured out the problem. I had an invalid filter. I had Value1 as [#StartDate], when it should have been either #StartDate or =[#StartDate]. The error it gave me was very confusing, though.
I'm building a document with a dashboard-like appearance.
I'm using radio buttons for selecting the year.
Sadly in one of my datasets the attribute year is another attribute, even if contains exactly the same values.
How can I solve the problem of matching attributes basing on their values in documents?
Basically i want to click on the radio button 2013 and select the value 2013 in graph1 containing the attribute named year and in graph2 containing the attribute named year-of-observation.
I did as you told me.
I added an advanced qualification fiolter to the report that contains year-of-observation:
[Year]#ID = [Obs-Year]#ID
Then I added the attribute year to the report.
But when i try to execute the report have the following error:
Report: xxxxxxxxxxx
Job: 8600588
Status: Execution failed
Error: SQL Generation Complete
QueryEngine encountered error: The report contains a cross join in pass 1 between tables ANSWERS and YEAR. Execution is aborted per the cartesian join setting..
Error in Process method of Component: QueryEngineServer, Project xxxxxx , Job 8600588, Error Code= -2147212544.
Starting Time: 15:13:50
You can't... or you can try to add the attribute year in the report with year-of-observation and put a filter year = year-of-observation, at this point many things can happen:
If the two attributes have no relationship, the lookup table for year will be added to your report query in cross join, but you don't worry because the filter will limit the results to the right ones.
If one of the attributes is parent of the other you won't have cross join, then remove the filter, but double check the results (just in case)
If Year is already mapped on one of fact tables used by the report you and there is no 1:1 correspondence between year and year-of-observation you could have wrong results.
Also
Assuming Year and year-of-observation have no relationships, if they are mapped on the same lookup column of the same table (no aliases, no role recognition) MicroStrategy will use only one lookup for both attributes so there is no need for the filter.
A word of advise
Anyway it's a good practice to keep different logical entities (like two attributes) separated, but (probably not your case) when they are the same thing just use one.
Advanced level
Another possible solution is to play with relationships: you can try to make the Year parent of year-of-observation, then include the year attribute in the report where is missing, but if this is really feasible depends on your schema, you could end up with messy hierarchies path if you have already children for Year and Year-of-observation.
Cross Join Error
In case you follow solution #1, you could receive an error related to the Cross Join. This happens because the SQL Engine is trying to protect you from Cross Joins (usually a bad thing).
To disable this error you need to change the following VLDB property for the report (or you can change it also at Project level if you have many reports with Cross Join):
VLDB Properties -> Joins -> Cartesian Joins Warning
When I try to run a report in COGNOS Report Studio, I get error : ORA-00918: column ambiguously defined
Now there is no way to get the runtime sql and test it out against the oracle db. So I am left groping around.
My question is...when we develop the model in framework manager, we do not write our own sql. Just specify the tables and columns and joins. So the error should never come because this error come when you forget to prefix a column name with the table alias.
I agree it is odd. Start removing data items from the query until it works. Try to narrow it down to a specific data item within a table. See what SQL is generated without the offending field, that should give you a hint as to what is going on.
I'm trying to run a query on Rally using an Excel plugin based on iteration. I have established that the plug-in works by running a query for blocked stories. However, I get the following error when attempting to query by iteration:
Query failed due to errors:
Cannot parse object reference from "iterationname"
Matt Greer answered a very similar question in March, but I can't figure out how to translate this answer into making my query run. Please help. Thanks in advance
The query chooser in the Excel add-in is fairly primitive and really only works for fields that aren't objects themselves (ScheduleState, PlanEstimate, etc.)
Since you are querying a sub-object you can just type in the query manually in the textfield and save it.
(Iteration.Name = "Foo")
I'm starting to do some test on SubSonic 3 and I'm missing some stuff.
1st: Where's the Table names constants? The place where we could ask for the same of a certain table using intelisense...
2nd: Same as the above but for the table columns... where are they?
This is very useful mostly when you need to pass those names as string... it you need to refactor your DB we don't need to look through all the code to find where was I using that column!! Once you re-generate the code the compiler tells you!
3rd: Now how can I perform an ExecuteReader on a certain table like I'm used to on 2.x through the Query object? I used this a lot for list where I really don't need the business objects (BO) overhead... When I needed a BO (for showing a grid row details) I create it from the row itself...
I'm using ActiveRecord btw...
Thanks guys!
Alex
1st: Where's the Table names constants? The place where we could ask for the same of a certain table using intelisense...
In Structs.tt find the following line of code at line 47:
<# foreach(var col in tbl.Columns){#>
Add the following code above it:
public static string TableName { get { return "<#=tbl.Name#>"; } }
Now you'll have a property that returns the name of the table.
2nd: Same as the above but for the table columns... where are they?
In the generated Structs.cs file, this is included in the 3.0.0.3 version
3rd: Now how can I perform an ExecuteReader on a certain table like I'm used to on 2.x through the Query object? I used this a lot for list where I really don't need the business objects (BO) overhead... When I needed a BO (for showing a grid row details) I create it from the row itself...
If you're using SqlQuery object you can call ExecuteReader on it. Alternatively you can use Linq syntax to generate return custom shaped objects and they'll get mapped automatically.
1st and 2nd: It's not implemented in the default tt-files.
A similiar question:
SubSonic 3 Simple Query Tool
Problem is that's not a correct implementation if you want the 2.x way - the XColumn properties used to be column objects and not string constants, those were found under the Columns struct. So I hope that check-in will not be accepted and that someone will 2.x-ify it correctly.
Anyway as you can see it seems pretty easy to fix it on your own.