Jump to content
Changes to the Jaspersoft community edition download ×

nkamir

Members
  • Posts

    12
  • 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 nkamir

  1. Hi, I'm trying to send sql query as a parameter to jasper report as: parameters.put("par_sqlStat", sqlStat); and then I'm using $P{par_sqlStat} in Report Query. it says : java.sql.SQLException: SQL text '?' has no tokens. Is this the way of getting this done, or there is some other way of doing it? I'm using Java DB (Derby) Post Edited by nkamir at 04/29/2009 13:23
  2. Actually, I'm able to generate my reports with absolute path, but I can't figure out how to use relative path to do the same thing. The class that is calling the report file is: D:/MyApplication/src/App/MyReports/AccountActivityReport.class and the report file is: D:/MyApplication/src/App/MyReportsJrxml/AccountActivityReport.jasper I wanna call this report as: ../MyReportsJrxml/AccountActivity.jasper" Appreciated... Post Edited by Nasir Amir at 04/06/09 13:13
  3. Nice, the loadObject works just fine, Thanks. Now, that document says: "A relative pathname that does not specify a drive has no prefix." but I get FileNotFoundException while trying it as following: the absolute path of the jasper object is: D:/Working/MyApp/src/MyApp/MyReportsJrxml/AccountActivityReport.jasper the absolute path of the java class is: D:/Working/MyApp/src/MyApp/MyReports/AccountActivityReport.class I'm trying to access it as ../MyReportsJrxml/AccountActivity.jasper"; what could be the issue?
  4. Hi, Right now I'm compiling and loading my jasper report from .jrxml file as following? How do I load my reports from a pre-compiled .jasper file? Code: Also, How do I use this absolute path with a reletive path? Appreciated.... Post Edited by Nasir Amir at 04/02/09 18:38
  5. Deprecated. As of JDK version 1.1, replaced by Calendar.set(Calendar.MONTH, int month). If the date was October 31, for example, and the month is set to June, then the new date will be treated as if it were on July 1, because June has only 30 days. ______ Calendar.getInstance().set(Calendar.MONTH, 4); Post Edited by Nasir Amir at 02/07/09 13:14
  6. Hi, I started using Jasper Reports and IReport about one week ago when I found a good article on it, heres the link http://www.devx.com/Java/Article/29309/1954 Now, I have designed a few reports for my project, and I invoke these reports either from Report Menu in my application or from Buttons. The code for it is in the code section. I'm just wondering whats the proper way of compiling reports ahead of time and include it in the application, and then later just pass it the parameters to generate the reports. Right now what happens is that, everytimeI click the button, it loads the jrxml, compiles it, fills it, and view/print it. It does all these things on every click. Code: Post Edited by Nasir Amir at 02/07/09 01:50
  7. When I set the calculation type to 'Sum' then it actually assigns the value, otherwise it shows 'null' May be it is just in my case, since I have a lot going on in my report, I don't know if something else is causing this, but its working fine, The attachment shows the screenshot. Thanks Ramesh Post Edited by Nasir Amir at 02/06/09 22:49
  8. Yes, the if statement or conditional statement can be used in expressions as following: Code: Post Edited by Nasir Amir at 02/05/09 13:26
  9. I'm able to pass parameters to the subreport but how can I read some of the variables or fields of subreport back in the main report?
  10. ok. I was able to make this report using a subreport. First, I created a main report with an SQL statement "SELECT DISTINCT myDate FROM myTable" which gave me unique dates from myTable eliminating the duplicate entries Second, I created a parameter in the subreport and I passed the date from main report to the subreport. Then, in subreport, I created an SQL statement like " SELECT SUM(parking) AS var_parking, SUM(tolls) AS var_tolls, SUM(andSoOn) AS var_andSoOn FROM myTable WHERE myDate = $P{subPar_myDate} // the date passed from main report attachment shows the result (I formatted the subreport of course).
  11. I'm trying to design a report using 'Print When Group Changes' option IReport 3.0.0 Heres what I want to acheive. I want to display sums of certain fields of my database for each date of given date range. Lets say, the date range is 01-01-2009 to 01-31-2009, now there are more than one records for each date. For example sum of parking, tolls, gas, tax of all the records of date '01-01-2009' and sum of parking, tolls, gas, tax of all the records of date '01-02-2009' and so on. I do not want to show all the records of this date, just the sum of certain fields. Heres what I have done so far. 1- I grouped the report by 'date', 2- created a variable (lets say varTotalParking) with - Expression to sum the database 'parkingAmount' field. - Reset type 'Group', - Evaluation type 'Group', - 'print repeated values' disabled - Print when group changes what happens that the variable is printed everytime when its sum changes. I started this solution with something in mind that I'ld just print the sum of the variable at the end of the each Group, and delete the group elements (which prints all the records of that date, hence I'ld have just the total of that databse field on the report. If I can make that variable print ONLY once at the end of the group, it will work fine, I hope. Post Edited by Nasir Amir at 02/04/09 14:23
  12. Also, IReport 3.1.3 is missing other features also such as Reset variable by group etc
×
×
  • Create New...