How to download normal word export not grid layout export from Jasper soft v6.3.1 - jasper-reports

I am using Jasper soft 6.3.1 and Jasperserver 6.3.0.
I am generating a report book using Jasper.
When I export report book into .docx report, this word file contains grid. Its not like normal document.
How I can download docx like normal ms word document?
Is there any alternative?
Do I need to go for Aspose.com solution, if yes, then how ?

Jasper will always export an docx-output in a table/grid structure. Unfortunately there is no other way.

You can achieve your requirements using Aspose.Words for JasperReports. The output document will be according to the elements of your report. Please read the documentation of Aspose.Words for JasperReports. I work with Aspose as Developer evangelist.

Yes, you will need to use a 3rd party library to achieve this. Aspose.Words or any other similar library would do the trick but I strongly suggest that you first take a look at this library that allows you to create a template in MS Word, with all the necessary formatting and placehoders for the data. At runtime this template is filled with data. You can then choose the output format in .docx, .pdf or .xps format.
// Instancing report engine, by assigning the data source
DocumentGenerator dg = new DocumentGenerator(DataAccess.GetOrderById(7));
// Generating report by specifying the report template and the resulting report (as file paths)
dg.GenerateDocument("example.docx", "example_output.docx");

Related

convert html report generated by protractor-html-screenshot-reporter into excel

I am using protractor-html-screenshot-reporter to generate an HTML report, I want it to be converted/exported into an excel sheet. How do I do that ?
Can someone help me out with this ?
From their Documentation:
On running the task via grunt, screenshot reporter will be generating
json and png files for each test.
Now, you will also get a summary report, Stack trace information also.
With this postprocessing, you will get a json which has all the
metadata, and also an html page showing the results.
https://www.npmjs.com/package/protractor-html-screenshot-reporter#html-reporter
Now these Json can easily converted to Excel https://json-csv.com/

OfficeWriter data marker for sheet name

We only have the Template DLL v.8 installed, we use Microsoft SSIS v.2008R2 to process the data and then use a script task to bind the data to a template.
I have a need to produce a workbook with multiple sheets, the sheet names need to be dynamic.
Can you use a data marker on the sheet name?
Yes you can. You mention version 8, but you don't specify if it is 8.0 or you have a minor version of v8.
Either way this feature was introduced in v8.5.0 of ExcelWriter.
See the OfficeWriter Change log that states:
ExcelTemplate allows data markers in tab names of XLSX/XLSM files
For more specific documentation on using datamarkers in sheet tabs see SoftArtisan's documentation
Just realize the Excel Sheet names have limitations that Excel controls, such as max number of characters, so you by limited in the data marker names you can use. One way to get around that issue would be to use ordinal syntax.

Exporting data in enhanced Grid to csv or xml format using dojo

In my project we are using dojo framework in UI. We are having a functionality to exporting the data in the enhanced grid into excel/csv files. In the dojo toolkit, they are binding the id in the textarea but i need those values in the excel/csv file...can any one help in this issue...? if possible pls tell me how to export the enhanced grid data to excel/csv files...
If you are already using the Enhanced Data Grid, you should be able to include the exporter plugin - dojox.grid.enhanced.plugins.exporter.CSVWriter - to get the CSV text.
This will give you access to two main functions exportGrid and exportSelected that will take the contents and export them as CSV text.
Unfortunately that doesn't get them as a separate file (click to download), just the formatted text in a textarea (or whatever).
To get a "click to download CSV function), you could write a servlet/jsp proxy, which would take a POST from your page with the CSV text (from the plugin above) as part of the form and simply copy it back out with the correct headers to make it appear as an attachment.
response.setContentType("text/csv"); response.setHeader("Content-Disposition","attatchment;filename=name.csv")
This would require something server side though.. and at that point, you may want to consider having a servlet simply produce the CSV text directly.
http://dojotoolkit.org/reference-guide/dojox/grid/EnhancedGrid/plugins/Exporter.html

Crystal Reports Check if export in formula

I want to add some text (from a formula) to my crystal report.
the thing is: I want this text only to be visible if I export the report to HTML for instance.
I don't want to see the text if I print the report.
Can it be done?
bye Juergen
Short answer: no. Crystal Reports, even v2008, doesn't have a mechanism to distinguish when it is being printed.
You could use a parameter field to set the field's visibility, but this will be a manual process.
You might be able to write a user-function library (UFL) to use the Windows API to determine the state of the document and return it to the report. The challenge would be to 1) find an API that can determine a document's print state 2) determine the report's 'handle'. I would go the c/c++ route for building such a UFL.
I don't think it's possible. The simplest way around your issue is to make 2 different versions of your CR report, 1 for HTML and 1 for printing.
A little redundant, yes, but it gets the job done.

Making a PDF output in raster format instead of vector using itextsharp

I have written C# code to save product specifications to a PDF document using iTextSharp, mainly with PdfPTable and Chunks/Paragraphs in the PdfPCells. However, I have been told that the output is unacceptable due to the fact that you can highlight and copy the text from the document and document storage and retrieval server software that they are currently using does not support "Vector" based PDFs. I'm not exactly certain what the difference is between a raster pdf and and vector pdf. Basically, every page of the PDF Document should be an image so that the text can not be highlighted. Is there any way to do this without using the DirectContent? Below is an image, illustrating a portion of the PDF that was created, and how the text can be selected and copied, which is the incorrect functionality.
I would like to avoid directly writing to the canvas, unless there is a way to do this and still have itextsharp handle my formatting and proper paging.
The windows application PDF2R works well, but doesn't seem to offer any programmatic solutions. I have found libraries that stated that they do this sort of conversion, but are several thousand dollars. I'd like to work within my budget and use the itextsharp or something much cheaper than this.
I would suggest you try to generate an image using the System.Drawing class and then insert that into the PDF document.
Call this code on your PdfWriter object:
writer.SetEncryption(PdfWriter.STRENGTH40BITS, null, null, PdfWriter.AllowPrinting);
This won't prevent users from selecting text, but it will prevent them from copying and pasting it. Give it a try.