I have a problem with my SSRS report when it runs from Dynamic ax 2012. I debugged it and I found out that the problem is with my SSRS report that I created in Visual Studio. I want to debug it there, but when I want to "Attach to process" I can't find ReportingServicesService.exe, because my Report Service is located on another server.
Please help me: what should I do to debug SSRS reports in Visual Studio?
I have SQL Server 2008, Visual Studio 2010, and ax 2012.
The problem is that I didn't write any code in my report: I just use a data provider in my report, but debugging the data provider code shows that the problem is in my report.
A way you can test your report is to create labels with the parameters values and othes, just to be sure that the filters or the calculated values are ok.
I'm afraid that what you seem to want is not possible: there is no way to set breakpoints in reports and debug them like you would a regular .NET app. You haven't specified what type of problem you're facing, but in general you'll have to resort to more basic "debugging" techniques:
In some cases binary search may be your best bet
If you have a clue on where the problem lies you may be able to debug that part seperately (say the data shown is incorrect, so you could debug the query seperately, in a different tool such as SSMS)
As mentioned by #Rednaxel you can use "printf-debugging" to check parameters, expressions, etc.
If you've narrowed down the problem but can't find a solution you can always ask a question about that problem here, of course.
Related
I'm looking for a way to list the tables/objects in a LINQ to SQL model, and search them, similar to the Model Browser window for Entity Framework.
Are you using MS SQL Server? If so you should be able to use the Database Diagrams.
It turns out that in Visual Studio 2017 the model browser can be activated by pressing Ctrl+1 if the edmx diagram is displayed at the same time.
For a work-around, I'm editing the *.dbml file directly. However, this seems much more error prone (copy-paste errors, requires more knowledge of framework, etc.), for repetitive changes.
UPDATE (and actual fix):
I had to install SQL Server Data Tools (SSDT) for my specific version of Visual Studio. This doesn't have to match your target version of SQL Server.
See here for Visual Studio 2017:
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017
Note that using the standalone installer did NOT work for this purpose (LINQ to SQL model browser). Only using the Visual Studio installer, and after a restart did the browser load.
I didn't update this answer immediately, so there may be something I'm missing; please add more detail if you encounter this issue.
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
I have an problem in Visual Studio 2010:
I created an custom user control, that show some data, then I tryed to add it on a page.
When I did this, this error showed up... when I run (start debugging) my application, everything works fine, the only thing that is not working is Visual Studio design view.
What should I do to solve this?
Your control is displaying data - if it tries to get that data from a remote database (for example) that's not available at design time then this could cause the problem.
You need to either modify your code to cope with the data source being missing (probably a good idea anyway) or wrap the code in a "is this design mode" check.
I've recently updated a project's Crystal Reports documents to the latest version (CR2008), these are the regular reports built into Visual Studio 2010 after installing Crystal Reports free version.
Having updated the reports, they wouldn't ask for parameters within a Windows Forms application. I managed to solve this by simply adding the parameter to the report so it was displayed (I assume this somehow refreshed the fact that there was a parameter available!).
However, the viewer now asks for the parameter but appears to ignore it when the report actually loads.
Has anyone got any ideas? I don't really want to have to make a parameter GUI for every single report and then pass them all through!
Thanks in advance.
Replacing the viewer control with the updated one appears to have solved the problem, even though they were both reading from the same reference!
I was looking around the net for a NUnit custom MSBuild task that would run on every build and also nicely play with Visual Studio UI (2008 is my version). I found MSBuild.Community.Tasks project that was great, but failed in Visual Studio integration part.
What I actually wanted to have is get failed tests displayed as warnings/errors in VS's error list window (and also FAILED project build when tests are not successful). So I wrote my own custom MSBuild task that does the job exactly how I wanted it to be.
BUT.
The only problem that I have is that normal VS UI error list behaviour is that when you click on an error it jumps to appropriate source file and highlights the problematic code. I was able to relate file and line number with failed test however I wasn't able in any way to persuade Visual Studio to HIGHLIGHT problematic code for me (when I double click the error). All I get is cursor in the right spot.
I tried all kinds of combinations of line, endLine, column, endColumn method parameters (Log.LogError()), but to no avail. And based on error output by compiler errors it looks like it also provides just line and column (no end values).
Anybody ran against this oddity and solved it?
Update 13 May 2009
You can get this project for free (without method selection) at
http://code.google.com/p/nunitmsbuildvsintegrated/
For this feature, you must create Visual Studio Integrated Package that display custom panel in Visual Studio. This custom panel will be called when your project is built.
Visual Studio Extensibility Developer Center
I have no solution to your exact problem, but have some thoughts.
Are you sure you want to run a full suite of unit tests at the end of each and every build? I personally find it to be a productivity killer. Rather, while working with code I tend to run a small subset tests which cover only the code in question, and this is where tools like ReSharper or TestDriven.NET come into play.
(source: jetbrains.com)