Monday, October 7, 2013

Default export name in the crystal report viewer

Solution 1:
Change ID of Crystal Report Viewer to whatever you want the filename to be.

Solution 2:
Set ID of Crystal Report Viewer to whatever you want the filename to be. like

CrystalReportViewer1.ID = "File name without Spaces and any weird characters";

DateTime to Text / String in Crystal Report

ToText({datefield},"[DATE FORMAT]")
DATE FORMAT EXAMPLES
ExampleOutput
dd-MMM-yyyy07-Oct-2013
dd/MM/yyyy07/10/2013

Removing / dropping / deleting a column from all tables in ms sql server

exec sp_msforeachtable 'alter table ? drop column COL_NAME'