|
|
|
Re: How can i integrate jasper reports on scout? [message #1759956 is a reply to message #1758897] |
Thu, 20 April 2017 09:21  |
Eclipse User |
|
|
|
Hello Andreas,
Thank you for the helpful tips including the sample implementation.
I changed many things in my implementation but i successfully generated a jasper report and save it on database using a bytea field on postgres, i am having only a problem to retreive it and show on the browser
this the File field on my TablePage that i am using to retreive the content(pdf file)
public class FileColumn extends AbstractColumn<byte[]> {
@Override
protected String getConfiguredHeaderText() {
return TEXTS.get("File");
}
@Override
protected boolean getConfiguredHtmlEnabled() {
return true;
}
@Override
protected int getConfiguredWidth() {
return 100;
}
@Override
protected boolean getConfiguredVisible() {
return true;
}
@Override
protected void execDecorateCell(Cell cell, ITableRow row) {
StringBuilder linkBuilder = new StringBuilder();
linkBuilder.append(getFileColumn ().getValue(row));
String encodedHtml = HTML.link(linkBuilder, TEXTS.get("Open")).addAttribute("target", "_blank").toHtml();
cell.setHtmlEnabled(true);
cell.setText(encodedHtml);
}
}
Any ideia of how can i do it?
Thank you, Marco.
|
|
|
Powered by
FUDForum. Page generated in 0.04315 seconds