Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CreateReport()
- If mySearchFlowVariables Is Nothing Then
- Return
- End If
- Dim countOnlineParam As Integer = 0
- Dim countPredParam As Integer = 0
- For Each countParam As Parameter In mySearchFlowVariables.selectedParams
- If countParam.listType = ListType.SingleValue Then
- countOnlineParam += 1
- ElseIf countParam.listType = ListType.PredictedValue Then
- countPredParam += 1
- End If
- Next
- Dim onlineParam(countOnlineParam - 1) As Parameter
- Dim predParam(countPredParam - 1) As Parameter
- Dim allParamInList As New ArrayList
- Dim iOnline As Integer = 0
- Dim iPred As Integer = 0
- For Each param As Parameter In mySearchFlowVariables.selectedParams
- If param.listType = ListType.SingleValue Then
- onlineParam(iOnline) = param
- iOnline += 1
- ElseIf param.listType = ListType.PredictedValue Then
- predParam(iPred) = param
- iPred += 1
- End If
- Next
- allParamInList.Add(onlineParam)
- allParamInList.Add(predParam)
- Try
- For Each list As Parameter() In allParamInList
- mySearchFlowVariables.selectedParams = list
- Dim reportTable As Table
- Select Case mySearchFlowVariables.selectedPeriodicity
- Case Periodicity.Delivery
- reportBuilder = New QD_Report_Web_Delivery(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedShowReferences, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
- Case Periodicity.Invoice
- reportBuilder = New QD_Report_Web_Invoice(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedShowReferences, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
- Case Periodicity.Month
- reportBuilder = New QD_Report_Web_Month(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
- 'CS 2009-11-16 PS399 Add Production Day periodicity
- Case Periodicity.ProductionDay
- reportBuilder = New QD_Report_Web_ProdDay(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
- Case Periodicity.Unit
- reportBuilder = New QD_Report_Web_Unit(mySearchFlowVariables.selectedDeliveries, mySearchFlowVariables.selectedParams, mySearchFlowVariables.selectedInternal, mySearchFlowVariables.selectedShowUnits, mySearchFlowVariables.selectedIncludeBadUnitsMeasurents, userID)
- End Select
- reportTable = reportBuilder.GetWebsiteQdataReport()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement