Jasper Reports Save PDF to disk - spring

I'm using Jasper Reports within Spring. Is it possible to let Jasper generate the PDF of the report and save it to the file system?

Of course. In fact, JasperReports includes an export parameter for doing just that. Basically, you setup your exporter however you are doing so now and set the JRExportParameter.OUTPUT_FILE_NAME parameter to the name of the file you want to save the report as, and then export the report as per normal.

You can write the bytes received from JRPdfExporter to a local file instead of the response stream. The exact solution will depend on how you are using Jasper in your application.

Related

How to Generate Dashboard Report from JMeter GUI ?

I can generate dashboard report from command line... but i have to execute test with command line for the same .... Can we generate Dashboard report from Jmeter GUI or run test from GUI and get dashboard report for the same?
In short, yes you have to run test from GUI and get dashboard report for the same.
Add a listener to your test script in GUI mode. From every test, you can generate report file (.jtl file) in default CSV format.
In your listeners, you can save your report file (.jtl file) like this. Just put the full path of your file and the run the test.
This will automatically generates the .jtl/.csv reports after test completion.
Then you can read and process samples from CSV files to generate HTML files containing graph views.
Now, Generating report from the existing .jtl results file:
jmeter -g /path/to/jtl/file -o /where/you/want/to/store/dashboard
For more, follow this referrence.
As of JMeter 3.0 or 3.1, HTML report can be generated in 2 ways:
Non GUI mode at end of load test
On demand from command line using an existing CSV file
See this:
http://jmeter.apache.org/usermanual/generating-dashboard.html
Generating a report for a load test ran in GUI will never be possible because it's a bad practice to Load Test from GUI.
But it may be possible in the future to generate a report from an existing CSV file and from the GUI:
https://bz.apache.org/bugzilla/show_bug.cgi?id=59896

How to read excel file tibco activities?

I have a requirement to read excel file using tibco palettes.Can any body please throw some lights regarding this. I am basically new to this tibco BW. Please tell me what steps should I follow?
I am assuming you are not referring to CSV files, for which you could use the File Read and Parse activities of BW.
If you want to parse or render a multi-worksheet workbook, you can try publicly available API's such as Apache's POI or commercial API's such as from Aspose to cut your own Java based solution. Then you can use the Java Code or general Java activities to embed and use that code.
And then there's another ready-to-use option available from us: an Excel Plugin for TIBCO BusinessWorks, if you wish to leverage all built-in features of BW (XPath mapping, etc) when parsing or rendering your Excel.
Edit 1:
As per your comment, you can also try the following steps, if you are looking for a more homegrown solution.
Based on one of the (public/commercial) libraries above you can write generic Java Code to parse each cell of each row of each sheet of the workbook. Output should be an XML string. Then create an XSD to match your output. It is at your discretion, which information of the cell you want to read from the workbook - you already are aware of the complexity of the API, I am sure.
Create a BW (sub)process that calls your code from a Java activity, use Parse XML to parse your XML string result into you XSD structure. Configure the End activity to use your XSD and map (copy) your Parse XML result into the End activity.
Then wrap this subprocess into a Custom Activity (General Activities Palette). Create a Custom Palette and now you can re-use what you did in many other BW projects. The path to the custom palettes can be found in TIBCO Designer - Edit- Preferences - General - User Directories
If you add Error Output schemas, you will also get typed error outputs from that custom activity.
HTH,
Hendrik

SSRS data-driven subscriptions saving pdf file on the parameter value passed

I have a SSRS 2008 R2 report, with a parameter employeeID. When we do the data driven subscription I am exporting the report into a PDF file.
The PDF is saved/generated as reportname.pdf by default.Can we save the pdf as reportparameter.pdf.
Example:If we have an employeeID as 223,can the PDF generated for that emoloyeeID be saved as 223.pdf.
Does SSRS support this scenario when the method of delivery is through email ?
The only way save the filename as you indicate would be using the ssrs api. You can't save to another filename using the subscription service as it will use the report name as the filename :(
you might want to check out Boomerang Notification Services for SQL server from Fuel9. The framework is easy to use and you can among other things control each file name. I think I have some sample code (tsql) doing just this so let me know if you interested and I'll see if I can dig it up for you.
Cheers,
/M

Using PDI transformation in Pentaho BI server as data source for report parameters

Any advice on how to use PDI transformation as data source for report parameters in BI server's console?
I've uploaded the prpt reports to BI server but the I get a message "Error parsing parameter information". The .prpt and .ktr files are both in the same directory.
Actually, just realized that the issue could be solved by adding Transformation (KTR) as a resource. In this case, one can use the File-Resources menu selection. In the dialog select the transformation you wish to import and pick text/xml format. Give the resource a name and save it. You must save your PRPT file again (File-Save).
The caveat here is that transformation should be in the same folder as PRPT file. Then in the data sources, don't select transformation via folder path, but use the name of the resource that was assigned during the previous step (there is no drop down menu for looking thorough the files). You have to know exact name of the resource in order to do so.
Check the logs carefully. I suspect it's not finding the KTR. When you select the KTR in the prpt it usually (annoyingly) saves the whole path, so it's probably the full path to the ktr as defined on your dev box.
This does work, so do persevere!

How to write a datatable to excel work book at client side

Currently i am doing one project in that we need to generate report from database.
Since my server memory is too low im getting 'Out of Memory' Exception when im writing it at serverside and also when i write directly to a excel file using http header as excel file im not able to create multiple sheets since my database table is huge more than 65536 rows.
I saw many solution using a third party tool but i cant use those into mine..If anyone already worked on this please give me some direction.
Also i tried using javascript but for that i need to use datagrid at server side??
but in my project i m not allowed to use like this.
You can open an excel file, as an xml document using the Open XML format SDK: http://msdn.microsoft.com/en-us/library/bb448854.aspx

Resources