March 2008 Entries

SQL Server Reporting Services (SSRS): Databinding with CustomReportItem implementation

For my current project, I've been attempting something that would seem simple to do, but can't be done in Sql Server Reporting Services (SSRS). I am trying to draw 2 simple rectangles on the grid of a scatter (XY) chart. The reason for doing this is to visually indicate good and bad regions of data. But when the report is rendered (at least using the Html viewer) the rectanges I draw above the chart have moved. This is because items cannot overlap in the web viewer. I have come to find that I can create a CustomReportItem based on any...

ASP.NET MVC Error Handling

When working with the latest MVC release (Preview 2) I was having trouble working with the Application_Error event in global.asax. While this does work if you want to redirect to an html file, if you want to redirect to an aspx file you need to use the Controller.OnActionExecuted method. Here's an example: protected override void OnActionExecuted(FilterExecutedContext filterContext) { if (filterContext.Exception != null) { ...

ASP.NET MVC Custom Routing Logic

I've been working with the new ASP.NET MVC framework since the first CTP back in December. I love it and it keeps getting better.The application I'm working on uses custom Session management and so I have to manage the SessionId in the url myself. So I wanted to be able to make sure that all Redirects, Links and Urls had the SessionId. But I didn't want to have to add it myself (maintenance nightmare) and end up with having to track down errors from missing it.Because the routing framework builds the urls for you I wanted to interject my logic...

SARGable DateTime Handling in SQL Server

I can't believe I never thought of doing things this way before. It's so much better than concatenating strings and converting back and forth between varchar, int and datetime. I'd like to thank Marc for posting this jewel. Here's the link to the original content: Marc's Musings: More on DATEs and SQL.I'm including the actual functions below, just as a quick reference:SELECT DATEADD(dd, DATEDIFF(dd, 0, GetDate()), 0) As Today, DATEADD(wk, DATEDIFF(wk, 0, GetDate()), 0) As ThisWeekStart, DATEADD(mm, DATEDIFF(mm, 0, GetDate()), 0) As ThisMonthStart, DATEADD(qq, DATEDIFF(qq, 0, GetDate()), 0)...

ASP.NET AJAX - Update Panel Timeout

When using the asp:UpdatePanel server control for asyncronous communication with the web server the default timeout is 90 seconds. For some processes this may not be long enough. For example, I am currently working on a reporting application and at the moment I have to query a table with over 36 million records. Some queries take longer than 90 seconds. But unfortunately I had trouble finding out how to extend this. It turns out that this is a page-level setting. The asp:ScriptManager server control has a property named AsyncPostBackTimeout. Set this value to the number of seconds...

 

 

Copyright © Mark J. Miller