1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Public Sub GetReportLeadTimeOne(ByVal reportKpi As KPIName, ByVal reportPath As String, criterionNormal As List(Of Criterion), criterionOnHolds As List(Of Criterion), criterionAll As List(Of Criterion))
Try
Dim listKpiNormal As List(Of KPILeadTime) = KPIStatsFactory.getInstance().GetKPIFleetOperations(acUser.Applications.FirstOrDefault(), criterionNormal, reportKpi)
Dim listKpiOnHolds As List(Of KPILeadTime) = KPIStatsFactory.getInstance().GetKPIFleetOperations(acUser.Applications.FirstOrDefault(), criterionOnHolds, reportKpi)
Dim listKpiAll As List(Of KPILeadTime) = KPIStatsFactory.getInstance().GetKPIFleetOperations(acUser.Applications.FirstOrDefault(), criterionAll, reportKpi)
reportViewer.Reset()
reportViewer.LocalReport.DataSources().Add(New ReportDataSource("NormalLeadTime", listKpiNormal))
reportViewer.LocalReport.DataSources().Add(New ReportDataSource("OnHoldsLeadTime", listKpiOnHolds))
reportViewer.LocalReport.DataSources().Add(New ReportDataSource("AllLeadTime", listKpiAll))
reportViewer.Visible = True
Dim reportParameter As List(Of ReportParameter) = New List(Of ReportParameter)
reportParameter.Add(New ReportParameter("January", acUser.getResource(ResourceConstants.ResJanuary)))
reportParameter.Add(New ReportParameter("February", acUser.getResource(ResourceConstants.ResFebruary)))
reportParameter.Add(New ReportParameter("March", acUser.getResource(ResourceConstants.ResMarch)))
reportParameter.Add(New ReportParameter("April", acUser.getResource(ResourceConstants.ResApril)))
reportParameter.Add(New ReportParameter("May", acUser.getResource(ResourceConstants.ResMay)))
reportParameter.Add(New ReportParameter("June", acUser.getResource(ResourceConstants.ResJune)))
reportParameter.Add(New ReportParameter("July", acUser.getResource(ResourceConstants.ResJuly)))
reportParameter.Add(New ReportParameter("August", acUser.getResource(ResourceConstants.ResAugust)))
reportParameter.Add(New ReportParameter("September", acUser.getResource(ResourceConstants.ResSeptember)))
reportParameter.Add(New ReportParameter("October", acUser.getResource(ResourceConstants.ResOctober)))
reportParameter.Add(New ReportParameter("November", acUser.getResource(ResourceConstants.ResNovember)))
reportParameter.Add(New ReportParameter("December", acUser.getResource(ResourceConstants.ResDecember)))
reportParameter.Add(New ReportParameter("Year", acUser.getResource(ResourceConstants.ResYear)))
reportParameter.Add(New ReportParameter("LastYear", acUser.getResource(ResourceConstants.ResLastYear)))
reportParameter.Add(New ReportParameter("Label", acUser.getResource(ResourceConstants.ResLabel)))
reportParameter.Add(New ReportParameter("Normal", acUser.getResource(ResourceConstants.ResNormal)))
reportParameter.Add(New ReportParameter("OnHolds", acUser.getResource(ResourceConstants.ResOnHolds)))
reportParameter.Add(New ReportParameter("Volumes", acUser.getResource(ResourceConstants.ResVolume)))
reportParameter.Add(New ReportParameter("LeadTimes", acUser.getResource(ResourceConstants.ResLeadTimes)))
If (KPIName.KPILeadTimeOne = reportKpi) Then
reportParameter.Add(New ReportParameter("Title", acUser.getResource(ResourceConstants.ResTitleLeadTime1)))
Else
reportParameter.Add(New ReportParameter("Title", acUser.getResource(ResourceConstants.ResTitleInternationalLeadTime1)))
End If
reportViewer.LocalReport.ReportPath = reportPath
reportViewer.LocalReport.SetParameters(reportParameter)
reportViewer.LocalReport.Refresh()
Catch ex As Exception
MsgRequest.Text = ex.Message
End Try
End Sub |
Partager