Thursday, 20 August 2015

What is set Datasource location ?

Set Datasource Location is used to change or update the datasource of the report.

To use Set Datasource Location,
1. Right Click on Database Fields in Field Explorer.
2. Click Set Datasource Location
3. Choose the specific table or datasource in Current Data Source.
4. In Replace with box, you may create new connection for the updated table.
5. Click Update.

How to apply conditional formatting color in crystal report.

1. Right Click on the specific text object
2. Click Highlighting Expert
3. You may click New button
4. In Item editor box, you can set which field for which criteria and value.
5. Then for format, you can set Font Style, Font Color, Background and Border.



How to call stored procedure with parameters in VB.Net

cmd = New SqlCommand

        With cmd
            .Connection = con
            .CommandType = CommandType.StoredProcedure
            .CommandText = "ProProdDaily" //(StoreProcedure Name)
            .Parameters.Add("@vFDate", SqlDbType.DateTime).Value = frmRptProductionOpt.dtpProRptFDate.Text
            .Parameters.Add("@vTDate", SqlDbType.DateTime).Value = frmRptProductionOpt.dtpProRptTDate.Text
            .ExecuteNonQuery()
        End With