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

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?

Related

Error in FetchXML report since Dynamics 365

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.

SQL Server 2008 R2 - Custom SSIS Components work in BIDS not in SQL Server Agent

We have developed Custom SSIS components that integrates with an online REST API (Shopify to be precise) and these components work fine in BIDS and every single time too. However, when I create a SQL Server Agent job for the SSIS package that uses the components, some of the components don’t work, there is no error, just never hits the Pre Execute. The components that don’t work call the REST API and set specific TAGS on some orders, they do so using a JSON. The SQL Server agent is running on the same machine (my own) and it's executing the same SSIS package that works in BIDS. There are no errors and the SQL Server JOB reports success.
My machine is a 64 bit setup, so obviously the Agent will be running in 64bit so there may be issues there.
This is what I have tried already
Changed the SQL Server Agent user to eliminate the issue being a proxy/user issue.
Changed the setting for the step to use 32bit runtime (Ticked “Use 32 bit runtime”)
I have tried compiling my code using Any CPU x86 x64 .. with different results but none of them work etc
The installation project (which is part of the solution) is a WIX Toolset project which can only compile using x86 which I don’t think I can change.
Logged where it is getting to a log file.
I think it might be 32bit/64bit issue but maybe wrong. The log file shows the following
When called from BIDS (works)
• Validate (code running as 32bit)
• Validate (code running as 32bit)
• Hits Pre Execute and it all works thereafter
When called from SQL Server Agent (doesn’t work)
• Validate (code running as 32bit)
• Validate (code running as 64bit)
• Never hits the Pre Execute
Like I said, I suspect it being a 64bit issue but maybe wrong.
Hi guys and sorry for not posting the answer.
First of all thank you for all your help, especially Nick McDermaid as you kept trying and trying. I really appreciated your pointers and without them I wouldn't have solved it ( kind of solved it :o) ).
My SSIS Custom components only work when I have a "Success path" coming out of them. This was only an issue on this particular occasion because it was the last component called in my Data Flow.
This could be down to a bug in my SSIS Custom Component but I am sure I have had this issue with other components in the past (I think it might have been the 'Send Mail Task').
If anyone comes across this issue again then I would love to hear from them.
I'm currently fire fighting at work so hadn't had a chance to look at the SSIS Custom Components again.
Once again, thanks for the help I received.
I realize this question is very old, but I thought I'd put in my answer. I just ran into this very issue and the answer was that the SSIS engine didn't see the custom component doing anything so it removed the component at runtime. I was able to get around this by changing the RunInOptimizedMode property of the Control Flow object to False. After this I was able to run the SSIS package as a SQL Agent job.
If you run the package through dtexec.exe as bilinkc suggested in your comments, it should give you messages that make it obvious if this is occurring.

SSIS 2008: Changing a Data Source's Connection String Not Reflecting in Referencing Packages

Been struggling with this for quite some time so any help is appreciated. Spent a lot of time looking over MSDN, Google, etc, and still no luck.
I have an SSIS project I intent to always execute from within BID. The project has multiple packages, so I created a Data Source to share amongst all the packages.
In each package, I create a Connection Manager based of that Data Source. Now when I go and edit this Data Source's connection string to point to a different server, the change is NOT reflected in the packages.
Now, MSDN says the opposite. In fact, one of the main purposes of Data Sources is to update connection strings easily from within BID; at least according to MSDN.
And for me its not working. This has got to be the most annoying thing I have seen thus far in BID.
Any one have any suggestions?
UPDATE
It looks like BID does not synchronize a Data Source change with Connection Managers if the data source's authentication is SQL server. If it is Windows authentication, it detects the change fine.
Very interesting indeed.
Just a guess. This kind of behavior happens when you have a "package configuration" configured.
Right click on any blank area of your control flow and select "package configuration". If the "Enable package configurations" check box is selected and you have a configuration on your connection string, it will override any value you had specified manually.
I figured it out for those that are interested. I am not sure if this is a bug in BID or not but I hope this helps someone else struggling with this problem.
All you have to do is simply open up all your packages at one time. This is as simple as highlighting all the packages in the solution, right clicking, and choose "open".
Once all the packages have been opened, go ahead and edit your Data Source's connection properties. BID will automatically apply the new changes to all the open packages that have a connection manager based on that Data source.
Hope this helps someone.
I found I could not change any of the data connection configuration values because there was a variable defined for the connection string. Enabling/disabling package configurations had no effect on the behavior.
To access the variables menu, right click anywhere on the DTSX designer background and select Variables. Make sure you do not have any values in the variables list that are being referenced by your data connection. If you can not find the references anywhere, try fixing the values for the variables that might be affecting it.
You need to change in respective dtsx package. Open it in notepad++ and search for the connection string, modify it and save it. You can see the connection change in solution now.

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.

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