Posts

Showing posts from August, 2011

Setting Default Value of a Parameter to NULL in SSRS Report

If  want to Set the default value of a parameter to null then right click on parameter and select parameter properties . In GENERAL tab check Allow null value .Then click on DEFAULT VALUES tab, select the radio button of specify values . click on Fx button. A dialogue box open for writing formula. Write the formula "= nothing"  (without double quotes)  and click OK. Now your report will automatically take the Null value for that parameter. This is mostly used for date-time parameters and also used when you have to pass report parameters from Application (asp page).

Combine Common in Comma separated row

 SELECT taf_no, SUBSTRING((SELECT ','+ CAST(dtafdet_from AS VARCHAR)+','+dtafdet_to             FROM CTE B             WHERE A.taf_no = B.taf_no             FOR XML PATH('')              ),2,100)As Temp                         FROM CTE A GROUP BY A.taf_no