Jasper report use InputStream image multiple time - jasper-reports

I need to use some images multiple times in the footer of jasper report.
when using InputStream it is only represented once or doesn't render. The images dynamic come from data base it is represented in Java DTO object.

I found the solution, I set Using Cache property to true
jasper studio snapshot

Related

How do I create a loop for subreports?

Adding a subreport into a report with Java and Jasper Reports was easy enough, but I am having trouble making that subreport into something loopable.
The code in Java was simple enough: create report and loop through the parameters to generate subreports. The report generated at the end is a XLS file.
The hassle starts with Jasper Reports since the second iteration complains about the subreport datasource ID already being in use, but then if I generate dynamically the names in the Java code, the Jasper Report won't compile since the subreport's database name is fixed in the XML.
I could, in theory, just create several of the reports with a single subreport and then attach all of them together, but that doesn't feel optimal. How can I create the looped reports then? Is it some sort of parameter to be given in the XML from Jasper Reports or is it impossible to be done and I must use the multiple reports strategy instead?

User Defined Aggregates in JasperReports

I have a requirement in JasperReports: The user wants to dynamically select a set of columns, or a set of rows in the published report in the browser to calculate any aggregate like sum, count, etc (similar to Excel).
I am currently using Jaspersoft Studio and JasperReports Server v6.0.1. I cant find much help in my internet research and not sure if this is doable. Is this possible to achieve, If so can you please guide me through.
It is possible to generate dynamic columns using crosstab element of jasper reports. You will then have to create list of data objects(JRDataSource).
In my case, all the aggregation was done on the server side and passed the value as a parameter using a hashmap .

Create crystal report using dataset without using xsd file

I would like to ask if it is possible to create a crystal report using a dataset without using or creating an xsd file. Because there's one report here that does that. It is connected to a dataset but there's no xsd file that is used.
Of course you can, just use the report document's SetDataSource method :
YourReportDocument.SetDataSource(YourDS);

Reporting Service: Change reports based on format

I have a report that will be viewed from SSRS report manager and scheduled to send a flat file as well. The problem is that the rich display, summation rows, and some other elements that are perferred when viewing the report online or as a PDF are not wanted when the report is viewed in Excel or when it is exported to CVS. The solution I proposed was to simply have two reports. One that was nicely formated and the other that was more of a raw data feed but they want only one report meaning that I need a way to show one thing if it is viewd online or saved to a PDF and something different when it is saved to CVS or XLS. Is this possible and if so how?
When exporting to .csv format, many fields are stripped. Have you looked at what the existing functionality does to your report?
If that's not adequate, you can use the new SSRS 2008R2 global variable to change item visibility. For example set the hidden function to:
=(Globals!RenderFormat.Name = "EXCEL")
This would hide something when exported to Excel format. (This is only available since SSRS 2008 R2.)
More info on this at:
http://blogs.msdn.com/b/robertbruckner/archive/2010/05/02/globals-renderformat-aka-renderer-dependent-report-layout.aspx

Can I add a Trendline to an RDLC report?

I have an RDLC report based on custom Data sets used in a WPF application.
I have a Chart with a simple line chart.
IS there a way I can add a trendline to this RDLC report?
I had this problem recently, and just solved it this very minute.
My solution (might not be the best) was to use a stored procedure from the same database as the data to add 'trend' data to the columns returned.
To do the same, you'd need some knowledge of linear regressions, etc. Which I got from stackoverflow here
Are you using a database driven dataset or a static dataset, such as XML?
If you're using SQL Server, I can paste the function I used and you can take from it what you like =)