Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I need quick help in PNG image creation through QlikView macro.
I am using the below code:
ActiveDocument.Sheets("SH01").SheetObjects("CH49").Activate
for i = 0 to mySelections.Count - 1
'for i = 0 to 50
'dim FieldValue
'dim mnth
FieldValue = mySelections.Item(i).text
empName = myName.Item(i).text
'If an employeeid does not exist in month then a file is still written
ActiveDocument.Fields("ID").select FieldValue
'For some reason this has to stay inside the loop, hard setting???
ActiveDocument.Fields("PRACTICE_CODE").select SPCode
Application.Refresh
'ActiveDocument.ShowPopup "Ok", 10000
ActiveDocument.Sheets("SH01").SheetObjects("CH03").Activate
ActiveDocument.GetApplication.Waitforidle 200000
ActiveDocument.Sheets("SH01").SheetObjects("CH164").Activate
ActiveDocument.GetApplication.Waitforidle 200000
ActiveDocument.Sheets("SH01").SheetObjects("CH136").Activate
ActiveDocument.GetApplication.Waitforidle 200000
ActiveDocument.Sheets("SH01").SheetObjects("CH154").Activate
ActiveDocument.GetApplication.Waitforidle 200000
Application.Refresh
'ActiveDocument.GetApplication.Sleep 4000
'Concatenate string of employee id (the Fieldevalue), Employee Name (emp_name), and the timestmp
'ActiveDocument.Sheets("SH01").ExportBitmapToFile FileName & FieldValue & "_" & emp_name & "_" & ReportPeriod & ".png"
Application.Refresh
ActiveDocument.GetApplication.Waitforidle 200000
'MsgBox("Click Ok")
'msgbox FieldValue
'msgbox empName
'empName=GetFieldSelections("LB22")
set empid=ActiveDocument.Variables("empName")
empName=empid.GetContent.String
'empName=Activedocument.Sheets("SH01").SheetObjects("LB22").value
'msgbox empName
'msgbox FileName
ActiveDocument.Sheets("SH01").ExportBitmapToFile FileName & empName &"-"& FieldValue &"_" & ReportPeriod & ".png"
ActiveDocument.GetApplication.Waitforidle 2000000
Next
msgbox(i & " number of reports have been written to " & FileName)
End Sub
I am attaching the expected and actual image created.. in the image actual last part of the trainings (Last rows of trainings are not captured in the image) are missing. please help.
Regards,
Suryakant
Anybody please help.