Jump to content
Changes to the Jaspersoft community edition download ×

Garbage data at end of csv file


2004 IR Help

Recommended Posts

By: bst05 - bsharp05

Garbage data at end of csv file

2005-05-19 09:13

Hi,

 

I am trying to create a simple csv report and getting a bunch of extra garbage data at the end of the file. Why does this happen, and how can i get rid of it? i am creating the report using an outputstream...i can't ask the user to save.

 

Here is the code that creates the report:

JRCsvExporter exporter = new JRCsvExporter();

res.setContentType("application/csv");

res.setHeader("Content-Disposition", "attachment; filename=historic_flow_rates.csv");

exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);

exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, res.getOutputStream());

exporter.exportReport();

 

The report just consists of 3 columns of data...

 

Here is the garbage at the end:

 

%PDF-1.4

%â£Ó

3 0 obj

<</Filter /FlateDecode

/Length 616

>>

stream

xœµ—Qoڰǟ󩼘=ÂŒ%Ž“ڒ©ÂÖ

Ô·49‚§ĆŽaâ›Â¡Uץ۹㦬t;Â"侇Ow䟎¾F«(a±{ ¯SYª‹>}IX➭£³«믄¬ꞟ”%¬˜ͦamp;ñ¯“£á„¸xØ´Ñ™ â³»ÂºUP菱ۂ爑O8  å³®  Ë»KE„v  Y

"KȚв)IS–z5Â×›0´iJퟒ Ø¶ledÓ¸XMV†¢ƒ딥±_Yµ³.µ²F·얪Y•VjE6ˆ²ÚDQ„™vã‚«pџªÂvò¶²¢s³kؽ쥼 ¯*ʮ֒‰žò¦¬´;¦h˧â»ê†Ê½Â° Ø”{©w¦?]YZ ¿ 禡mp;ä«žJR–'^e—ºQ2IJâ°Ë‰Â£IY:  %{g¬lÙ²Иid{(7¬=EŠyÂ’!¥¯ºG¨k¨ٲ*[pÛš4ò¾·µ}:F¶‰  amp;Š""¥“lƿŦퟞ z¦׬^ʶ>¹OTó”´¨Nñ®‚ºÅ‘É©ÂŽe翇7 0kmºҥ0#Š7V'Š¢锘6뜃  Â±{‡É¢m""”ʣQ ͥǂó˜¥ê­™u ¬»   RѮŠEQÂœÂJݳƲ  4å±Â—‡nkuׇP´‰°»Ž¢HшX¸«”R…±‡sƒڃQ¤ۗ‘a1  Ë¿0ˆxaU¢(RÊ”)  Â»ÇžÂ¯Ûw‡Z"

6

ñ–‡¯$¬N囌Ÿo: ò¦®bsp;

endstream

endobj

1 0 obj

<</Type /Page

/Contents 3 0 R

/Parent 4 0 R

/Resources <</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]

/Font <</F1 2 0 R

>>

>>

/MediaBox [0 0 595 842]

>>

endobj

5 0 obj

[1 0 R /XYZ 0 854 0]

endobj

2 0 obj

<</Type /Font

/BaseFont /Helvetica

/Subtype /Type1

/Encoding /WinAnsiEncoding

>>

endobj

4 0 obj

<</Count 1

/Type /Pages

/Kids [1 0 R]

>>

endobj

6 0 obj

<</Names [(JR_PAGE_ANCHOR_0_1) 5 0 R]

>>

endobj

7 0 obj

<</Dests 6 0 R

>>

endobj

8 0 obj

<</Type /Catalog

/Pages 4 0 R

/Names 7 0 R

>>

endobj

9 0 obj

<</CreationDate (D:20050519115109-05'00')

/Producer (iText by lowagie.com (r1.01;p126))

/ModDate (D:20050519115109-05'00')

>>

endobj

xref

0 10

0000000000 65535 f

0000000702 00000 n

0000000907 00000 n

0000000015 00000 n

0000001003 00000 n

0000000871 00000 n

0000001059 00000 n

0000001115 00000 n

0000001148 00000 n

0000001209 00000 n

trailer

<</ID [<a62457da669f1a23edb6ee0dc1e19deb><a62457da669f1a23edb6ee0dc1e19deb>]

/Root 8 0 R

/Size 10

/Info 9 0 R

>>

startxref

1352

%%EOF

 

Thanks in advance,

bst

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...