Report Builder – Logon failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)

Another potentially easy one to fix. When you know how…………..

I received the error “Log on failure: unknown user name or bad password. (Exception from HRESULT: 0x8007052E)” recently when trying to ‘run’ a report in Report Builder. From what I can gather, it has everything to do with the configuration settings for SQL Server Reporting Services.

Report Builder Logon Failure

Report Builder Logon Failure

Here are the steps to fix the issue:

  • Open the Reporting Services Configuration utility (Start > Programs > Microsoft SQL Server 2005 > Configuration Tools > Reporting Services Configuration).
  • Connect to the Report Server Instance that you are working with.
  • Go to the Execution Account settings.
  • Either uncheck ‘Specify an Execution Account’ OR Specify an account that is to be used (in my case I used a Windows account and password – as my set up uses Windows Authentication only)

Setting the Execution Account for Report Server

Setting the Execution Account for Report Server

Try running the report in Report Builder again, it should work.

Create Your Own Reporting Services Templates

Haven’t I done this before?

As a Reporting Services Developer you may have found yourself completing the same tasks over and over for each new report that you create. To alleviate this somewhat, you may have just done a quick ‘Copy & Paste’ of an existing report, renamed it and then modified all the elements within it. The trouble with doing this is that there are always a number of properties/expressions that may have been used in the copied report that tend to be obscure (such as dynamic sorting on columns in a table) and you end up having to hunt down a number of errors and fix them one by one.

It is much better/easier/faster/less frustrating (& should probably be labelled under ‘Best Practices’) to create a number of SSRS templates of your own that you can use over and over again in each of your projects. It may be a simple template that includes a header & footer formatted to fit either landscape or portrait page layouts (optimally sized for printing), with text/backgrounds formatted to the way you want then. It may also be as complex as you like, adding in pre-formatted tables/matrices, charts, etc. I have found creating my own SSRS templates to be incredibly useful and highly recommend it. I have made two basic templates available here (right-click>save as…). It is a zip file containing two .RDL files, 1 Landscape template, 1 Portrait template. Unzip the file to the directory indicated in the steps below to have access to them through BIDS. Note – these are for SSRS 2005.

Here’s how to create your own templates:
1. Open or create a new project and create a new report item.
2. Design the report to your specification, as described above (& see Fig 1. below)

Fig 1. Standard Design Template

Fig 1. User Designed Template

3. Save the report
4. Navigate to the folder where the .rdl file (that has just been saved) is stored.
5. Cut/Copy the file to the following location (giving the file a useful template-friendly name):

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject

This is the default location of the templates folder. If you have installed Reporting Services on a different drive/directory update these references to reflect the different Drive/Directory. Now, to access the report template from any project, go back to BIDS, right-click the ‘Reports’ folder (in the Solution Explorer) in your project and choose Add>New Item

Fig 2. Add New Item Menu

Fig 2. Add New Item Menu


and you will see your new templates under the heading ‘Visual Studio installed Templates’.

Fig 3. Select the New User Designed Template

Fig 3. Select the New User Designed Template

Centralized Style Sheets for your SSRS Reports

For those of you who would like to take the standardization of Report Design further, there is a great article over at SQL Server Central that describes how to set up Style Sheets for Reports. This means that if a change needs to be made to the design (formatting) of an entire suite of reports, then it can be done in one place and propagated across all of your reports. I highly recommend this article.

Have you found any other innovative ways of reducing the time it takes to produce reports?

Let’s hear from you.


The Documentation Debacle

I have read quite a few blog posts over the last few weeks on documentation. Some of the posts are specific to SQL Server, some are more general in their approach choosing to explain why documentation is good practice and indeed necessary, why it is not just important to have documentation, but to have good documentation. There are also those that try to explain why people choose not to do documentation. They are all good posts in their own right, but only a few of the posts I have read take a moment to actually detail HOW they go about creating (& maintaining) their documentation.

People will find excuses (I have been one of them) not to do their documentation – on whatever subject/system/process/application. These may be:

  1. I don’t have the time.
  2. It’s not my responsibility.
  3. I am not a technical writer.
  4. Where do I begin?

Whilst I am sure that there are organisations that have numerous procedures in place for rigorous documentation of systems & processes, coding standards & conventions, there are (I am sure) many many more (smaller) organisations that have little or no documentation. At the very least, it’s a collection of random text files, word docs, Visio diagrams placed in any number of directories. Most of the knowledge of the way things work is stored in a few key employees heads. Whilst this may seem like a position of power to the employee (they’re ‘irreplaceable’), the organisation is taking a huge risk. As an asides, someone once told me “If you can’t be replaced, you can’t be promoted”. It is worth remembering.

Excuse #1            I don’t have the time.

More than likely, this is a cover-up for Excuse #4. There is always pressure to get projects finished as soon as possible, and that means the solution needs to go into production yesterday. Documentation is sometimes relegated to a date beyond that of the ‘go live’ deadline. And then as soon as you begin putting ‘pen to paper’ on the handover documents a new project comes along and documentation, once again, becomes a dim-and-distant memory.

