'This exemple attachs the result of analysis 129 into client table
Dim customerStamp as String = "81c-4fa9-bf9b-d1346eb11eb" 'Customer stamp
Dim analysisNumber as Decimal = 129
Dim myVars = New List(Of VarsVO)()
myVars.Add(New VarsVO() with {.no = 1, .tipo = "D", .vdate = New DateTime(2021, 1, 1)})
myVars.Add(New VarsVO() with {.no = 2, .tipo = "D", .vdate = New DateTime(2021, 12, 31)})
Dim result as PHCResult = SDK.Analytics.GenerateAnalyticsRecords(analysisNumber, "PDF", myVars, customerStamp)
If Not result.HasMsgErrors
Dim completeFilename As String = result.result.Cast(Of StringVO).FirstOrDefault.phcString
Dim filename As String = completeFilename.Split("/"c)(1)
sdk.FileUtil.createBDAttachment(filename,"List of dossiers from year 2021","","CL", 0, customerStamp)
End if