Error in FetchXML report since Dynamics 365 - reporting-services

Since recently I'm getting an error in a Dynamics 365 updated CRM OL when rendering a report. Now when I test in VS, it also shows this error. It says the following:
Could not create a list of fields for the query. verify that you can connect to the data source and that your query syntax is correct. The specified record type does not exist in Microsoft Dynamics CRM. The entity "XXX" cannot be found. Specify a valid query and try again. The entity with a name = 'XXX' was not found in the MetadataCache
I can connect, this always worked using the CRM OL Link, credentials are the same and the entity is there. I just copied the fetchxml from my advanced find, so pretty sure it's there.

I don't know of any changes to 365 that should break this. However, what I would do to fix it is create a report using the wizard that uses this same entity. Download that report and check the following:
Data Source - Are there any slight differences in Data Source name and/or connection string?
Data Set - Are there any subtle differences in the FetchXML from casing to versions etc?
That should point out the problem. If not, and that downloaded report works, either just copy in the attributes etc you need into the new report and go with that instead (it might be some xml within the report itself). Or if your report has nothing on it you could start comparing the raw xml of the 2 reports to see what is different.

This error: "The entity with a name = 'XXX' was not found in the MetadataCache" is quite common error with caching in CRM (Metadata is cached to speed things up). On On-Premise environemtns the thing that usually helps is simple IISRESET, which is not an option for CRM Online. I would try obvious solutions like re-publishing all customizations in CRM (from my experience it rarely helps for this error, but it's worth a shot), maybe adding some dummy plugin (and then removing it). If you will be still getting this error, then contacting MS Support should be your next move (also IIS AppPools are resetted after some time, so maybe tomorrow it will work - seems like a bad joke but actually it's true...)

If you have multiple instances of CRM make sure you point to the correct one but adding ;crminstance; at the end of the connection string. This solved the problem for me.

Related

Moving SSRS Report with parameters to Dynamics CRM 2013

Good morning, All.
First let me start off by saying that I'm extremely new at CRM and even after reading umpteen million articles, whitepapers, and blog entries, I still feel completely lost.
I have an instance of Dynamics CRM 2013 On Premise that I'm trying to write custom reports for. Before I realized that all reports had to be done inside of BIDS, I wrote out a beautiful custom Quote inside of SSRS itself. I made sure to use the Filtered Views in my query to the database, and the structure of the query seems sound, but I can't seem to upload the .rdl file into CRM.
I get the error:
Reporting Error
Error occurred while setting the data source for the report
I have two questions:
How do I move this report into CRM without having to fully recreate it in BIDS?
How do I pass the Quote ID from CRM to this report query?
Thanks in advance for all of your help.
Edit: Added Error Message
You Should be able to upload the RDL directly to CRM...
Try creating a really basic report with the same data source and something along the lines of "select top 10 from filteredincident" and upload it.
If it works then you know it's something with your query.
CRM is notorious for giving error messages that don't have enough information, or are at worst misleading. I've seen this error when I accidentally used non filtered tables and a autofilter parameter that was incorrect.
Also take a look at the SSRS server that CRM talks to, if it's misconfigured that may cause an issue as well. You may want to try uploading your report to SSRS and run it from there to ensure that SSRS is working correctly.

SSAS Tabular - Data is stale

