Pages

Thursday, October 30, 2014

deepstutorials:How to remove unused Usings using visual studio



To remove the unused Usings ,Visual Studio provides a shortcut i.e You can do this by right clicking in the file, click Organize Usings, and then click Remove Unused Usings as shown in the below snapshot.






how to generate getters and setters in visual studio



My requirement was to generate 10 properties in the following format

public int ID { get; set; }

Visual studio has an shortcut for this, just type prop and then hit tab twice .


How to restore the default layout in Visual Studio



 Sometimes we keep changing the layouts and get lost trying to restore the default layout .Following is a way to do it.

Navigate to Window->Reset to Window Layout(ALT+W,R).
Click YES on the prompt box as shown below.






What is the difference between landscape and potrait orientation?

The orientation can be applied to printed documents, viewing documents , digital photos etc.Page orientation has 2 common types of orientation.

                                       Potrait (vertical orientation)





                                      Landscape (horizontal orientation)


Tuesday, September 9, 2014

Add custom code to report builder/SSRS



Sometimes ,your requirement may not be done with the default functions or custom expressions.This is when the custom code comes into picture.Following are the steps to embed the custom code in the Report builder/SSRS

1.In Design mode,right click outside the border of the report and click on Report properties
2.Click on code
3.Add the custom code to the window as shown below.
4.Click Ok.(Errors are only shown when you run the report)
5.Following is the way to call the code  in the  corresponding cell of the report.


=Code.BatchServiceStatusString(Fields!BatchServiceStatus.Value)


                The meaning of the above code snippet is for the corresponding Fields!BatchServiceStatus.Value there would be a corresponding return value based on the condition satisfied.


Thursday, September 4, 2014

To hide static columns in a matrix, list , or table(Report Builder/SSRS)



  1. In Design view, select the table, matrix, or list to display the row and column handles.
  2. Right-click the column handle, and then click Column Visibility.
  3. In the Column Visibility dialog box, follow the below steps
  4. In When the report is initially run, specify whether to hide the item when you first view the report:
    • To display the item, click Show.
    • To hide the item, click Hide.
    • To specify an expression that is evaluated at run-time, click Show or hide based on an expression. Type the expression or click the expression (fx) button to create the expression in the Expression dialog box.