Excuse #2            It’s not my responsibility

Oh yes it is. Trust me, if you ever want a holiday where you are not on call, it’s your responsibility to ensure that whoever is to hold down the fort, has the information they need to do so. Hands up all those who have accrued two years’ worth of leave because they were the only ones capable of maintaining their systems? I have known several colleagues who were in this position.

If you are building or administrating a system, you are responsible for imparting that knowledge to others. How you do this is another matter entirely.

Excuse #3            I am not a technical writer

This doesn’t matter. Whilst it is important to have good documentation, it is better to have something rather than nothing. If your organisation is yet to standardize documentation practices, this is your chance to take the initiative and show what you are worth.

Excuse # 4           Where do I begin?

I am willing to wager that this is the category that a lot of people will fall into. What needs to be included in the documentation? What level of detail is required? Who is the target audience? There are so many questions. As a developer/DBA/sysadmin it can be difficult to imagine what it is other people need to know in order to accomplish certain tasks. Assumptions are made, and then it all goes terribly wrong.

What am I getting at?

I believe that all of the excuses outlined above can be dropped if it was easier to create documentation. This focuses on the How. I have searched high and low for templates that can be used for a number of things, ranging from Database dictionaries & descriptions, system processes and procedures, development standards & conventions, reporting services templates/design standards, integration services standards & consolidation, the list goes on. I have had to settle with creating my own, and they always being improved, but by no means are they perfect.

How many of you would complete documentation if it were a matter of checking boxes and filling in blanks? If you had a template for, say, technical details of an integration services package,  I am sure that you would be more inclined to fill it in and therefore share the knowledge of that particular solution.

I am asking the community to collaborate, in whatever your speciality is, to share your documentation methods, templates, best practices. I would like to start a wiki of sorts that provides this information to everyone. Something that can grow from the community, for the community.

If you are interested in helping to get this started, email me, Tweet about it, DM me, or simply leave a comment. I am certain this could be a huge resource and one that would ultimately assist many people/organisations to centralise their knowledge base.

Some links to other posts on documentation:

The JOIN() Function in SSRS

BOL’s description of the JOIN() Function: “Returns a string created by joining a number of substrings contained in an array.”. The syntax of the function is as follows:

=JOIN(List [,delimiter])

List – Required. One-dimensional array containing substrings to be joined

Delimiter – Optional. String character used to separate substrings. If omitted, a space “ “ will be used.

So, the JOIN() Function concatenates an array’s values, using either a default space or the specified separator (for example, “, “) to separate the values.

What are the practical uses of this function as it relates to Reporting Services?

A common use of the function in Reporting Services is to display the values being used in a Multi-valued Parameter. You may for example have a report that has a parameter that filters Sales Regions. A requirement of the report is to display, in the header, the Sales Regions that the report is for. In the header of the report you would include the following expression:

=”Monthly Sales Report, for Regions:  ” & JOIN(Parameters!SalesRegion.Value, “, “)

Previewing this in the report with the following regions selected from the SalesRegion Multi-Value Parameter:

  • North America
  • South America
  • Southern Africa

Will result in the following Header string:

Monthly Sales Report, for Regions:   North America, South America, Southern Africa

I have mentioned this function here as I find it very useful and have used it on many occasions. The above use is only one of many, but for me, is the most common.

24 Hours of Free Learning

24 Hours of PASS

Since I am always up for anything that is free, and particularly when ‘Free’ includes learning, I signed up for a bunch of sessions from the 24 Hours of PASS, due to be held on September 2nd 2009. This event is a series of 24 hour-long SQL Server based sessions by a number of Industry professionals. I even took the day off work so that I could attend!

Registration opened yesterday and I have signed myself up for the following sessions:

  • Session 01 (Dev): 10 big ideas in Database Design (Paul Nielsen – site twitter)
  • Session 08 (Dev): Tips & tricks for writing SET based queries (Jacob Sebastian – blog)
  • Session 10 (Dev): Working with Spatial Data in SQL Server 2008 (Greg Low – blog twitter)
  • Session 11 (DBA): Effective Indexing (Gail Shaw – blog)
  • Session 12 (BI):  SSIS Tips & Tricks (Simon Sabin – blog twitter)
  • Session 14 (BI): Reporting from Analysis Services Cubes Using Excel 2007 (Peter Myers)
  • Session 15 (BI): Data Warehousing Laying the Foundation to Success (Erik Veerman – blog)
  • Session 17 (PD): Building a Better Blog (Steve Jones – blog twitter)
  • Session 18 (Dev): Building Flexible Data Services for the Web using ADO.NET Data Services Framework (Artemakis Artemiou – blog twitter)
  • Session 20 (BI): Loading a Data Warehouse in SSIS (Brian Knight – blog twitter)
  • Session 24 (BI): Embed reporting Services into your Applications (Jessica Moss – blog twitter)

I have chosen these as they are the ones I am most interested in (BI/Dev focus), as well as the fact that they are during a decent time slot (not 0100 – 0600). Am thoroughly looking forward to it!!

To see the speakers/sessions and register for 24 Hours of PASS go here

.