Jump to content
We've recently updated our Privacy Statement, available here ×

Ankur Gupta

Members
  • Posts

    343
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by Ankur Gupta

  1. Hi sruthyms, This error comes up when there is mysql Connector missing, so what all you need to do is : 1. Place the mysql connector jar file in the folder called plugin under the imstallation folder of Jasper Soft studio for instance , C:/JasperSoft Studio- x.x.x/plugins folder. 2. Then try validating the datasource, for sure you will get the connection test passed. I am attaching the MySQL Connector Jar file along with the post. Hope that this helps. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  2. Hi Jhonny , I think the solution to your problem is, When you place all the fields in the Detail Band which need to appear for a particular client, follwing all these elements in the detail band you can add Break from the Palette and select Page Break . To achieve this in Jasper Soft Studio follow these steps: 1. Select the Beak element from the Palette and drag it to the detail band below the fields(Fields which are for a single client) in the detail band.Please refer to the attached SNAP1 2. Thats all what you need to do, now when the report prints it will automatically start each and every row of the table on a new page. Hope that this helps. Regards, Ankur Gupta http://ankurthetechie.blogspot.in/
  3. Hi Francios, Thankyou so much solution of yours worked as a charm. Out of curosity, can you tell me all the 10 parameters which could be defined in such a way . This would increase the worth of the question . Thanks for your answer!!
  4. Hi Francios, Thankyou so much solution of yours worked as a charm. Out of curosity, can you tell me all the 10 parameters which could be defined in such a way . This would increase the worth of the question . Thanks for your answer!!
  5. Hi, Please tell me if there is any method through which I can get the user name of the user who logged into the Jasper Server, and that name could be displayed in the report. Is there any parameter which can be referred or any other work around to obtain the logged in user name. Thanks in Advance!!
  6. Is there a way that we could get the username of the user who logged into the JasperServer Thanks
  7. Cascading, what does one mean by saying cascading, literally it means anything that resembles a waterfall or especially seeming to flow. Now where to implement this in Jasper Reports? Right, it could be used in parameters, or rather the filters which are dependent on each other. You can find these kind of filters in online shopping websites, wherein we can choose on various filters like if we want to buy the laptop first filter would be Laptop next filter would be the company chosen among the companies which sell Laptops, and then we chose for the specifications like processor,ram etc. each have separate filters but the boundaries of the parameter depends on the previous parameter. Before getting into the setup of Cascading Parameters in Jasper Report there are few things which we need to know before hand - Usage of $X{IN, feild, parameter} in the SQL Query used in the Where clause, which filters the data based on the selection. Let me go one by one in explaining the componentsfield - Now this is the field in the database upon which the find will be doneparameter - Now this is the parameter selected by user and will be queried or looked in the field. This enable for multi select also in the parameters. Now in order to achieve this in Jasper Reports we need to follow few steps. First of all you need to design a Jasper Report and identify the parameters to be cascadedThen we need to define the expression for parameters, and mind one thing that each of the parameter need to be of type java.util.collection if you want to enable multi- select.Next and very important thing is that the cascading parameters could not be tested in iReport / JasperSoft Studio, this needs to be deployed on Jasper Server in order to check the correct functionality. Though could be run in iReport or JasperReports with default values hardcoded. I have created a working sample which could be simply deployed, and checked for the functionality and working. The Zip file could be downloaded from here - LINK TO ZIP FILE The Zip file contains 1. Cascade Parameter Report (JRXML File) 2. SQL DUMP, could be extracted using MySQL or any other tool 3. Table Creation Script in a notepad file, this will allow you to create the require table in the database. For setting up the sample report you need to- 1. Create a schema in you database and create the table using the script command 2. Then run the JRXML file using iReport/Jaspersoft Studio 3. Then set the datasource referring to Persons table in the database. 4. Then deploy the JRXML on the Jasper Server, and set the datasource and input controls. Do remember the names of the parameters used in the report should exactly match the input controls declared on the Jasper Server. If you miss on some step then you could follow a YouTube video of mine which will serve as a tutorial. Below is the video where in you could see all the steps. Please put your views or questions or suggestions below, I will be more than happy to hear them.Happy Coding!!
  8. Hi, The other problem which I can see is here is that ,the beans you have created should be at last should be storred in a collection/Array which should be fetched via report. In the case of collection/ Array of beans, it could be looped in the Detail band and that will produce correct results. So Refer to the above links I have posted there are code snippets too . Go through them that will help you get the concept. Hope that this helps. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  9. Hi , I have a video made on the same subject have a look You can also go through a artilcle for the same http://ankurthetechie.blogspot.in/2013/12/jrdatasource-as-datasource.html Do let me know if you need further help Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  10. Hi, Well this is not an advisable method to have alternate colored band, it is preferrable to use the Styles. Now if you are using iReport/JasperSoft Studio you could locate Styles and then define Conditional styles in the styles. Then you can use that conditional style, defining the Condition Expression for alternate coloring as - $V{REPORT_COUNT}%2 == 0 (This will give you alternate band coloring) Hope thath this helps Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  11. Hi sinsand, You can easily declare multiple scriptlets in a Jasper Report, and use the parameter generated with every scriptlet as two different references in your report to call the classes. If you are using iReport you can follow the following steps - 1. Go to the Report Inspector 2. Then locate the Scriptlet node 3. Right click on the Scriptlet node and add as many new scriptlets you want to use and define the path of java class to individual scriptlets 4. You can then notice in the parameters node, there would be as many new parameters as many scriptlets you create 5. Then use the parameter as you class reference suppose the parameter name is $P{Scrip_mod} then the function would be called as P{Scrip_mod}.testFun() Hope that this helps. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  12. Hi Alan, Sorry for late reply, I think the problem is that postgre is not able to understand $P{} you need to use $P!{} , this tells the query executer that the content of teh parameter needs to be used in the query. Doing this you could force the date to be inclueded in the query And regarding the display result of the date, or for a particular format you want to compare ,you could place prameter for the startdate like $P{startdate_SQL} and define a default value of this parameter as new SimpleDateForrnat("yyyy-M-d").format(startdate) Same kind of parameter can be made for $P{eindate} like $p{eindate_SQL} containing the default value expression as new SimpleDateForrnat("yyyy-M-d").format(startdate) and in the query you could use these two new parameters $P!{startdate_SQL} and $P!{eindate_SQL} Hope that this helps Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  13. http://i.ytimg.com/vi/N7pBJktoSt8/0.jpgCascading Parameters in Jasper Reports This video will help in getting the underlying concept of cascading parameters as well as will define a simple methodology to implement this in Jasper Reports and deploy it on JasperServer as wellYou can follow me on - Twitter Handle -- @ankur_augFacebook - https://www.facebook.com/ankur10augLinked IN - http://www.linkedin.com/pub/ankur-gupta/51/895/910 Blog - www.ankurthetechie.blogspot.inG+ - https://plus.google.com/116451164261752827176From:Ankur GuptaViews:18654http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_half_11x11.gif19ratingsTime:16:30More inScience & Technology
  14. http://i.ytimg.com/vi/oMYJb8zmviI/0.jpgHow to deploy a simple Jasper Report on Jasper server using the sample database This video will act as a tutorial to create a simple Jasper Report in iReport and then deploy it over the Jasper Server. This tutorial uses the sample database so in order to follow this tutorial all you need is a working installation of iReport and Jasper Server You can follow me on - Twitter Handle -- @ankur_augFacebook - https://www.facebook.com/ankur10augLinked IN - http://www.linkedin.com/pub/ankur-gupta/51/895/910 Blogt - www.ankurthetechie.blogspot.inG+ - https://plus.google.com/116451164261752827176From:Ankur GuptaViews:31734http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_half_11x11.gif42ratingsTime:17:55More inScience & Technology
  15. http://i.ytimg.com/vi/8stWFEQ-Z4o/0.jpgGetting to know the features and UI of Jasper Reports Server This video will help you in getting familiar to the UI of Jasper Reports Server as well as it will state the utility of Jasper Server. You can follow me on - Twitter Handle -- @ankur_augFacebook - https://www.facebook.com/ankur10augLinked IN - http://www.linkedin.com/pub/ankur-gupta/51/895/910 Blogt - www.ankurthetechie.blogspot.inG+ - https://plus.google.com/116451164261752827176You can view my Jasper Community Profile - http://community.jaspersoft.com/users/ankur-guptaFrom:Ankur GuptaViews:3674http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif9ratingsTime:09:18More inScience & Technology
  16. Hi, In order to achieve this scenario the most feasible method is what you have stated in you rquertion itself, that is creating several conditional styles, and it is not duplicating the styles, but if you are using iReport/Jaspersoft studio, then you can see that a single style can have several condional styling options so you need to apply only one style to all the textfeilds in the report and that will cater you needs according to the conditions. Hope that this helps, Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  17. Hi, What type of calendar are you trying to achieve basically? Can you breifly explain your requirements. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  18. Yes, it will be easy if you want to dynamically switch the tables, you will need to use scriptlet, that will allow your same report to connect to different databases, as the connection will be switched on the basis of the user defined parameter or feild value whatever may be the provision done for the same. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  19. The classpath is of iReport/Jaspersoft Studio, If you want to use it in jasper server you need to add the jar as the resource to the report.
  20. HI, Just want to clarify that, if you are using different databases then you would be managing seperate credentials for that .. ? What you can do here is make use of scriptlet to alternate on a user's choice of DB using parameter in the report I will soon record a tutorial for the same. Will put the link of the video here. Hope that this helps Thankks Ankur Gupta http://ankurthetechie.blogspot.in/
  21. Hi, Try setting the evaluation time to Report , for the variable which you are retrieving from the subreport. Hope that this helps Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  22. Hi, According to me the problem is in the report properties, you have checked Title on New Page and Summary With page Header, try unchecking them and rerunning the report. Hope that this helps Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  23. Hi, According to me this error is coming because there is a probable mismatch in the type of the parameter used, I mean to say that you have defined the parameter of different datatype and you are passing a diiferent type of data. Please check the datatype of the Prameter (Parameter class.) Do let me know if this is the issue, or post the whole error so that issue could be tracked. Hope that this helps. Thanks Ankur Gupta http://ankurthetechie.blogspot.in/
  24. http://i.ytimg.com/vi/ykeXTsQFBC4/0.jpgAll about Scriptlet Custimization in Jasper Reports- Along with a working sample BlogPost - http://ankurthetechie.blogspot.in/2014/01/all-you-want-to-know-about-scriptlets.htmlSample - https://drive.google.com/file/d/0B4yFyF_EORB_cGhrQ1ZzMDh6eGc/edit?usp=sharingThis video will explain about the various customization which scriptlet can bring to in Jasper Reports, even there is a integration of Java Fundamental Classes .You can follow me on - Twitter Handle -- @ankur_augFacebook - https://www.facebook.com/ankur10augLinked IN - http://www.linkedin.com/pub/ankur-gupta/51/895/910 Blogt - www.ankurthetechie.blogspot.inG+ - https://plus.google.com/116451164261752827176You can view my Jasper Community Profile - http://community.jaspersoft.com/users/ankur-guptaTo learn more about navigate to-JasperSoft Dashboard- http://www.youtube.com/watch?v=jD18L_CS0dQJasperSoft Analysis - http://www.youtube.com/watch?v=aPd1C2RsBP4Jaspersoft DI - http://www.youtube.com/watch?v=Sm4w1a8xpDQSubscribe to the videos as I will be posting more videos on Jasper Reporting.From:Ankur GuptaViews:5353http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_full_11x11.gif http://gdata.youtube.com/static/images/icn_star_empty_11x11.gif10ratingsTime:15:11More inScience & Technology
  25. First question which comes to mind after coming across thisword Scriptlet is that does it have any relationships with scripts, if yes thenwhat scripts, the answer to thisquestion is No it does not have any relation with scripts. Scriptlets basically act as an interfacebetween the Jasper Reports and Java. It provides much of flexibility to thereporting as now we can introduce user defined functions. Scriptlet is nothing but a java class which is extended witheither 1. net.sf.jasperreports.engine. JRAbstractScriptlet 2. net.sf.jasperreports.engine.JRDefaultScriptlet. Now we need to identify which class we need toextend based upon the usage, JRAbstractSriptlet contains anumber of abstract methods that must be overridden in every implementation, developermust implement all the abstract methods whereas JRDefaultScriptlet contains default empty implementations of everymethod in JRAbstractScriptlet, a developer is only required to implement thosemethods he/she needs for their project. Now following listed are the methods that will be called bythe report engine at the appropriate time, during report filling phase. public void beforeReportInit() Called before report initialization. public void afterReportInit() Called after report initialization. public void beforePageInit() Called before each page is initialized. public void afterPageInit() Called after each page is initialized. public void beforeColumnInit() Called before each column is initialized. public void afterColumnInit() Called after each column is initialized. public void beforeGroupInit(String groupName) Called before the group specified in the parameter is initialized. public void afterGroupInit(String groupName) Called after the group specified in the parameter is initialized. public void beforeDetailEval() Called before each record in the detail section of the report is evaluated. public void afterDetailEval() Called after each record in the detail section of the report is evaluated. Except these we can also use User defined custom functions,I have already posted about them in my previous post here is the link- http://ankurthetechie.blogspot.in/2013/12/jasperScriptletIntegration.html Few important facts which need to be kept in mind usingscriptlets are-When we do a System.out.println in any of thefunction then it does not directly print in the report, many a times peoplehave some misconception but to remind System.out.println is a console command and prints the value inthe Report console, that is called the Report output window. These functions are fired whenthe Jasper Print object is created, and it is created when a JRXML runs. Now after creating our scriptlet classes and packaging it into a jar file we are ready to use it inour Jasper Report created either in iReport or JasperSoft Studio. Follow the following steps to implement scriptlets in iReport Add the Scriptlet jar file in the classpath byclicking on the Tools(Menu Bar) àOptions àClasspath Tab and add the Jar file here. Locate the Report Inspector Window There is a node called Scriptlet, expand thenode and we could see REPORT You can create a another scriptlet label byright clicking the scriptlet label and then select AddNow locate the new element called Scriptlet1under the node SCRIPTLET. (Check Fig-1) Navigate to the properties of the Scriptlet1there could be seen Name, Scriptlet Class and Description.Now youcan enter the desired name for the scriptlet. Scriptlet Class is the fully qualified path of the scriptlet class in the JAR File. Description is for the describing the role ofthe scriptlet ( Check Fig-2) http://4.bp.blogspot.com/-wFFhQWmYIMc/Us_69LMP4XI/AAAAAAAAAhM/PMzqd7DSRvw/s1600/Figure1-JasperSoft+Studio.png Follow the following steps to implement scriptlets in JasperSoft Studio Add the Scriptlet jar file in the classpath byclicking on the Project(Menu Bar) àProperties, then select Java Build Path and external JAR File. Locate the Outline window There is a node called Scriptlet, expand thenode and we could see REPORT_SCRIPTLET You can create a another scriptlet label byright clicking the scriptlet label and then select Create Scriptlet (As in Fig 1)Now locate the new element called Scriptlet_1under the node SCRIPTLETS. Navigate to the properties of the Scriptlet_1there could be seen Name, Class and Description.Now you can enter the desired name for thescriptlet. Class is the fully qualified path of thescriptlet class in the JAR File. Description is for the describing the role ofthe scriptlet. (As in Fig 2) http://2.bp.blogspot.com/-UXQ4wo62gCg/Us_5SaTaZsI/AAAAAAAAAhA/qE9CIjUBZRs/s1600/Figure1-JasperSoft+Studio.png Now until now we have success fully linked the scriptlet JARwith the iReport/JasperSoft Studio, now we need to understand that how can itbe used in the report in order to get the desired outputs from the scriptlet orbasically from the JAVA end. To use the scriptlet functions in either iReport/ JasperSoftStudio following are the steps: When we successfully create a new scriptletunder the scriptlet node, and define the properties of the scriptlet wecould see a new parameter formed underthe Parameter node. Locate the scriptlet parameter, you can find theparameter as by default it is named as ( {name of the scriptletdefined}_SCRIPTLET )Then wherever you want to use any function ofthe scriptlet, you just need to use as: ( {name of the scriptlet defined}_SCRIPTLET ).function Name That is all we need to implement to use scriptlet in JasperReports, hope that the above description and methodology helps to graspimportant points. Here is a sample using the sample database, you can try the above customization too. ======SAMPLE======== Hope this clears your doubt for this topic. Still if you faceany issues or problems then you can add a comment below. Happy Coding!!
×
×
  • Create New...