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

GonzaLinares

Members
  • Posts

    22
  • 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 GonzaLinares

  1. Hi, I´m using JasperStudio and JasperReport Server v6.4.2 I have a SOAP web service method which given a date and a work shift, returns time in seconds since that date. (An example of work_shift format: Mon - Fri { 7:30 am - 5:30 pm }) Currently i´m using a datasource which contains these 2 parameters as fields (date and workShift). I want to show in a report a field containing the result of calling this web service passing these 2 fields as parameters. Is there any way to call a web service SOAP method passing input parameters from Jasper? Any guide would be appreciated. Thanks, GL.
  2. Can use one or many TextFields in order to show parameters in the headers. Not sure what do you mean about values and codes. Is value a field in your dataset or how do you get it? In case you have a particular value for each code, then you can hard-code it. Ex: $P{param1}.equals("VA") ? "VAvalue" : $P{param1}.equals("CT") ? "CTvalue" : "No value" For the last point you mention, can put these TextFields in a frame with a print when expression. Print the Frame when there is at least 1 TextField that is not null. Ex. (field1 != null || field2!=null ||.... ) ? true : false Then can use another Textfield with expression "All records" and you opposite print expression than Frame. Ex: (field1 != null || field2!=null ||.... ) ? false : true Let me know if any of this is helpful. If not, give me some more information so we can work it out. Regards, GL.
  3. Configure frame print when expression. Just add a boolean expression checking if list is empty Example: Print When Expression: ( myList.length > 0 ) ? true : false Regards, GL
  4. Did you try checking that subreport size does fit in report? Had this problem many times and could manage to make it work changing items size. If this does not work, try making a simpler subreport till it work. Then add complexity till it stop working. This way you can check why it´s not working. Regards, GL
  5. You can make it work by using an order by expression in your query. In this case both pies have different categories, then you can order data by those categories you have in common. Example: order by case when field.name = 'POSTCARD' then 1 when field.name = 'BOOK' then 2 else 3 end I know this is workaround and not a solution, but may be helpful. Regards, GL
  6. Hi, I´m having some problems with some Standard and Custom Reports. Can execute without any error all reports that do not have multi-select query inputs. Example: Query in report: WHERE cr.type_symbol IN $P!{TypesList} Input control query: SELECT DISTINCT cr.type_symbol as type from cr Then add as resource the input control. Have 2 parameters at report: Name: Types Class: Collection Nested: String Name: TypesList Class: String Expression: "('"+org.apache.commons.lang.StringUtils.join($P{Types}.toArray(),"', '") + "')" When i execute the report, input control works fine (shows what it´s suppossed to), then when i click "Acept" i get this error: (Just showing "Caused By" parts) com.jaspersoft.jasperserver.api.JSException: Error filling report Arguments:... ..... Caused by: net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query: SELECT cr.ref_num as REF_NUM, cr.open_date as OPEN_DATE, cr.close_date as CLOSE_DATE, cr.status_symbol as STATUS, cr.summary as SUMMARY, cr.impact as IMPACT, cr.priority as PRIORITY, cr.type_symbol as TYPE, request_area_description as AREA_DESC FROM cr WHERE cr.type_symbol in ('Incident', 'Problem', 'Request') Caused by: java.sql.SQLException: [DataDirect][OpenAccess SDK JDBC Driver][OpenAccess SDK SQL Engine]syntax error, unexpected $end at ( ... N'Incident at com.ddtek.openaccess.ssp.Diagnostic.toSQLException(Unknown Source) ...... Things that i tryed: - Instead of using $P!{TypesList}, used $X{IN,cr.type_symbol,TypesList}. Got similar error. Instead of "WHERE cr.type_symbol in ('Incident', 'Problem', 'Request')" i get an error like this: "WHERE cr.type_symbol in (?,?,?)" - Made an input control of class string, executed report and wrote down: ('Incident','Request') and it worked. Bad thing about this, is that i want to use multi-select query as input control, this way user don´t have to write anything. - Tryed same report using a different datasource (this datasource point to a "test" DB while the one that fails point to "production") and it worked too. From this what i get is, maybe a JDBC controller problem? What do you think? What am i doing wrong? Any idea will apreciate. Thanks, GL
  7. To @joseng62: Prerequisite for installation is 8Gb. Have 16Gb, so i don´t think it´s a memory problem. About permission level issue, i´m doing the installation logged as an administrator. Last option you mentioned about installer being corrupted i didn´t get it into consideration before, gonna download the installer again and try my luck. Edit: Made it work!. Downloaded installer again and turned off anti-virus. Not sure if it was having trouble with anti-virus or if it worked because old installer was corrupted, but made those 2 changes and it worked. Thanks for the answers!
  8. What about using a TextField checking if field is null: $F{NAME}==null ? "???" : $F{NAME}
  9. What error do you get? If you get error with highchartsxsd not loading I had same problem. Make it work following this: .https://community.jaspersoft.com/questions/1087226/highchartsxsd-not-loading Basically, had to download Commercial version of JasperStudio. Regards, GL
  10. As title says, i´m having this issue when trying to install JasperReport Server v6.4.2 Followed standard installation guide using bundled Tomcat and postgresql database. Did not configure anything manually. Installation goes well till 6%, while it says: "copying postgresql database". Then it close without giving any error. Looking up at log files generated, i got this: class com.ca.bicoe.cajasperserver.install.guiinstaller.customcode.ShowInstallProgress.install() Unexpected Fatal Error: java.lang.OutOfMemoryError: Java heap space Done this installation succesfully 4 times on different servers before, but never got this problem. Any idea what could be wrong?
  11. I had same problem using JasperStudio. I resolved it by generating a new .jasper file for all the subreport that i wanted to update, and then re-uploaded the full report.
  12. In order to pass a field from Main report to a subreport, first of all you have to create a parameter in your subreport. Ex: Name: SUB_USERNAME , Type: String Then go to Main report and click on the subreport element. In the right side click in "edit parameter button". Map values from main report to subreport parameter. I´m not sure if you are trying to pass just one value of USERNAME or ALL values. If you want to pass to your subreport all values with just 1 parameter, then what you can make is a new parameter of type collection in the main report. With a variable add all those values and then pass that collection to your subreport. Probably is easier to get those values from the subreport query, and pass as parameter a value to filter the where clause. Regards, GL
  13. Found out this way of creating a report formed by other reports (Report Book). Managed to make it work, but not very well. When i run the master main report, it execute in order the reports i put in content. The problem is, it generate like a loop and keep generating the content report again and again. What could be the reason of this behaviour ? In case i was not clear. I have a master report (Report book). I put 3 report into it. When i execute it, it generate the 3 tab (one for each report) that it should generate,but then it enters a loop and keep generating those 3 tab. All report are using same JDBC connection, and all of them use same query.
  14. Finally find a solution.Did something similar to what you said. Created a input control asking for the date. Then used 2nd parameter to convert value in the input control. I guess all parameters have same evaluation time, but input controls have an earlier evaluation time.Hence, 2nd parameter does take value from 1st parameter (At least at Jaspersoft Server, since it worked with 2 parameters in Jaspersoft Studio)
  15. I´m using Jaspersoft Studio 6.5 In a new report, i want to do some operations with parameters before the query is executed and brings report data For example, as a parameter i ask user to insert a date. I want to calculate days passed from that date. Then pass those days to seconds and use those seconds in the query. Is there anyway to do this? A workaround i thought that may work was to create a new parameter, and do not promp it. In it expression, do the operations and then use that parameter in the query. By doing this, i use this 2nd parameter as a "function" that operates with the parameter 1st Parameter: Name: dateParam Type: java.util.Date Default Expression: - Is For Prompting: Checked 2nd Parameter: Name: secondsParam Type: java.lang.Long Default Expression: new org.joda.time.DateTime($P{dateParam}).getMillis()/1000 Is For Prompting: Not checked Both of them have Early evaluation time. Then in the query i use 2nd parameter. i.e ... WHERE P${secondsParam} > ticketTable.openDateSeconds After doing this, it actually work in Jaspersoft Studio. But when trying to execute it on JaspersoftReports Server, 2nd parameter don´t take 1st parameter value.
  16. Generated some reports in Jaspersoft Server. Now i want to open them in Jaspersoft Studio. When trying to open them, I get this error: net.sf.jasperreports.engine.JRRuntimeException: Unknown entity http://jaspersoft.com/schema/highcharts.xsd, not loading. Tryed adding to the installation path highcharts-3.0.1.jar but nothing changed. Any idea how to fix this? Also found this post: https://community.jaspersoft.com/questions/818837/javaiofilenotfoundexception-httpwwwjaspersoftcomschemahighchartsxsd After hours of searching, did not find where to download highcharts-5.2.0.jar
  17. Same problem. Could find highcharts-3.1.0.jar but it did not work. If anyone can provide link to highcharts-5.2.0.jar it will be appreciated. Thanks!
  18. After some work, i could achieve to show the table just the way i want, like in this picture: https://imgur.com/ObxWZOH Anyway when i try to export it as PDF or any other format i get this message: Error Messagejava.lang.NumberFormatException: For input string: "5696.0" I guess this is happening because i´m using Integer() function in order to cast "EpochToDays" as Integer and then be able to use it in Today() function. And Integer() function receives as param just Strings, so first i had to cast "EpochToDays" to String by using Concatenate( 'string' , '' ) function. After all this process, Integer() finds that dot in "5696.0" and crash because a dot is not a number.. What i can not understand is why it works and shows me the tables there, but then it crash when i try to export it as PDF.
  19. Guess you are having issue with the boolean expresion in the if statement I tryed this, and worked fine: IF("Date">Today(-30),'Meets criteria', 'Does not meet criteria')
  20. Hi, just 1 week old with Jaspersoft Server I have one requirement to get a date from an epoch time (seconds passed since 1970/01/01 ) parameter named "EpochParam" and show it in as a column in an ad hoc view What i tried to do: -First i created a field "EpochDate", using the Date() function given, and using as parameter '1970-01-01'. -Then i created another calculated field "TimeSinceEpoch" where i calculate the days that passed since "EpochDate". Round(ElapsedDays(Today(),"EpochDate")). This gives me a rounded double -After this another calculated field "EpochToDays", in this one i pass from given epoch time to days. Round(("EpochParam"/ 86400) - "TimeSinceEpoch"). =>The 86400 comes from 60sec in 1min, 60min in 1hour and 24hours in 1 day. Then 60x60x24=86400 =>The substract is in order to use function Today(), so i can substract total days since epoch time and then add my epoch param -Last, what i do is an IF statement where i check if the "EpochParam" given is null or not. Here is where i have some problems IF(IsNull("EpochParam"), Condition1, Condition2) As condition1 i want to give a white space ''. As condition2 i want to use function Today() substracting "EpochToDays". The problems i get are: 1) Condition1 and condition2 must be same type. A workaround could be formating condition2 as a string, but i´m not sure how to do it 2) Condition2 gives an error because EpochToDays is double and Today only accept Integers. I know it could be easier by modifying the applicationContext-semanticLayer config file and adding some new functions, but again, not sure how to do this, what syntax to use and how to formulate it. Any help would be nice!
×
×
  • Create New...