Monthly Archives: April 2011

SSRS: How to implement build-in parameter based on external parameter passed from ReportViewer

Imagine following scenario: an SSRS report has a dropdown list “lookup” parameter based on a stored procedure. When report runs, user selects a value from the dropdown, clicks “View Report” and report is generated. The challenge is – the “lookup” parameter (and underlying stored procedure) needed to be filtered by another “filter” parameter – and this one is not available in SSRS interface, but instead is passed from ReportViewer control from an ASP.NET application.

In order to successfully implement this use case 2 items need to be addressed:

First in the report itself parameters need to be ordered in such way so “filter” comes before “dropdown”. Parameters can easily be arranged in Business Intelligent Development Studio, by expanding Parameters node, selecting a parameter, and using arrow buttons in Report Data menu.

Second in the ASP.NET application, configuring ReportViewer control (setting credentials, server URL, report path and our “filter” parameter) needs to be done in Page_Init event in the “If Not IsPostback” block.

Implementing getNextRow in WebDataGrid

UltraWebGrid had a very convenient getNextRow() client-side function which returns next row in row collection. WebDataGrid does not have an analog, but it’s pretty easy to recreate the functionality:

function getNextRow(i_oRow) {
      var iRowIndex = i_oRow.get_index();
      var aRows = i_oRow.get_grid().get_rows();

      return aRows.get_row(iRowIndex + 1)
}

This function accept grid row as a parameter, gets the row’s index and return row with incremented index from grid row’s collection.

Solution for ‘previousSibling’ is null or not an object error in grouped UltraWebGrid

Infragistics UltraWebGrid offers standard keyboard navigation for record selection. For example you can click a row, and holding Shift key press Down Arrow to select multiple records. This works fine for a flat grid, but try this with grid in OutlookGroupBy mode and you’ll get an error ‘previousSibling’ is null or not an object:

Error selecting records in grouped UltraWebGrid

After some digging I found the culprit. Continue reading →

Opening SpreadsheetML 2003 in Excel 2010

If you’re trying to open an Excel 2003 XML file (SpreadsheetML) in Excel 2010 and getting “The file is corrupt and cannot be opened” error, try opening that file in WordPad (it will open as text XML) and save it back. Now try opening it in Excel 2010 again. You will still get “The file you’re trying to open is in a different format than specified by the file extension” warning, but after that the file should open.

Changing hosting. Again

Two years ago I switched to BlueHost. For a while it’s been a beautiful run, but lately the service has become horrible. Constant downtimes, and when sites were up they we unbelievable slow. So after a couple of MySQL DBs export/imports, after moving DNS hosting to my registrar GKG.NET – it’s:

Goodbye BlueHost, Hello Feral Hosting.

Infragistics supports good old traditional values

Good news everybody, according to Infragistics product Roadmap, upcoming NetAdvantage 2011 Release will support Windows 3.0/3.1

Infragistics on Windows 3.1

Finally cries of countless developers who code on Intel 386 machines with 16Mb of RAM have been answered. There’s no more need to look with envy at those fancy 32bit OS-es – things like charts, gauges and grids (pictured below is a Windows 3.1 implementation of WebDataGrid with running totals and custom slider control) are available to everybody.

Infragistics WebDataGrid on Windows 3.1

Infragistics is known for innovations and being on the cutting edge. Kudos for not forgetting what got us there.