Posts

Showing posts from December, 2020

Enable "clr enabled" configuration

  -- check if CLR is enabled SELECT * FROM sys . configurations WHERE name = 'clr enabled'   -- Value field i.e 0 - disable, 1- enable -- For enable clr sp_configure 'show advanced options' , 1 ; GO RECONFIGURE ; GO sp_configure 'clr enabled' , 1 ; GO RECONFIGURE ; GO

Divide by zero encountered in SSRS

Expression for Divide by zero encountered =iif(sum(Fields!Beta.Value)=0,0,sum(Fields!Alpha.Value)/sum(Fields!Beta.Value)) =iif(sum(Fields!Beta.Value)=0,0,sum(Fields!Alpha.Value)/iif(sum(Fields!Beta.Value)=0,1,sum(Fields!Beta.Value))

SSRS Date expressions

 First date of Current Month =Today.AddDays(1-Today.Day) last date of Current Month =Today.AddDays(1-Today.Day).AddMonths(1).AddDays(-1) First date of Current Year =Today.AddMonths(1-Today.month).AddDays(1-Today.day) Last date of Current Year =Today.AddDays(1-Today.Day).AddMonths(13-today.month).AddDays(-1) Previous Month Last Date =DateAdd("d",-(Day(today)), Today) Previous Month First Date =dateadd(dateinterval.month, -1, today().AddDays(-(today().Day-1))) Beginning of Current Month (EOM) =DateSerial(Year(Date.Now), Month(Date.Now), 1) Beginning of Last Month (BOM) =DateAdd(DateInterval.Month, -1, DateSerial(Year(Date.Now), Month(Date.Now), 1)) End of Last Month (EOM) =DateAdd(DateInterval.Minute, -1, DateSerial(Year(Date.Now), Month(Date.Now), 1)) Note : Gathered from google. Thanks to all bloggers

Cannot convert unicode to non-unicode ssis OLEDB destination in SSIS

Image
Solution : 1. add data conversion transformation in package as shown in bellow 2. Select field which you have problem and change data type to DT_STR and provide length as shown in bellow. 3. Repeat 2 nd step for bellow error 4. Repeat 2 nd step for bellow error 5. Execute package

An attempt was made to set credentials for a data source ' ' associated with the report. Report data source settings are specified in a way that prevents credentials from being submitted to the report server. (rsDataSourceNoPrompt)

Image
 Solution : Step 1: Go to data source under report data Step 2 : Double click on data source  Step 3 : Click on build tab and provide connection string information as highlight in bellow Step 4: Click on test connection , problem will resolve