Multiple Reports with one call/in one PDF - jasper-reports

I am just new with Jasper Reports and build two reports like:
First one: Gets as Parameter an Employee-Id and displays all employee details.
Second one: Gets as Parameter a Salery-Id and displays all salery details for a month.
Now I am trying to generate a Report that has as first page the employee details and than all salery reports for all month the employee has worked (and got money...).
So I set "Summary on a new page" to my employee report and add salery report as subreport in summery band.
But how do I call the salery report several times? I assume, I have to get all salery-Ids for the employee and pass them to salery report, but how?
Or am I completely on the woodway to do so?!

Related

Crystal Subreport Common Headers

Maybe someone can Help me find the right technique.
I have a number of Crystal Reports that I am updating (Crystal Reports XI).
These reports each have an SQL Function associated with each that either retrieves records from the database (if any meet criteria) or returns an Empty Dataset (which happens daily).
These are executed in a batch process and directs the output to a PDF file which is emailed to users.
I am relatively new to Crystal Reports.
I am attempting to use a common SubReport to format/gather data for the Headers/Footers used in these documents. So far - most of this is working as I would expect. This allows me to use a single SubReport to generate the same Header/Footer in multiple reports (at least that's my goal).
However - I added a Report Footer section to the Main Report - my plan with this was to generate a Report Footer that would contain the following information:
A static Text Message that reads " --- END OF DOCUMENT ---"
The Report Title of the "Main Report"
The Date and Time that the Document was generated and Total Number of pages.
Sounds pretty simple.
So SubReport is named: "END-OF-DOCUMENT-SUBREPORT"
I used the "Special Fields" Data Date, Data Time, & Page N of M
Since the "Special Field" Report Title is returning me the "END-OF-DOCUMENT-SUBREPORT" value I used a Parameter field to pass the Report Title value from the Main Report to the SubReport.
This all works fine - HOWEVER - with the addition of the Linked Parameter Field from the Main to the SubReport - when I execute the report to generate the document - the SubReport ends up showing a blank Report Footer - that I can click on to reveal the "END-OF-DOCUMENT-SUBREPORT" in another Tab.
Without the Parameter field - it didn't do this and the information from the SubReport appeared on the last page of the document.
Is this a standard behavior of Crystal?
I'm not sure how to Suppress the "Drill Down" feature and still display the Report Section.
You can pass variable between you Main Report and sub Report. You can also create variable and assigned them to a sub report. As aMazing mention, creating Header and Report Footer sub report is not common. It is even messy. If you want something generic, I will create a report template that you will use in the future.
Have a good day!

How to print report more than once with difference invoice numbers

Using iReport 4.5.0, I have designed the report to print invoice by giving the invoice no as parameter. The report contains Title, Page header, Detail (items in the bill), Summary, etc.
Every thing working fine. Now the client asking to print more than one invoice i.e from the list they will select more than one invoice and they want to print all?
Any idea? Do I need to change the entire report into detail section or any other idea
You can do a few things.
You can keep the report as an individual report, and execute each report with a list of Invoice Numbers. You will need to handle this in your application.
where invoice.num = $P{invoicenum}
OR
Modify the report to be a batch report that takes in a list of Invoice Numbers. To provide a list your application will need to generate a SQL appropriate list of invoice numbers/IDs what have you.
where invoice.num in ($P!{invoicenums})
OR
Create a Batch Report that uses your Invoice report as a subreport, run a SQL query based on your criteria in the Batch Report, and use the Invoice Report as a detail band that gets passed Invoice Numbers.

crystal report, subreport details section not displaying the next batch of records

I put a subreport in the footer of my main report and I set its details section to display five records per page (through the paging tab).
I am sure my query returns nine records.
Upon previewing the report, on the first page, it displays the first five records.
However, on the second page, it also displays the first five records not the remaining four records.
I am not sure where is the problem since I just started using crystal reports. Hope you can help me. Thanks.
You need to set your sub report links.
This will link the data from your main report to your sub report. In Crystal 2008 you right click on the sub report and choose 'Change Sub report links...' option. Then you can select the data to flow from the main report to your sub report. Otherwise your sub report is being viewed as a completely separate report that you are just inserting on top of your main report and it will be the same at every instance.
Also, it might be a good idea to use groups instead of the details section when inserting sub reports.

Calling SSRS report from another report

I an new to working with SSRS and creating reports.
I have created a simple 1 page report from one datasource and 6 detasets.
Report takes one parameter: EmployeeId -- and generates 1 page report for that employee.
So far all good!!
Now, I want to create another report which takes a DepartmentId. This report should generate report for all x number of employees in the department and have x number of pages.
Is there any way I can reuse the report I created earlier (the one with EmployeeId as parameter) to generate the later report I described?
Thank you :)
You could probably use a subreport, if the DepartmentId is available per Employee (i would assume it is) then that would probably be your best bet
How about you inclue the employees department ID on the detail report for the Employee, then you put an action on this field and set as target the department report. Passing the clicked Department ID to the department report and you got a nice solution.

Iterating with the subreport parameter

I have place a subreport in my master report. I have my query like, for a application I have some 3 jobID. Based on this jobID I need to fetch the related data. I placed the jobID in the detail band and passed the same to the subreport as parameter.
Since the subreport is reporting only once in the master report, even though I have 3 jobID, it is display the first jobID data in the master report.
I need to get data for all the jobID of a application.
please see whether your sub report shows value for 3id if not then it cant appear data from three reports.
also place the subreport on the details band.
simple query with tree id returnce three row in the sub report is must. then only it will apear in the main report.
Note : if you place the report on the non repeating band. then that band only show the first comming data insted of showing 3 lines.
donot place sub report on title/pageheader/column heder with repeting value.
place only those sub report on this band which give only one value or one row