Here is an example of summing datetime, you could refer to it.
Xaml:
<Window.DataContext>
<local:ViewModel/>
</Window.DataContext>
<Grid>
<DataGrid ItemsSource="{Binding TestData}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Time1" Binding="{Binding Time1,StringFormat='HH:mm'}"/>
<DataGridTextColumn Header="Time2" Binding="{Binding Time2,StringFormat='HH:mm'}"/>
<DataGridTextColumn Header="TotalTime" Binding="{Binding Time3,StringFormat='HH:mm'}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
Codebehind:
Update:
<Window x:Class="BindDataFromRDLC.MainWindow"
...
xmlns:rdlcreport="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"
mc:Ignorable="d"
>
<StackPanel>
<DataGrid ItemsSource="{Binding TestData}" AutoGenerateColumns="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Time1" Binding="{Binding Time1,StringFormat='HH:mm'}"/>
<DataGridTextColumn Header="Time2" Binding="{Binding Time2,StringFormat='HH:mm'}"/>
<DataGridTextColumn Header="TotalTime" Binding="{Binding Time3,StringFormat='HH:mm'}"/>
</DataGrid.Columns>
</DataGrid>
<WindowsFormsHost Name="windowsFormsHost1" Height="400" >
<rdlcreport:ReportViewer x:Name="_reportviewer" />
</WindowsFormsHost>
</StackPanel>
</Window>
The codebehind:
The result:
----------------------------------------------------------------------------
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.