Wednesday, November 16, 2011

Maps in SSRS 2008 R2

We don't want to use Dundas Maps anymore, so I started using the maps provided by Microsoft within SSRS 2008 R2. The first problem I encountered is an error while I try to preview the map:
"Map1 was detected in the report. SQL Server 2008 Reporting Services does not support map report items"
The solution is here

Monday, October 24, 2011

Nature and Landscape Photography, by Martin Borg, O'Reilly Media

This post is not at all about a problem in SQLServer or compiling issues but a book review. Why ? Because is all about enjoyment. In “Nature and Landscape Photography” Martin Borg is presenting a very nice collection of tips for better photography in the outdoors.
Out of many photography books, I was attracted by this one because is written by a Swedish photographer. As nature photography is one of my hobbies, and considering I leave in Stockholm, I was expecting subjects, magical hours and type of landscape to be similar to what I encounter here around Stockholm, and I was not disappointed. This is an easy lecture of 71 short tips from Martin Borg, illustrated with his own pictures. A nice feature is the editor’s insertion of details about each photography. A beginner to intermediate amateur can really benefit from this tips. Many of them are indeed not new, but some are very interesting.
I would’ve probably preferred to have more technical details and more of compositional hints, as well as a little bit of the way the photographer reached to that composition or developed the idea that led to the image. But this is not a manual of photography, is just a collection of tips.
With this book Martin Borg manages to make you wish to go out in the nature and practice the tips (which I did, taking advantage of the nice autumn weather that we had during the first week-end after reading the book). Don’t be scared if you don’t own a Hasselblad camera like the author does, with a decent SLR and a stable tripod you can still reach good results.
For me, the book was useful for a couple of ideas that I probably read before but I was neglecting, some new hints (like breathing on lens, playing with fantasy vs. reality, revealing nature’s strength), as well as for triggering my interest for using neutral density filters.
All in one, the book is a useful and enjoyable reading. I already recommended it to a friend who’s starting with photography.

Friday, August 19, 2011

Canot debug clickonce app

I have a  .NET app that used to work. Now I stumble upon this very annoying problem. I cannot debug.

---------------------------
                Microsoft Visual Studio
                ---------------------------
                The following module was built either with optimizations enabled or without debug information:

                C:\[....].DLL

                To debug this module, change its project build configuration to Debug mode. To suppress this message, disable the 'Warn if no user code on launch' debugger option.
                ---------------------------
                OK  
                ---------------------------
I've seen the proposed solution here, but this just suppress the error message.

VisualStudio 2008

Any ideas ?



Monday, July 25, 2011

stuff

Well, I often need to create a comma-separated list out of values in a table.
here I found this pretty ellegant sollution:


STUFF(

(

SELECT ', ' + Supplier_ID

FROM SomeTable

join SomeOtherTable

on Something

WHERE SomeCondition

FOR XML PATH('')), 1, 1, '') as AllSuppliers

Thursday, June 16, 2011

Execution order differs with rendering mode

Today our tester found a big saying "Incorrect numbering of the tables in the PDF export".
The issue is that we have a custom code function incrementing a number and than returning the resulting number. It starts from 0 and it'll return 1 first time it is called, 2 afterwards, 3 and so on. It works fine when my report renders in HTML, but not when it renders as PDF. The first table is numbered with 5 and the rest are numbered in order 1 to 4

The only difference between the first table and the rest is that the first table displays the table number in a row, while for the rest I had to add a text box above the table.

Apparently, the execution order of custom code is different when report is rendered in browser vs when it renders as PDF. I did a simple test by creating a test report, with just a matrix, a table and a text box and the textbox is indeed rendered first (it executes the custom code first). Only after, the tablixes are rendered

Wednesday, May 18, 2011

SSRS 2008 incorrect number of TablixCornerCell

I got a "nice" error today , while working on a report converted from SSRS 2005 to SSRS 2008.

Error 1 [rsWrongNumberOfTablixCornerCells] The tablix ‘matrix4’ has an incorrect number of TablixCornerCell. The number of TablixCornerCell within TablixCornerRow at index: 0 must equal the number of levels in the TablixRowHierarchy containing TablixHeaders.

Update , 2012-02-10: I fixed the problem by simply reading carefully the error message. All I did was adding an empty <TablixCornerCell></TablixCornerCell> into the <TablixCornerRow>

Wednesday, May 4, 2011

Sometimes VS 2008 cannot access DataSource file

Today, for the second time since we started using SSRS 2008 I had the following stupid error:
Running a dataset works from VS designed, but when I try to run the report (again, from the VS2008 designer) I get errors (DS couldn't be run)

After little investigation I realize that the problem is in fact that the report cannot be built. I had VS2008 access to RDS file denied. this is not a read-only file, is checked-out, so VS should be able to access the file and change it.
However, VS keeps telling that access to {MyReportsFolder}\bin\Debug\{MyDataSource.rds} is denied
The only way I found to fix this was to delete the folder {MyReportsFolder}\bin and rebuild.

Weird...

Friday, January 14, 2011

Error in SSIS VS2005

Yesterday I had to put some code into SSIS packages.
Being a lazy person, what I usually do is copying one of the existing task ("Execute SQL Task") and changing the name and the code itself. Apparently after installing VS2005 SP1 this was not working anymore.

I had to create every "Execute SQL Task", set the connection, etc....which is not a lot but is slower than what I was used to.

The error message I was receiving while trying to copy was "An error occurred while objects were being copied. SSIS Designer could not serialize the SSIS runtime objects". A fast google search revealed this page and the easy fix by jaegd:

Register the xml parser dlls with the below commands.

regsvr32.exe msxml3.dll
regsvr32.exe msxml6.dll

It really worked and fixed my problem, but lets me wondering why Microsoft didn't fix it and release a SP2 with all this fixes.