Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 3.54 KB | None | 0 0
  1.   Private Sub CreateReport()
  2.             If mySearchFlowVariables Is Nothing Then
  3.                 Return
  4.             End If
  5.             Dim countOnlineParam As Integer = 0
  6.             Dim countPredParam As Integer = 0
  7.  
  8.             For Each countParam As Parameter In mySearchFlowVariables.selectedParams
  9.                 If countParam.listType = ListType.SingleValue Then
  10.                     countOnlineParam += 1
  11.                 ElseIf countParam.listType = ListType.PredictedValue Then
  12.                     countPredParam += 1
  13.                 End If
  14.             Next
  15.  
  16.             Dim onlineParam(countOnlineParam - 1) As Parameter
  17.             Dim predParam(countPredParam - 1) As Parameter
  18.             Dim allParamInList As New ArrayList
  19.             Dim iOnline As Integer = 0
  20.             Dim iPred As Integer = 0
  21.  
  22.             For Each param As Parameter In mySearchFlowVariables.selectedParams
  23.                 If param.listType = ListType.SingleValue Then
  24.                     onlineParam(iOnline) = param
  25.                     iOnline += 1
  26.                 ElseIf param.listType = ListType.PredictedValue Then
  27.                     predParam(iPred) = param
  28.                     iPred += 1
  29.                 End If
  30.  
  31.             Next
  32.             allParamInList.Add(onlineParam)
  33.             allParamInList.Add(predParam)
  34.  
  35.             Try
  36.                 For Each list As Parameter() In allParamInList
  37.  
  38.                     mySearchFlowVariables.selectedParams = list
  39.  
  40.                     Dim reportTable As Table
  41.  
  42.                     Select Case mySearchFlowVariables.selectedPeriodicity
  43.                         Case Periodicity.Delivery
  44.                             reportBuilder = New QD_Report_Web_Delivery(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedShowReferences, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
  45.                         Case Periodicity.Invoice
  46.                             reportBuilder = New QD_Report_Web_Invoice(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedShowReferences, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
  47.                         Case Periodicity.Month
  48.                             reportBuilder = New QD_Report_Web_Month(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
  49.                         'CS 2009-11-16 PS399 Add Production Day periodicity
  50.                         Case Periodicity.ProductionDay
  51.                             reportBuilder = New QD_Report_Web_ProdDay(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
  52.                         Case Periodicity.Unit
  53.                             reportBuilder = New QD_Report_Web_Unit(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
  54.                     End Select
  55.  
  56.                     reportTable = reportBuilder.GetWebsiteQdataReport()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement