Is there any solution for avoiding data truncating in pdf export of rpt design file in eclipse? - birt

There are about 15 columns in my report file in birt eclipse. I have been facing issue of data truncating/ column cutting while exporting to pdf. Is there any way we can avoid truncation and show full content in pdf or can suggest any alternative for this problem

You should use the following options (assuming you are using the POJO or OSGI runtime) and task is a RunAndRenderTask or a RenderTask:
PDFRenderOption pdfOptions = new PDFRenderOption(options);
pdfOptions.setOption(IPDFRenderOption.PAGE_OVERFLOW, IPDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
pdfOptions.setOption(IPDFRenderOption.PDF_TEXT_WRAPPING, true);
pdfOptions.setOption(IPDFRenderOption.PDF_WORDBREAK, true);
task.setRenderOption(options);
before calling task.render() or task.run() depending on task's class.
In older releases of BIRT, PDF_WORBREAK was called PDF_HYPHENATION IIRC.
This option caused words that don't fit into a single line to break, eg.
supercalif
ragilistic
Note that is is not true hyphenation, which would mean to break between syllables. That's why the option was renamed.

Related

JMeter - PDF Conversions Produces Blank PDF's

I know there are similar articles like PDF file conversion in JMeter but they do not answer the actual problem which is "when converting a PDF to a variable/object/property then back to PDF the document whilst the correct number of pages is 'whit on white'= blank.
is there a way to :
Create a runtime variable/object/property from an existing PDF file that can be used in a subsequent action.
Here other actions happen in the Test Plan but they do not
Convert the variable/object/property back to a pdf so that when viewed it does not contain just blanks.
Notes: I do not just wish to just copy a to pdf to pdf.
I have also tried creating a UDV form the pdf using the following posted on here without success too.
${__groovy(vars.putObject("hoping_its_a_pdf"), new File("my_original.pdf"))}
Reading other posts here I have also noticed strange character strings like "%âãÏÓ" when using both putObect and props.put when viewing them post creation but as the article said, most probably page break characters or similar so I have ignored those for now as I assumed it is the conversion and not the reason for the blank content.
Can someone please assist as this is now 4 weeks in and I still have white pdf's.
We cannot state what's wrong with the code which you're copying and pasting from some random sources.
There is not problem with storing the PDF file in JMeter Variables or properties and creating the file back from them.
Demo:
There are 2 problems the only piece of "code" you're sharing:
Your way of using vars.putObject() function is wrong, it takes 2 parameters: variable name and the object value. See Top 8 JMeter Java Classes You Should Be Using with Groovy article for more information on this and other JMeter API shorthands
Apart from this the function itself is syntactically incorrect, you need to escape any comma in the function with a backslash
So if you change your:
${__groovy(vars.putObject("hoping_its_a_pdf"), new File("my_original.pdf"))}
to
${__groovy(vars.putObject('hoping_its_a_pdf'\, new File('my_original.pdf')),)}
at least this bit will start working as you expect.

Misinformation in DataStage XML Export

As the title suggests, I am just trying to do a simple export of a datastage job. The issue occurs when we export the XML and begin examination. For some reason, the wrong information is being pulled from the job and placed in the XML.
As an example the SQL in a transform of the job may be:
SELECT V1,V2,V3 FROM TABLE_1;
Whereas the XML for the same transform may produce:
SELECT V1,Y6,Y9 FROM TABLE_1,TABLE_2;
It makes no sense to me how the export of a job could be different then the actual architecture.
The parameters I am using to export are:
Exclude Read Only Items: No
Include Dependent Items: Yes
Include Source Code with Routines: Yes
Include Source Code with Job Executable: Yes
Include Source Content with Data Quality Specifications: No
What tool are you using to view the XML? Try using something less smart, such as Notepad or Wordpad. This will determine/eliminate whether the problem is with your XML viewer.
You might also try exporting in DSX format and examining that output, to see whether the same symptoms are visible there.
Thank you all for the feedback. I realized that the issue wasn't necessarily with the XML. It had to do with numerous factors within our data stage environment. As mentioned above, the data connections were old and unreliable. For some reason this does not impact our current production refresh, so it's a non issue.
The other issue was the way that the generated SQL and custom SQL options work when creating the XML. In my case, there were times when old code was kept in the system, but the option was switched from custom code to generate SQL based on columns. This lead to inconsistent output from my script. Thus the mini project was scrapped.

Loading files during run time in XNA 4.0

I made a content pipeline extension (using this tutorial) in XNA 4.0 game.
I altered some aspects, so it serves my need better, but the basic idea still applies. Now I want to go a step further and enable my game to be changed during run time. The file I am loading trough my content pipeline extension is very simple, it only contains decimal numbers, so I want to enable the user to change that file at will and reload it while the game is running (without recompiling as I had to do so far). This file is a very simplified version of level editor, meaning that it contains rows like:
1 1,5 1,78 -3,6
Here, the first number determines the object that will be drawn to the scene, and the other 3 numbers are coordinates where that object will be placed.
So, how can I change the file that contains these numbers so that the game loads it and redraws the scene accordingly?
Thanks
Considering you've created a custom content pipeline extension I presume you know how to load in data using streamreader? Where you could just empty your level data and load new data in by reading through the text file line by line?
The reason I mention this is because as far as I am aware it's not possible to load in data through the content pipeline during runtime especially because the xna redistribute does not contain the content pipeline.
Another option could be to change to using xml for the level file and use XElement which I quite recently found and this is my current method.
Here is a commented example of using StreamReader to load in simple level data from a .txt file. http://pastebin.com/fFXnziKv
In XNA 4, if you are using StorageContainer, you can do something like:
(...)
StorageContainer storageContainer = //get your container
Stream stream = storageContainer.OpenFile("Level.txt", FileMode.OpenOrCreate);
StreamReader sr = new StreamReader(stream);
while (!sr.EndOfStream)
{
String line = sr.ReadLine();
//use line to do something meaningful
}
stream.Close();
storageContainer.Dispose();
(...)
From personal experience, if you go for raw TextReader, the only problem is to get the path of your Content folder, which can be relatively easy to retrieve (in Windows only!)

Can JasperReports include a pdf in a report?

Is it possible to include an existing pdf file in a JasperReport?
We really want to append new data to an existing report with out regenerating the existing report. We will be exporting back to pdf. I'm looking at using iText's PdfCopy to merge two pdfs, but was hoping JasperReports might have an easier way...
I don't think you could do that in JasperReports, but it would be fairly simple in iText.
Generate the JasperReport, and then use PdfCopy to append the new report to the original (or vice-versa).

directly embedded subreport in JasperReports

I am so close to having this work, I am trying to directly embed one jasper subreport into the main report xml of the other. You'd think this would be easy, but I can't find a single example on doing it. Everyone seems to use files or resources or whatever. I have one report working straight from a string and I want it to contain it's subreport.
Anyone? Syntax? Thanks!
The only way I know of to do this with JasperReports is to use a separate .jrxml file for the subreport, and include it in the main report using the subreport command.
Another option you have for any embedded reports is to use subdatasets, but as far as I know they're only useful for graphs.
As it sounds like you control the code surrounding the generation of the report, you could come up with a simple format to define multiple reports in the one string, and then have your code extract each report at runtime.
When we've needed to deal with a single file but have subreports for a JasperReport, we've used Zip files, and simply zipped up the main report and all it's necessary sub reports, and then unzipped them into a temporary directory when we need to (all in code of course)

Resources