SQL Server 2005 Reporting Service (SSRS) EnableClientPrinting

This post was originally on a friend of mine blog: C# Conspiracy. I wanted to move it here and make sure he got his due recognition. The link to his site is over to the right under Blogroll.  Now for the verbaige.

So I received a new requirement to disable the client-side printing of the reports in my application. The reports are generated in SSRS which manages the client printing control via the toolbar displayed at the top of the report page. No problem I declared.

Unfortunately I did not realize that the SSRS server I inherited did not have an account with administrator privileges. Apparently the builtin\adminstrators account has been removed and an admin account wasn’t added to replace it. (I’m still looking for the means of adding a new system administrator to the service.) In the meantime I was able to disable the client-side printing by setting the value column of the EnableClientPrinting row of the configurationinfo table in the reportserver database to false from true. The configurationInfo table maintains a copy of several of the parameters for the report service that you can manually change if you have access to the db. Glad I found this workaround! Still looking to get back admin…

Hope this helped someone. Have fun coding and as always, if there are any questions or suggestions, they are always welcome. Thank you.

Finding duplicates in a column with SQL query

Need to find a duplicate in a column? You can use a query like this:

select accountID, COUNT(accountID) AS NumOccur
FROM myTable
group by accountID HAVING (COUNT(accountID)>1)

Any duplicates will be returned. That easy :)

~Wayne

Learning MVC: LINQ to SQL

I am in the process of watching a video about pulling back records form a database using LINQ to SQL.  This is new functionality that comes in .NET 3.0 or 3.5 (not exactly sure which one). I do know MVC is not available to use unless you have Framework 3.5 installed so we will go with that anyway. I was just looking at a video that indicate there are two ways to run a ‘query’ using LINQ to SQL.  Below are the two ways. We were working with movies so the queries are for movies. Here they are:

 

Query Syntax:

Dim movies = From m In dataContext.Movies Select m

 

Method Syntax:

Dim movies = dataContext.Movies.Select(Function(m) m)

 

Both of the statements pull back all rows from the movies table. Pretty crazy if you ask me.  I personally like the first statement.  It is easier to read in my opinion.  I will be venturing into learning MVC with the help of several people (Scott Guthrie, Stephan Walther, and Scott Hanselman amoung others [Google]). I don’t think there are many books out on it yet.  I am usign MVC release candidate currently. As I go through the steps of learning I will post what I learn. I will also post the steps to getting to this point at a later date. Have fun coding and as always, if there are any questions or suggestions, they are welcome. Thank you.

Posted in MVC. Tags: , , . 2 Comments »
Follow

Get every new post delivered to your Inbox.