I'm trying to do an #import statement inside of an #if but it seems like the VTL parser always runs the #import.
Is there a way to conditionally do the #import?
- Code: Select all
#if($version.contains("21x"))
#import('ref', 'com.nomagic.reportwizard.custom.CustomReferenceTagHandlerTool')
#end
I've also tried doing this but the Report wizard complains:
- Code: Select all
#if($version.contains("21x"))
#set($dir = 'com.nomagic.reportwizard.custom.CustomReferenceTagHandlerTool')
#else
#set($dir = 'com.nomagic.reportwizard.tools.script.JavaScriptTool')
#end
#import('ref', $dir)