Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am new to Qlikview and trying to learn the scripting. My problem is that I have developed two charts on one sheet "Main" and both belongs to seperate Drill Groups..for example "LDI_WISE_GROUP" and "TOTAL_WISE_GROUP"
So an idea came in my mind to make one chart and set the group as dimension using VBScript Macros and trigger the macro via two buttons.
my code is the following
sub SetLDIDimensions
set chart = ActiveDocument.GetSheetObject("LDIChart")
chart.AddDimension("By_LDI_DrillDown")
end sub
sub SetTotalDimensions
set chart = ActiveDocument.GetSheetObject("LDIChart")
chart.AddDimension("By_Total_DrillDown")
end sub
Its keep on adding dimensions and upon clicking it says "Drawing of Chart failed internally" but when I press the "Clear" button from the toolbar it draws.
Second problem is that it doesnt remove the dimension rather it keeps on adding even though I've changed the code to the following but the problem is remain the same.
sub SetLDIDimensions
set chart = ActiveDocument.GetSheetObject("LDIChart")
chart.RemoveDimension 1
chart.RemoveDimension 2
chart.AddDimension("By_LDI_DrillDown")
end sub
sub SetTotalDimensions
set chart = ActiveDocument.GetSheetObject("LDIChart")
chart.RemoveDimension 1
chart.RemoveDimension 2
chart.AddDimension("By_Total_DrillDown")
end sub
I want my chart to be refreshed and show the data according to the group I want through buttons. what will be the code...thanks for the help.
Guys I have sorted out the problem..just added CLEAR method and its working...thanks
Guys I have sorted out the problem..just added CLEAR method and its working...thanks