Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all;
I created 3 macro's YTD,QTD&MTD, when i select in application those are working but when i selected in access point(AJAX) those macro's are not working.can any one advice me how to solve it.
I used this code in macro's edit module
sub YTD
ActiveDocument.GetSheetObject("CH121").Activate
ActiveDocument.GetSheetObject("CH122").Activate
end sub;
.......etc........
I checked Allow unsafe macro's on server.
Thanks,
Ashok.
Hi,
Some macros do not work in Ajax, and that is the expected behavior. What events are you using to trigger those macros? A button, an action, when you change a value in a field?
Regards.
Miguel
Hi Miguel,
I used button & action is "Run macro".
Hi,
Use conditionals based on a variable value instead. For example, the button sets a variable named "vYTD" to 1 when clicked. The charts have a conditional like
vYTD = 1
so they are only displayed when you click on the button. Check an example app here. This will work in Ajax and you prevent using macros.
Hope that helps.
Miguel
Hi,
But actuvally if i select YTD button then it shows 1-bar chart & 1-stright tabe as comparing last 3 years means i used 3 expressions in YTD.
like that QTD&MTD also then how.
Hi,
What if you click on the QTD button first? Does it work and the rest of buttons quit working? You are just activating objects and not modifying expressions, aren't you? If all charts are in the same sheet, then I'd insist on the use of variables and conditional visibility instead. If they are in different sheets, you will need to first activate the sheet where the charts are.
Not having the QVW makes difficult to guess the layout and functionality.
Miguel
Hi,
I used that set variable method but that is suitable for only two butttons but i need 3 buttons.
i used like this
variable: V=1
YTD Button:
Button - action - Set Variable ->v
Value:
=If(v = 1, 2, 1)
Text:
=if(v=1,'YTD','YTD')
In chart, use v variable in Layut-conditional - show = v=1
QTD Button:
Button - action - Set Variable ->v
Value:
=If(v = 1, 2, 1)
Text:
=if(v=2,'QTD','QTD')
In chart, use v variable in Layut-conditional - show = v=2
How do i create MTD Button?
Set variable taking two values true/false.