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

maksimu

Members
  • Posts

    8
  • Joined

  • Last visited

maksimu's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I just installed JasperServe and in the script it automatically created two databases (sugarcrm and foodmart) everything works fine. Now I would like to add my own database schema with existing tables and data. I tried to find example how to add existing database but had no luck so far. Is there any examples or tutorials how to do that?
  2. I'm creating HTML (popup window), EXCEL and PDF report and would like to show my reports on one page. This report is not going to be used for printing, so there is no need separate my report into pages. Plus later users would like to use Buildin Excel sorting. Is there an option to ignore pages?
  3. OK.. in othere word to make it simpler: I have a list of sheduled classes and in my report I want to print one class per row, but sometimes there could be two or three instructors per class. so how can i print two instructors in one row? Thanks
  4. I'm trying to create a report using iReport but I can't get the right results printing out. As a generic example say I have three tables: table_1 { id field_ } table_2 { id fieldA table_1_id } table_3 { id field1 table_2_id } where table_2.table_1_id references table1.id and table_3.table_2_id references table2.id. For every occurance of an entry in table2 there may be 0 or more entries in table3 where table3.table_2_id = table2.id. Let's say I had the following in the tables table_1 id Field_ 1 60 2 30 3 77 table_2 id fieldA table_1_id 1 qq 1 2 rr 1 3 tt 2 table_3 id field1 table_2_id 1 a1 1 2 a2 1 3 a3 3 Now, in my report what I want to do is print out some details for a specific table_1.id. Specifically, I want to print out contents of table2 where table2.table_1_id = table_1.id, and for each entry being printed from table_2 I want to print below it the entries in table_3 where table_3.table_2_id = table_2.id. For example, say I wanted to print the above where table_1.id = 1 I would like the result printed in my report as follows: table_2.fieldA: qq table_3.field1: a1 table_3.field1: a2 table_2.fieldA: rr I'm wondering how I should design the report? What I mean is should I use groups or a sub-report? I've tried both, I don't even get close to what I want with my subreport, with groups I get close but I get every entry from table_3 repeated under each of the entries from table_2, so in the above I would get: table_2.fieldA: qq table_3.field1: a1 table_3.field1: a2 table_2.fieldA: rr table_3.field1: a1 table_3.field1: a2 I'm at a loss and not that familiar with databasing and reporting. Also, what query would I need? Thanks in advance
  5. Yeah.. it works now. Here is what i did: <parameter name="IDClause" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{courseID}.equals(new Long(0)) ? " " : " WHERE COURSE.ID = $$P{courseID} "]]></defaultValueExpression> </parameter> <queryString> <![CDATA[sELECT ...FROM .. $P!{IDClause} ]]> </queryString> The problem was that I had to put ".equals()" function not just "==" Is there any documentations on how to write Expressions? I can't find it anywhere. Thanks
  6. For some reason this code giving me error: "net.sf.jasperreports.engine.JRException: Error executing SQL statement for : TableReport"
  7. Thanks for your reply. Quick question: What if I don't have anything in my WHERE clause is it ok if I do this?: Code:<parameter name="IDClause" isForPrompting="false"> <defaultValueExpression> $P{courseID} == new Long(0) ? "" : " WHERE COURSE_ID = $$P{courseID} " </defaultValueExpression></parameter>
  8. I have the same question. Searched everything but could not find any examples. I need optional WHERE clause. If user does supplies ID then search only for that ID else just get all records. Is it possible to do in JasperReports? Thanks for any help
×
×
  • Create New...