RDLC 2005 conversion to RDLC 2008 : Custom code not "seen" anymore - visual-studio-2010

I have some issues with my reports since I have updated them to VS2010 format.
Even though I have modified references to from v9 to 10 for Microsoft.ReportViwer.Common and Microsoft.ReportViewer.WinForms as well, when I try to type code. in a field, what is after "Code." is always underlined with red and I get #ERROR instead of the value I want when I print the report. I know it is case sensitive and I double checked the spelling multiple times.
Moreover, I don't know why but I have errors with the Fields! syntax; I seem to have to use the Fields().value to get them to work (at the places I don't need to call custom code too)
These reports worked well before conversion (over 20 reports converted this way) but do not now. Seems like custom functions are not "seen" by the report designer. I tryed to make them public, shared; all I had is the same stupid #ERROR display.
I want them to work in VS2010 to avoid always having to modify them in VS2008 and then go back in VS2010
It's a winform application with framework 3.5
Any idea of what could cause that and what is the remedy?
Many thanks
Nico

There are a couple of ways to use custom code in SSRS. Firstly you can enter VB directly into the window under
Report -- >Report Properties --> Code
Another way is to write a custom DLL (which can be done in any .NET language of course), which then needs to be copied to both your dev machine and the production report server.
You then need to create references to that assembly in the project using:
Report --> Report Properties --> References (I assume you know this).
If you are not using your own custom assembly, and just using a reference to one on your machine then there could be some confusion on the server as to where to find the dll's. You may need to copy DLL's to the folder as indicated in the KB link below:
http://support.microsoft.com/kb/920769
When you drag a field onto a tablix or textbox, and have a look at the value expression, does it use the Fields!Fieldname.Value syntax? That syntax is natural to SSRS so it sounds like something seriously broken in your visual studio 2010 there if that is not working. I take it you installed visual studio 2010 to create web applications. What you haven't explained is which version of BIDS or SSDT you are using. If you are developing reports for SSRS 2008 R2 or earlier, then these are not compatible with visual studio 2010. There's no compromise there.
If you are developing for SSRS 2012, then you are using either SSDT by itself (which installs a shell version of visual studio 2010) OR if you already have visual studio 2010 then you need to install service pack 1 for VS2010 and then install SSDT from the SQL Server 2012 disc.
http://msdn.microsoft.com/en-us/library/hh500335(v=vs.103).aspx

Related

Unable to open designer for DevExpress version 8.2 in Visual Studio

I've inherited an old project which uses Devexpress 8.2.4 - so i went and installed an appropriate DXperience Subscription v8.2.4. Now, when I try to open the designer through Visual Studio 2019, I get a:
"This method explicitly uses CM policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40/LegacySecurtyPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information."
Then I tried to open the project in VS 2010, and upon attempt at opening the designer, same CAS policy error happens.
After editing the VS2010 DevEnv configuration file (and respective config file for VS 2019), as Thomas suggested in his answer here, my Visual Studio 2019 just started crashing during start, and my Visual Studio 2010 successfully started but it then crashed upon trying to select the designer object.
Yes, I'm trying to get this designer for Devexpress 8.2 to run in either IDE - I just need to get it to work so I can hopefully add a QR Code(is this even possible in v8.2.4???).
I just don't know how to access designer to actually graphically update the report. I did some Devexpress projects myself but using v19 and newer, but I'm having trouble now, opening this designer for old Devexpress 8.21.
Any help would be appreciated as this HAS to be done by tomorrow.
Also, if v8.2.4 doesn't support QR Code (an XRBarCode object), what would be an alternative for adding that QR Code functionality? Would I have to upgrade to newer versions - would that break something?
Thanks!

Visual Studio 2005 Reports and Windows 7

