salemfahad Posted May 8, 2019 Share Posted May 8, 2019 Hi,I want to implement shortcode in my report. For example, when a user inputs 'a' the field will show 'all'. Similarly, the field will show 'few' for 'f' and so on. Is there any way I can implement it without modifying my database? I want to accomplish this by using Jaspersoft Studio only. Link to comment Share on other sites More sharing options...
Solution hozawa Posted May 8, 2019 Solution Share Posted May 8, 2019 Yes. There are several ways.First is to use use Text Field and have if conidtion to choose what to display.e.g.$P{Parameter1}.equals("a")?"all":$P{Parameter1}.equals("f")?"few":"None"[/code]Second is just to create layered Static Text components and use Print When Expression to choose which Static Text to display.Third is to use scriplet to replace the value. If there are many reports requiring the same substitution, this may be the easiest to maintain. Link to comment Share on other sites More sharing options...
salemfahad Posted May 9, 2019 Author Share Posted May 9, 2019 Hi,Thanks for the answer. Since I am beginner in using Jasper Reports, I failed to understand the second and third method you mentioned. Can you please explain them in detail or at least provide me with some reading material?TIA Link to comment Share on other sites More sharing options...
hozawa Posted May 9, 2019 Share Posted May 9, 2019 1. Open up a web browser.2. Enter "https://www.google.com/" as the URL3. Enter "jaspersoft studio print when expression" to find out about "print when expression"3. Enter "jaspersoft studio scriptlet" to learn about scriptlet. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now