' Gambas module file

Public DATA_RETURN As String
Public ReportEDID As Collection = [("0"): ("========================================================================================================================="),
                                   ("1"): (Finfosys.Label65.Text),
                                   ("2"): (Finfosys.Label66.Text),
                                   ("3"): (Finfosys.Label67.Text),
                                   ("4"): (Finfosys.Label100.Text),
                                   ("5"): (Finfosys.Label101.Text),
                                   ("6"): (Finfosys.Label102.Text)]
                                   
Public Report As Collection = [("0"): ("========================================================================================================================="),
                               ("1"): (Finfosys.TextBox1.Text),
                               ("2"): (Finfosys.Label105.Text),
                               ("3"): (Finfosys.Label106.Text),
                               ("4"): (Finfosys.Label107.Text),
                               ("5"): (Finfosys.Label222.Text), '/
                               ("6"): (Finfosys.Label224.Text),
                               ("7"): (Finfosys.Label220.Text),
                               ("8"): (Finfosys.Label221.Text), '//
                               ("9"): (Finfosys.Label225.Text),
                               ("10"): (Finfosys.Label246.Text),
                               ("11"): (Finfosys.Label247.Text),
                               ("12"): (Finfosys.Label136.Text),
                               ("13"): (Finfosys.Label64.Text),
                               ("14"): (Finfosys.Label146.Text),
                               ("15"): (Finfosys.Label108.Text),
                               ("16"): (Finfosys.Label109.Text)]

Public Sub _inits()
 Dim All, All2 As Integer
 Dim hFile As File
 DATA_RETURN = Null
 '=============================================
 For All2 = 0 To Finfosys.ComboBox8.Count - 1
  For All = 0 To ReportEDID.Count
   FReport_Gen.ProgressBar1.Value = All / ReportEDID.Count
   DATA_RETURN = DATA_RETURN & "\n" & ReportEDID[All]
  Next
  
  Finfosys.ComboBox8.Index = All2 - 1
 
 Next
 '=============================================
 If Exist(FReport_Gen.ButtonBox1.Text) Then  
    hFile = Open FReport_Gen.ButtonBox1.Text For Write Append 
 Else 
    hFile = Open FReport_Gen.ButtonBox1.Text For Write Create
 Endif 
 Print #hFile, DATA_RETURN
 Close #hFile
 DATA_RETURN = Null
 '=============================================
 For All = 0 To Report.Count
  
  FReport_Gen.ProgressBar1.Value = All / Report.Count
  
  DATA_RETURN = DATA_RETURN & "\n" & Report[All]
  
  Wait 0.01
 
 Next
 '=============================================
 If Exist(FReport_Gen.ButtonBox1.Text) Then  
    hFile = Open FReport_Gen.ButtonBox1.Text For Write Append 
 Else 
    hFile = Open FReport_Gen.ButtonBox1.Text For Write Create
 Endif 
 Print #hFile, DATA_RETURN
 Close #hFile
End
