Jump to content
JasperReports Library 7.0 is now available ×

junioryy

Members
  • Posts

    17
  • Joined

  • Last visited

junioryy's Achievements

Explorer

Explorer (4/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Hi all experts, i have created 1 master report and 1 subreport. master report is using database JDBC connection while the subreport is using xml datasource. the subreport with xml data will be displayed based on the seach criteria in the master report.. however when i run the report , the subreport data is null.. i truly ran out of idea what is goin wrong.. below is the detail of my report setting: master report: i use datasource expression with value: new JRXmlDataSource($F{XML_LOG}, $P{XPATH_SELECT_EXPRESSION}) parameter: USR_ID, expression - $F{USR_ID} report query: select * from TEST where USR_ID='USER5' Subreport : field- $F{XML_LOG} - java.lang.string Report query : select * from TEST WHERE USR_ID = $P{USR_ID} fyi, the XML_LOG that from master report query is java.io.InputStream and the xml wil be display based on the search criteria.. and i create the xml datasource using the below expression: /logRecord Any help would be highly appreciated.. thanks in advance!! Post edited by: junioryy, at: 2007/05/28 08:50
  2. Hi all experts, I have created 1 master report and 1 subreport.. master report is using Database JDBC Connection and subreport is using xml datasource.. So may i know which one is the default connection/datasource that i need to set? then how can i pass the 2nd connection to the subreport?. and what is the proper setting for xml datasource? As for the subreport rite, what is the value that i need to put for Subreport - parameter Map Expression and the code for the COnnection/Datasource expression? any help would be highly appreciated.. Thanks in advance!
  3. hi mtclough, really thanks for your reply. i tried to put the following code to Subreport" Use datasource expression" as below: new JRXmlDataSource($F{XML_DATA}, $P{XPATH_SELECT_EXPRESSION}) btw, what is the value that i need to set for $P{XPATH_SELECT_EXPRESSION}) coz im not able to load my sub report when test run. besides that, may i know what is the default datasource that you set as?. Database JDBC COnnection or xml datasource? i set the JDBC as the default but i get an error : FailedÂtoÂparseÂtheÂxmlÂdocument CausedÂby:Âjava.net.MalformedURLException:ÂnoÂprotocol:Â<?xmlÂversion="1.0"Âencoding="UTF-8"?> any help would be highly appreciated!!.. thansk in advance Post edited by: junioryy, at: 2007/05/25 03:34
  4. hi all experts, i have 1 master report which using Database JDBC connection. i would like to create a subreport which just display the Xml data based on the search criteria on master report. because i only need to extract the data from xml instead of display the whole xml file, so im thinking of use xml datasource to hel me filter out those the data i need. is it possible? May i know how to configure the xml datasource for subreport? Any help would be highly appreciated.. Thanks in advance..
  5. hi all experts, may i know can a single report cater for 2 datasource?. for example, the user detail is retrieve from the Database JDBC connection and the xml portion is get from XML datasource.. if so, how can i do it? got any example? Any help would be highly appreciated. Thanks in advance..
  6. Hi andreas.daab, really thanks for your reply. however, the xml file is located in DB and i will retrieve it based on the search critea. so currently, im using Database JDBC Connection to retrieve the data.. besides the xml file, i also need to display others data such as user info and address.. so, how can i use the xml as datasource and Database JDBC Connection concurrently? is it possible ? Really appreciated if can hear from you again Thank you so much!! Post edited by: junioryy, at: 2007/05/23 02:34
  7. hi all experts, may i know how can i display xml data instead of whole xml in the jasper report? for example : <?xml version="1.0" encoding="UTF-8"?> <logRecord> <logField className="my.com.infopro.icba10.kernel.system.domain.Branch" fieldName="branchType" oldValue="04" newValue="T8"/> <logField className="my.com.infopro.icba10.kernel.system.domain.Branch" fieldName="country" oldValue="AUS" newValue="COL"/> <logField> </logRecord> What i need is only the fieldname and the value as below: branchType: 04 country: AUS the xml is in java string. so may i know what is the appropriate textfield expression and class type that i need to set? so far i have convert the xml string to an object and pass as parameter to jasper. is it the correct way or got any good solution?. Any help and opinion would be highly appreciated. Thanks in advance
  8. Hi all experts, is there possible to pass in an object as parameter to jasper?. Actually what i need is only display the xml data into jasper report instead of the whole XML included the tag<>. the xml is in string, so i convert it to object and hope can just display the xml data and not the whole xml. I have tried the following way but get an error ERROR: Caused by: java.lang.NoClassDefFoundError: net/sourceforge/barbecue/Barcode 10:37:39,587 ERROR [sTDERR] at auditLog5_1179801424719_5174.evaluate(auditLog5_1179801424719_5174:306) my code is as below: String xmlLog = null; Object object = getAuditTrailDao().convertXMLStringToObject(xmlLog); parameters.put("XML_LOG", object); fyi, classType of XML_LOG is java.lang.object, and textfield expression is java.lang .string Any help would be highly appreciated!! Thanks in advance.. Post edited by: junioryy, at: 2007/05/22 02:36
  9. Hi all, is anyone there know how to generate the report in excel format in swing ( not web based) ?. any help would be highly appreciated.. thanks in advance..
  10. Hi teodord, really thanks for your useful suggestion.. it works like a charm now.. thank so much..
  11. Hi all, May i know how to display timestamp and clob in jasper report?. when i try to compile and run the report, the value for LOG_TIME(timestamp) and the XML_LOG(clob) field are oracle.sql. fyi, LOG_TIME class type is oracle.sql.TIMESTAMP XML_LOG class type is oracle.sql.CLOB what is the textField expression class that i need to select for the above? Any help and comments would be highly appreciated. thanks in advance..
  12. hi teodord, really thank for your reply again. Yes i save those file with the *.pdf extention. Below is my code: public void generatePdfReport(String jasperFileName, String pdfFileName, Map parameters){ Connection conn = null; try { DataSource dataSource = ServiceLocator.getInstance().getDataSource("java:DBSERVER"); conn = dataSource.getConnection(); File reportFile = new File(jasperFileName); byte[] bytes = JasperRunManager.runReportToPdf(reportFile.getPath(), parameters, conn); ByteBuffer buf = ByteBuffer.wrap(bytes); File file = new File(pdfFileName); boolean append = false; FileChannel wChannel = new FileOutputStream(file, append).getChannel(); wChannel.write(buf); wChannel.close(); } So if my client want to retrive the pdf file in swing right, is it i just need to return the byte[] and my client could open it with acrobat already? or i still need to call the exportReportToPdf(JasperPrint arg 0) method? Thanks in advance...
  13. Hi all experts, is anybody know how to convert the jasper report from byte into pdf format? I manage to generate the pdf report and save in server.. however, when pass to frontend / network rite, it automatically convert the pdf to byte. thus, in order the swing client can download the report in pdf format and save the report into local, i need to convert back the byte to pdf.. currently, the technologies dat im using are EJB3, Swing and jBoss(App Server). Any help would be highly appreciated. Thanks in advance..
  14. hi JR Help, im newbie here.. really hope can get some advice and suggestion from you. got to know that u generete the report in the server(JBoss) and send the result(JasperPrint) to a Swing Client. for my case right, i have generated the jasper report in pdf format in server(jboss). however, i dont know how to return back the pdf report to swing client for them to download the pdf report into their local pc.. the technologies i used is Java ejb3, swing, jboss.. really hope can hear from you.. thanks in advance
×
×
  • Create New...