May 7th, 2008
I’ve encountered a problem using SQL Server Reporting Services 2005 (I am using SSRS from an ASP.NET application). Underlying stored procedure can return different number of fields depending on one of the parameter. I.e. if that parameter is NULL the fields returned are
A B C
if that parameter is “1″, the fields returned are:
A B C D_1
if that parameter is “1,2″, the fields returned are:
A B C D_1 D_2
etc. And I need to be able to use those fields with the report (in particular - I need to group on them). But report’s dataset has a fixed number of fields based on original query and new dynamic fields are inaccessable.
The solution is to modify report definition. I am already doing it to insert custom groups in the report, and reports dataset is exposed via definition as well. The definition can be downloaded via GetReportDefinition of SSRS Webservice and serialized into a class (See Tutorial: Updating Reports Using Classes Generated from the RDL Schema for more details). The DataSet in that definition contains array of fields that can easily be resized in code to accomodite for new fields. This way the fields in the definition will match fields returned by the query and can be accessed within the report.
Posted in Code Corner | No Comments »
February 15th, 2008
Quick tip: You can’t do it directly trhu element.value=’something’, but you can set its outerHTML property to the full tag code for the <input type=file> element, complete with value.
Posted in Code Corner | No Comments »
February 14th, 2008
Сегодняшняя фраза просто убила. Еле сдерживаю истерический смех:
xxx: я думал что не пью. но найденная в истории поиска фраза “сраный нижний овощной олень” заставила в этом усомниться…
Posted in Humor, Russian | No Comments »
February 13th, 2008
The Brooklyn Bridge, one of the oldest suspension bridges in the United States connecting the New York City boroughs of Manhattan and Brooklyn. It’s history you can read in Wikipedia, the free encyclopedia
Below is a list of interesting events in the history of the Brooklyn Bridge:
- 1884: P.T. Barnum demonstrated the safety of the bridge by parading across it with a herd of 21 elephants.
- 1885: Robert E. Odlum was the first man to jump off the bridge, but did not survive the fall. (Contrary to popular belief, Steve Brodie did not jump off the bridge. He merely pulled off a publicity stunt in order to attain fame.)
- 1974: Jimmy Weber, a young restaurant worker, decided to imitate Spiderman and scamper up and down the cables 120 feet above the roadbed. Police followed him on a wild chase.
- 1974: Mario Manzini, dressed like Elvis Presley, tried to jump off the bridge in handcuffs to prove that he was the best escape artist since Houdini. Police thwarted this escape attempt
- 2001: On undoubtedly the saddest day in the history of the bridge (and of New York City), thousands of people fled by foot across the bridge to escape the destruction at the World Trade Center.
- 2006: City workers conducting a regular bridge inspection found a cold-war era supply chamber inside the foundation near the Manhattan shoreline. More than 350,000 items, including half-century-old water drums, food canisters, and medical supplies were found inside the chamber. The supplies were to have been used in the event of a nuclear attack on New York City.
Posted in Bits and Pieces | No Comments »
January 30th, 2008

I was working with Infragistics WebHtmlEditor control, and on client side it was being moved around by appendChild, removeChild DOM methods. All worked fine until I tried it over SSL connection. Immediatly removeChild method cause Secure/Unsecure waring you see above. Digging a bit I found that it was an IE bug. According to Microsoft this problem occurs if the Web page script calls the removeChild method to delete a DIV element that references a background image, and they suggest either to set outerHTML of the DIV to an emtpy string (which I think is dumb if you still need to use element you removed), but their second solution to move background-image declaration into an external CSS class actually works. In reality this problem occurs not only with DIVs but with any HTML element with background image in its inline style. In my case WebHtmlEditor rendered itself as an HTML table and its cells had background-image specified. The control itself didn’t have corresponding images set, but its UseDefaultStyles property was set to BackrgoundImages - which resulted in rendered styles with background images. To apply modified Microsoft’s solution I set this property to None, then segregated background image into a separate class:
.HTML_EDITOR
{
background-image:URL(ig_common/images/htmleditor/backimagerow.gif)
}
and used that class in Toolbar and TabStrip CSSClass properties. Worked like a charm.
Posted in Code Corner | No Comments »
January 24th, 2008
It’s coming Christmas 2008! The story will focus on the earliest adventures of James T. Kirk and Spock, and will also feature appearances by the main characters from the original series.
Official sites:
http://www.paramount.com/startrek/
http://www.startrek.com/startrek/view/series/MOV/011/index.html
Posted in News and Announcements | No Comments »
January 17th, 2008
Had a weird error today in my MS SQL Query that had worked for months.
Cannot sort a row of size 8304, which is greater than the allowable maximum of 8094
The only difference - a few text fields the query returned had larger amount of data than usual. What saved my day is ROBUST PLAN hint, when I added OPTION(ROBUST PLAN) to my ORDER BY clause - the query ran perfectly. So if you ever experience similar problem (usually it happens when you join several tables with large sets of data) try this approach.
For detailed explanation of ROBUST PLAN and other hints visit Microsoft Tech Net
Posted in Code Corner | No Comments »
January 16th, 2008

This JavaScript VectorGraphics library provides graphics capabilities for JavaScript: functions to draw circles, ellipses (ovals), oblique lines, polylines and polygons (for instance triangles, rectangles) dynamically into a webpage. Usage of this Vector Graphics library should be easy even if you don’t have JavaScript experience
This is very cool. This javascript graphics libary allows you to draw pretty much any shape, image or text directly into HTML without 3rd party plug-ins like Flash. Speed is amazing and it’s cross-browser compatable too. Get it at http://www.walterzorn.com
Posted in Code Corner | No Comments »
January 10th, 2008
This is bread with soft crast, great for toasts. Easy to make and great for shaping. It’s vatrushki (Russian curd pies) near the loaf.

1 1/4 cups lukewarm milk
1 1/2 teaspoons salt
1 teaspoon sugar
3 1/2 cups bread flour
2 teaspoons dry yeast
egg glaze, made with 1 egg and 1 tablespoon milk
Sprinkle yeast and sugar into 1/2 cup of milk in bowl. Leave for 5 minutes; stir to dissolve. Stir in half of remaining milk. Mix flour and salt in large bowl. Make well in center and pour in dissolved yeast. Mix in flour. Stir in reserved milk to form a sticky dough. Turn dough out onto lightly floured surface. Knead dough until smooth and elastic, about 10 minutes. Put dough in clean bowl and cover with dish towel. Let rise for 45 minutes. Punch down, cover and let dough rise again until doubled in size about 45 minutes.
Grease an 8 x 4 x 2 1/2 inch loaf pan. Shape dough into an “S” shape by shaping dough into a long loaf. Brush top of loaf with egg glaze. Bake in preheated 400F oven for 45 minutes until golden.
Ultimate Bread
Posted in Recipes | No Comments »