We have recently upgraded to windows 7 and have noticed that there are compatibility issues with my previous version of MS visual Studio 2005.
From taking a look around the web I believe that this issue is due to SP1 for Windows 7. My organisation will not get rid of SP1 just for one or two developers so I need to figure out a work around.
This is the issue...
I have an old MS visual studio website that has a report located on the home. This report was created in MS VS 2005.
Other versions of Visual Studio in have are 2010 and 2012. I have tried to convert the 2005 report into 2010 and this does state that it has been converted but I still cant open or do anything with the report. My 2005 web site is too large to convert or move into 2010 and we can still maintain this 2005 site by opening this up in 2010. It just seems to be a problem with the 2005 report.
I'm running out of options to make a simple change to a report. Anyone else got any ideas? I have even tried to create this report in 2010 and then add this to my 2005 site but this doesn't work.
Regards
Betty.
You say a report and then say that it is a whole site? Why not run a second site in tandom? Make a whole new site and name it differently like
http:// (servername)/Reports2012
Then put reports there. You cannot open a converted report in a site that is for a prior version, you can view it in Microsoft Business Intelligence Studio, BIDS, which is an add on to Visual Studio. If you can upgrade but cannot view it there, there is something wrong with the language file potentially. I would then make a copy of it in the old 2005 BIDS, then take that copy and see if you can upgrade that and if it will work. If that STILL does not work you could make a test report in BIDS 2010(SQL 2012 works on VS 2010, yes weird but true) to assure you can create reports there. Many times people try to open SQL Server 2012 Reports on VS 2012 and it won't work. You need 2010 add on you can find it under All Programs>MS SQL Server 2012>SQL Server Data Tools(They made the naming very confusing as it opens up and display BIDS, but calls itself 'Data Tools' under the programs). Every other version of SSRS lines up with that year of SQL Server to that year of VS. Not 2012.
If the report upgrade still does not work, yet you can create a run a new report fine; I would suggest potentially opening up the file dircectly. Your projects in a Reports solution generally have a file '(something).rdl' that RDL is the actual file and is just XML markup of the language. This is a last resort as you are essentially trying to do manually what the upgrade is failing to do in the xml. You merely copy a working report, and then paste the parts of the old report into their correct sections. Ensure the XML is valid as well.
If you cannot manage that to work you will need to recreate the report from scratch.

VS2010 depends on SQL Server Compact 3.5 for IntelliSense?

I've just recently installed VS2010 Professional (trial) on my WinXP machine. Knowing that I only needed it for a VC++ project (with no databases), I "unchecked" the install options for SQL Server.
However, when I try to create a new project (I've tried all variations of MFC and Win32 project types), I am presented with a lovely error message box:
An error occurred while creating or opening the C++ browsing database file c:\path-to-project\testProject.sdf. IntelliSense and browsing information will not be available for C++ projects.
Ensure that Microsoft SQL Server Compact 3.5 is installed and that no other applications are accessing the file. If this problem persists, delete the file and reopen the solution.
If I hit "Ok" VS will still allow me to "develop," except for when I try to add an event handler to a control. Then I am given:
An error has occurred in the script on this page.
The solution's source code database may not have been opened. Please make sure the solution is not open in another copy of Visual Studio, and this its .sdf file is not read only.
Should I have checked the install SQL Server option? If so, why? I don't want it, nor will I be using it. Or rather, what do I need to do to make things work without the errors?
EDIT/Solution
So, it turns out that since the machine I was installing on is not connected to the internet, it was not getting those "wonderful" Microsoft updates, which coincidentally would've installed SQL Server Compact for me! much thanks to #ErikEJ for the clarification.
You have to install Sql Server Compact 3.5 with your Visual Studio because MFC application projects use a temporary database by default. IntelliSense, F12, Shift+F12 and viewing class diagrams will not be available without this database.
IntelliSense will still work when developing c# applications, but not when developing MFC applications.

Crystal Reports in Visual Studio 2010

I just made the move to Visual Studio 2010 from 2008 and I guess I didn't do enough research before I moved. I seem to have gotten myself in quite a bind.
I knew Crystal Reports was no longer a part of 2010 but the beta was downloadable. I followed this document for deployment. My only change to this document is on the bindingRedirect element I changed the newVersion attribute value to 10.5.3700.0 because that is what is in the GAC and what was in the manifest of my 2008 project.
Unfortunately this is not working. Whenever I try to run a crystal report I get the exception :
An error has occured while attempting to load the Crystal Reports runtime.
Either the Crystal Reports registery key permissions are insufficient or the Crystal Reports runtime is not installed correctly.
At this point I think I am going to have to roll back and go back to VS 2008 until SAP comes out with a runtime. I can't believe there is not a work around for this as it will break so many projects that have Crystal Reports included in them.
Has anyone been able to work around this? If so, how?
Download the required package from here, install it and it will work,
Crystal Report Runtimes
Edit:
Original link no longer working. Here is this other one (http://www.businessobjects.com/jump/xi/crvs2010/us2_default.asp) from this SO answer

Visual Studio 2008 not detecting Errors while coding

I just installed VS on another PC, but this time, while I am coding, it is not marking syntax errors while I am coding..... I need to press F6 to get the errors.
Normally when for example typing the line below, I get 's' underlined saying that there is a mismatch. Any ideas how I can enable this option?
string s = 4;
In order to enable background compilation for C#, which checks you code while typing for many types of errors that are usually only reported when you build the project, you will have to install Service Pack 1 for Visual Studio 2008. If you use the offline MSDN, you will also want to install the updated MSDN Library for Visual Studio 2008 SP1, since there were framework changes from .NET 3.5 RTM to .NET 3.5 SP1 (such as the addition of Entity Framework).
Have you recently deinstalled ReSharper?
(see responses in the same link for other possibilities).
C# has never been as consistent about finding errors while i type as VB.net has. I always assumed it was just due to the freeform nature of the language, which would also explain why C++ never found errors either til build time.

Resources