Wednesday, April 23, 2008

SSRS Group Headers

SQL Server Reporting Services reports implement group headers and footers by nesting lists within lists.

You specify the Group By parameter in the Grouping dialog.

E.g. Business Units -> Issues -> Treatments are implemented by nesting 3 lists, one within the other.

Size Matters?

Problem Description:

  • Is there a size limitation on importing an Excel column via ODBC?

  • I have a sheet that has a number of columns.  When I try to import it, I get “[Microsoft][ODBC Excel Driver]COUNT field incorrect “

  • I’ve narrowed the problem down to a column where each cell contains > 256 characters.  Does this matter?

  Problem Solution:
  • Even though the field contained text, when the ODBC reader attempted to grab it, it automatically deduced it was a Double field.
  • Hence, it couldn’t populate a Double field with Text data.
  • The solution was to simply format the cell as Text first, then let the reader do its work.

Tuesday, April 22, 2008

DropDownList won't change value

Before changing the SelectedValue of a DropDownList, you must first issue the DataBind statement to populate it!

D'oh!

OOP Definitions

Just for my own benefit really, I wanted to put the definitions down in my own words.

The 3 tenets (pillars?) of OOP are: Encapsulation, Inheritance & Polymorphism.

  • Encapsulation: instance variables can only be accessed by instance methods.  Objects cannot get directly at the internal data of other objects.
  • Inheritance: Sub-classes can inherit the behaviours of super-classes (and extend them).
  • Polymorphism: An object can send the same message (call the same method) on different objects.  It doesn't matter whether the methods perform vastly different actions; the interface is the same.

Have I grossly over-simplified?  Any other suggestions?  What about Abstraction?  Is that covered by Encapsulation or not?

Monday, April 21, 2008

MSDTC is Unavailable

Now that I'm using SubSonic, I've moved Transaction scope from a stored proc to my code.  Since my code needs to update 2 tables, I wrap it in a Transaction.  In order for Transactions to work, I need to turn on the Distributed Transaction Coordinator in Control Panel, Advanced Tools, Services.
I have made it an Automatic service now.
More information

Thursday, April 17, 2008

Follow up from my presentation

Here is the link to my PowerPoint presentations.
Adrian will put them up soon.
http://dot.net.nz/Default.aspx?tabid=101

Microsoft Certification and Creating a SSRS report

Wellington SQL Server Meeting Notice

Our next meeting will be:-

17 April 2008 6pm

Intergen

L7 Plunket House

126 Lambton Quay

(Lifts lock at 17:30. If you're late and there's nobody around to swipe you up, contact Adrian on 027 435 4050)

Topic 1: "Run-through: How to create and use a Microsoft SQL Server Reporting Services Report"

Topic 2: "SQL Server Certification: How do I do it, why bother and what are my options?"

Did you know there are 3 Microsoft Certified IT Professional tracks in Microsoft SQL Server 2005?  What are they, and why should I care?  James will give a clearly reasoned account why certification is for you.

Presented by James Hippolite, who has been a trainer, published reviewer and solution developer for over 20 years.  He first became a Microsoft Certified Professional in 1996, when it wasn't cool.  He woke up in 2001 and realised that remaining in Desktop Applications (specifically Microsoft Access) wasn't going to feed the kids and pay for cool technology, so purposefully changed career direction into Enterprise Applications (specifically VB front-end and SQL Server backend).

He lives in Wellington and is currently employed full time in a large corporate and loving the regular hours that non-consultants enjoy.

Pizza and drinks are being provided with the kind courtesy of Microsoft.

Seating is limited to the first 50 registrations.

Please advise on adey11@gmail.com if you will be attending?

Please DO NOT reply to this email?
More information

Monday, April 14, 2008

WST Apps and Authorisation / Authentication

We had a work problem. It was this:

  • COE (common operating environment) calls for IE to reject scripts.
  • we had a login process which used a Windows Scripting Host object to obtain the users Windows signon
  • ergo, occassionally, Network Ops would refresh the COE and our apps would cease their auto-login.
Here is the resolution:
  • Web.config:
    • authentication mode=”Forms”
    • Identity impersonate=”true”
    • authorization deny="?"
  • You need a login page, so that we can authenticate against the database and retrieve the users’ roles.
  • But, you don’t need the Windows Scripting Host script anymore, since WindowsIdentity.GetCurrent().Name now works with the above combination of web.config attributes
  • This will enable NT authenticated access, single sign-on, for any user without adding them to our server(s)
  • If you also want to enable SQL Server Reporting Services, you must further:

Thursday, April 10, 2008

Compiler Error: Can't find 'Eval'

I just learned a new factoid:

If I copy a page and rename it, but don't rename the Class name, then the two pages will compile and run in DEV but not in TEST.

The error message was bizarre: couldn't find the Eval or Bind verbs.  When I fixed these, then it couldn't find the Title or MasterPageFile attributes.  This got me thinking.

The solution of course was to rename the second class name to something unique.