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

benjamin.hester4

Members
  • Posts

    3
  • Joined

  • Last visited

benjamin.hester4'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. My company is using iReport designer 4.6.0 and are trying to create a PDF report that uses HTML Components. If we put a large amount of HTML into the component iReport will freeze. It seems the HTML won't split over multiple pages. Is there a way to solve this and make iReport split HTML data over multiple pages?
  2. I'm using iReport 4.6 to create reports. I have noticed that the HTML componenet doesn't show up in docx or RTF files but works fine in internal preview and PDF preview. It doesn't matter how simple I make the HTML. I'm just needing HTML tables to show up in a word document of some kind. Any help would be apperciated.
  3. First off, I'm new to both Jasper Reports and Web services. I'm trying to create a web service that will send back a file to my Perl client. I'm having some issues getting it to work. I was wondering if anyone knew the best way to send a file a Perl client? I'm currently testing with a SOAP java web service that is supposed to send back a byte array. I know byte arrays use alot of memeory so I have been looking into Datahandlers and Servlets but I havn't found anything that will send back the file to my client without an error. Any help would be apperciated. I'm passing in XML data as a string to the service. JAVA WEB SERVICE CODE----------------------------------------------------------------------------------------- public byte[] sendBack(String sourceData){ String path = "C:/testing/"; JasperReport jasperReport; JasperPrint jasperPrint; JRXmlDataSource xmlDataSource; ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); try{ DocumentBuilder dBuilder = DocumentBuilderFactory.newInstance() .newDocumentBuilder(); Document doc = dBuilder.parse(sourceData); xmlDataSource = new JRXmlDataSource(doc,"/Foo/Bar"); String templateName = path + "foobar.jrxml"; //JRXML template path jasperReport = JasperCompileManager.compileReport(templateName); HashMap parameters = new HashMap(); jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, xmlDataSource); JasperExportManager.exportReportToPdfStream(jasperPrint,byteArrayOutputStream); byte[] d = byteArrayOutputStream.toByteArray(); return d; }catch(Exception e){ System.out.println(e); }return null; }----------------------------------------------------------------------------------------------- PERL CLIENT CODE use Data::Dumper;use File::Slurp;use strict;use warnings;use SOAP::Lite; print "Content-type: text/htmlnn";print "<html><head>n";print "<title>Print Page</title>n";print "</head>n";print "<body><h1><b>Printing</b></h1>n"; my $xmlString = read_file('TESTDATASOURCE.xml'); my $line = $xmlString;{ $line =~ s/t+//g; #strip all tabs $line =~ s/n+//g; #strip all new lines } my $client = SOAP::Lite->new();$client = $client->service('http://localhost:8080/jasperWebTest1/services/jasperWebServiceTest?WSDL');my $result = $client->sendBack($line); my $pdf_data = $result;open my $ofh, '>:raw', 'output.pdf' or die "Could not write: $!";print {$ofh} $pdf_data;close $ofh; print "</body></html>"; exit(0);
×
×
  • Create New...