I have a tabular model that I've processed and deployed.
I'm having a problem getting SSRS to reflect the newly deployed information. I have a shared Dataset accessing a shared Data Source. When I run the MDX in the query designer of the Dataset, the correct numbers are returned. When I run the report, however, the old numbers still show. I've tried deleting the .DATA file but it didn't help.
EDIT:
I've verified that the problem is in the SSAS database itself. I queried it with drillthrough from SSMS and saw that it is returning rows that aren't in the source views any more. They used to be, but no longer.
This almost seems to be some crazy caching issue. I've rebooted and dropped/redeployed the SSAS database and no luck.
Any thoughts?
I would suggest a few steps.
Ensure you are connecting to the correct tabular model.
Expand the tables in the tabular model, and right click one of the tables and click "Process". Check all the additional tables in the model.
Change "Process Default" to "Process Full" (Process default does not always work correctly)
Click Ok.
You should now see the model process table by table.
I would close and re-open the report.
Actually I would completely ignore the BIDS / Visual Studio Preview pane as it is riddled with bugs and inconsistencies and proves nothing (assuming your end users aren't using Visual Studio).
Instead I would deploy the report for each test run to a test environment / folder on the host server (Report Manager / SharePoint). As well as being a realistic and meaningful test, this has many advantages such as being able to leave multiple IE tabs open with various parameter combinations set, then just refresh them after a Deploy to retest.

Microsoft Access Fixes not Propagating/Errors Not Reproducible In Dev Environment

OK so this is kind of a general question here. We run an ASP/C# Site that's fed by a SQL 2008 R2 database.
Our data entry takes place using Microsoft Access 2007 and feeds to a SQL 2008 R2 instance.
Our data entry forms (all .adp) are generally simple, but we randomly run into problems where I'll post a change to the DB (we have a script that runs at night and will archive our old DB versions in the form of "DB_NAME.adp03122012" and keeps the newest revision as "DB_NAME.adp". This way, our data entry team will just need to click on a network shortcut to access the Access forms.
What we're running into is non-reproducible errors of varying types on random machines.
Example, I make a simple search that has a combo box and a search button. You select the item you want to search for and it updates the record source to search for that PK/FK. It works fine on my developer box. It works fine on certain end-user boxes. But on others, it throws a run-time error:
"Run-time error 2467: The expression you entered refers to an object
that is closed or doesn't exist".
Now the error itself isn't the focus of this. It's not being able to reproduce it. I tried running it on another box that has the same hardware specs as the offending box and it ran fine, no errors, no nothing.
I'm at an absolute loss as to why this is happening. I don't think the error is actually related to my VB code or to our databases, as it's working fine on some computers and isn't working on others. It's almost as if the code isn't propagating properly to specific boxes.
Has anybody else dealt with this before?
I feel somewhat foolish, but our Network Admin hadn't propagated Windows updates to all of our end user boxes.
The advice that Remou and mwolfe02 gave was valid and helpful, and likely would've helped had I been informed that the computers in question needed updates.
Thank you for reading and offering comments and help.

"#Error" in Place of all Calculations Made with Custom Assembly in SSMS

Using reporting services 2005. I have a set of reports that use a custom assembly for some basic calculations. It has been deployed several times in the past successfully.
I am trying to install the reports and assembly on a new instance of SQL Server, and the repors work fine as far as pulling back and displaying data. The only problem is that all the fields and labels that require the use of the custom assembly display the word "#error" instead of the correct label or field.
It is difficult to google, since the "#error" results in a search for "error", which does not give me the results I am looking for. However, the few articles I did find seem to point to a policy config file problem or a security problem. I have checked the config file against a working implementation, and have opened up the security on the directory in every way I can think of, all to no avail.
Any other ideas on how to even begin to troubleshoot this problem?

How to fix SSIS : "Value, does not fall within expected range"?

When I open up the solution that contains SSIS packages created by a colleague, I get this awkward error that tells me nothing about what I'm supposed to do to fix it.
He left instructions to take all the "variables" out of the connection string in the dtsx file manually before opening up the solution. I have done that, now when try to view the package in the designer I just get an image of a red x and this message.
EDIT: You cannot see any design elements, no tabs across the top to switch to errors or data flows. Just a gray center area on the screen with a red x, and the message, its like VisualStudio dies in the process of reading the dtsx file.
The question is rather unspecific so it’s of course difficult to get on the right track here. All of the given answers focus different issues. I would say that PeterX had the best guess. The reason for the error could be as simple as a modified data source.
I came across with a bug "error output has no corresponding output" quite often when adding a new column to a table that needs to be processed by an existing SSIS package. This bug came along with an error message saying that a "Value does not fall within the expected range".
A newly added column needed to be processed by an existing SSIS Package. The expected behavior is that SSIS will recognize that there is a new column and select this column on the columns page of the OLEDB Source Task SSIS to be processed. However, when opening the OLEDB Source Task for the first time after having modified the table I got twice the following error message: "Value does not fall within the expected range." The error message showed up when opening the editor and when opening the Columns page of the editor. Within the Advanced Editor of the OLEDB Source Task the new column showed up in the OLEDB Source Output Columns Tree, but not in the OLEDB Source Error Output Columns Tree. This is the actual underlying problem of the error message. Unfortunately, there seems to be no way to add the missing column manually.
To solve the problem, remove and re-add the newly added column on the Columns Page of the normal Editor as mentioned by Jeff.
It is worth to be mentioned that the data source of the OLEDB Source task was a modified MDS View. Microsoft CRM Dynamics – as mentioned in the related thread – is using views, too. That leads me to the conclusion, that using views as a data source may produce either of the above mentioned errors, when modifying datatypes or adding/removing columns.
Related Thread: Error" ...The OLE DB Source.Outputs[OLE DB Source Output].Columns[XXXXXXXX] on the non-error output has no corresponding output
The described workaround refers to Visual Studio 2008 Version 9.0.30729.4462 QFE with Mircorsoft.NET Framework 3.5 SP1. The database is SQL Server 2008 R2 (SP2).
I had to delete and recreate the OLE DB Data source in my Data Flow - this is where I got the error. I also noted I had to "re-select" the "OLE DB connection manager" in the drop-down-list to force it to recognise the new connection.
This was probably a combination of getting the solution from TFS (where I noticed the data-sources didn't come-across properly and it complaining about a missing connection GUID) and/or copying and pasting the elements from another package.
(For BIDS 2008).
I had this issue for my OLE DB Source component with an SQL command after adding new columns to the database, and it wouldn't let me select columns or anything else to add the new columns.
I'm working with an Oracle database, and the only way I could get it to update was to change the SQL query to select 1 from dual, and preview it. Then revert it back to my old query.
You get a similar message if someone uses EncryptAllWithUserKey as the ProtectionLevel. However, I believe the message is slightly different (even though you get a grey design surface with a red X).
Have you tried viewing the file in Notepad? Is it just a series of GUIDs or is there anything in it that is humanly readable? If it doesn't have any readable code, then it was probably encyrpted with the user key.
If the employee deployed the packages to a server and used SQL Server as the deployment destination (not File System or SSIS Pacakge Store) then you can download the packages to your machine. Just connect to the SQL Server Integration Services engine, expand Stored Packages, expand MSDB, expand the relevant folder, right-click on the package, and click Export Package. Save the file on your local machine and open it. The package will probably lose annotations and pretty formatting, but otherwise it should be identical to what the employee deployed.
I just struck the same issue. After flailing about for a bit, I found the solution was to edit the Solution Configuration.
The Solution Configuration appeared to have a matching Project configuration, as shown:
However clicking the drop-down arrow for that Project (SSIS-Advance in this example) revealed that there was no Project Configuration for that project called Production - Sub Reports. I'm not sure how that came about - this Solution has a 7-year history and many developers.
Anyway once I created a New Project configuration (using that same drop-down menu), it is all happy now.
If it has Oracle data sources, you may need to install the Microsoft Connectors v4.0 for Oracle by Attunity:
https://www.microsoft.com/en-us/download/details.aspx?id=52950
I also had to use VS 2015 - the version originally used to create the project and package.
I had this exact problem and installing these connectors and using VS 2015 fixed the issue.
I had this occur as well when I tried to call a stored procedure with OUTPUT parameters with OLE DB.
I found this: http://sqlsolutions.blogspot.com/2013/04/ssis-value-does-not-fall-within.html, which resolved my issue. The relevant action was to rename the SSIS parameter mappings to '0', '1', etc.
So for example, when calling dbo.StoredProc #variable0 = ?, #variable1 = ? OUTPUT, #variable2 = ?;, in the parameter mapping dialog, you would name the parameters '0', '1', 2' to correspond to those. Ah, SSIS <3
I get this when I do not follow the convention for parameter naming, e.g. not name parameters 0,1,2,... in the right order for OLE DB connections.
The details are documented here.
In your connection manager, convert your connections to package level instead of project level
Delete connection manager and re-create and setup ssis package solve the problem.
I got this issue after I Add Existing Connection Manager in a SSIS project. I was just importing a Project Connection Manager from a different project (.conmgr) to my project. My solution to fix the issue was:
Deleting the imported .conmgr
Recreating it from scratch