Jasper Report with more than one page - jasper-reports

I'm currently using the report to print out the information of all the employees using the same format.
For example, here is the employee table in my database.
EmployeeID NAME AGE
----------------------
1 Tom 28
2 John 30
3 Tony 32
I just want to print out the information of the employees using the same format whenever there is other employees in the table. (first employee in first page, second in the second page.....)
Is there any way like that?

You can use PageBreak for each row so you can have a page
To implement this solution:
add the table component to your report
open the DataSet associated with this report and add to it the Group
set Group expression to
(int)($V{REPORT_COUNT} - 1)
check 'Start on a new page' property
see the link for more detail
http://community.jaspersoft.com/wiki/ireport-how-introduce-page-break-after-pre-defined-number-rows-table-component

Related

How can i get 2 or more SSRS tablix reasons to display on the same page including page breaks

im building a report that has multiple tablix in it and i am grouping each one by name. i want to display each table, grouped by the name so that all of the tables for a particular name are on the same page. for example on the first page of the report i should have something like:
name
address
city
bob
123 main st
los angeles
name
hobbies
age
bob
fishing
44
name
net worth
salary
bob
$2,400,000
$78,000
and then the second page of the report should have something like:
name
hobbies
age
felicia
54 gordon ct
atlanta
name
hobbies
age
felicia
yoga
33
name
net worth
salary
felicia
$750,000
$224,000
where the data for each of these tables comes from either one large query or multiple queries(I've tried it both ways). I have tried multiple approaches to solve this but the one that got me the closest was creating 3 separate subreports (each grouped by name and with page breaks) and putting them all in a main report. When i do this the main report does not respect the page breaks in the subreports and instead puts all of the data for each subreport in a clump like this:
name
address
city
bob
123 main st
los angeles
felicia
54 gordon ct
atlanta
I have also tried creating 3 separate tablixes and putting them one after another with page breaks but the tables dont show up on the same page, so i end up with everything on separate pages
I've tried tinkering with group settings and also tried to use rectangles but get the same output. Can this be done in SSRS?
There are a few ways to do this but my preference would be using a single sub report.
Create a report that takes 'name' as a parameter (e.g. pName). Build the report as normal so it handles just the data that relates to the name parameter, so make sure your dataset query only returns data for the 'pName' provided. Include all three tablixes and whatever else you want.
Test the report and then..
Create another report with a dataset that contains just a distinct list of the names you want to report on.
Add a tablix (table of list) to the report and set it's dataset to be the dataset containing the list of distinct names. This will generate one row per name. Inside the first textbox in the tablix, you need to insert a subreport. Go to the subreport properties, select the report you created at the start of this. In the subreport's parameters section set the pName parameter to the name field of the dataset.
Finally, in the rowgroups panel, go to the rowgroup properties (there will probably only a be a details row group- that's OK) and then set the pagebreak property to 'between each instance'
That should do it.

Enable Drill Down according to User access in SSRS

I am basically trying to create a report where I need to take average of employees attendance per year and in another report I need to create an AVG(Attendance) for employees for each month.
So
Report 1:(Attendance Per year)
Parameters:
(Year) Attendance (=100%, >=95% and <100%,>=90% and <95%,>=80% and <90% )
|EMPID | EMP_Name| AVG(Attendance)|
Report 2(Attendance per month)
(Year) (EMPID)
|EMPID | EMP_Name| AVG(Attendance)|
My question is can I just create one report and have Report 2 as a drill Down and have only users with certain privileges access the details (Report 2 ) .
You can obtain the user from User!UserID, and use that to look up an access level. Then you can make the drilldown visible or invisible depending on user access. That should make it possible to control access to the drilldown.
Also see this post.
Does this help?

Diaply Header Name in all the pages in SSRS

I am working on a report where i gropued the date based on Employee_ID, and my report should fetch the details of the report based on Employee_ID.
Inside my report i have 4 parameters like Employe_name which is drop
down field and multiselect value.
AsoFDate parameter, which is text field. and two more parameters.
i have selected two values from employee_name parameter, for example i selected ram and rahul two employees from employee_name parameter, my report has to fetch the details of ram and rahul based on their Eid.
on page one details of ram, and on page 2 details of rahul. upto here it is working fine fine for me. Now i need to display the names of the employee at top of report.
For example if am fetching the results of ram, my report has to show the deatils of Ram like this
Ram
DepatID Designation salary
1 Programmer 20k
then when i move on to next page, it should fetch rahul details like
Rahul
DepatID Designation salary
1 Programmer 20k
2 programmer 45K
i am able to display the details, but not the employee_names Ram and Rahul at the top of corresponding report.
Yes i sorted out this issue, i placed employee_name parameter inside the table tablix. Now am able to get the desired outcome.

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.

Crystal report - print count of a record

I am working on VS 2005. I am using 2 databases called student and group.
student (student_id,group_id(int))
group (group_id(int),group_name(varchar))
I have created a connection to the database.
Now I have to create the following report
Group Name Count
Biology 14
Computer Science 10
and so on
How do I go about it?
So, you want a report that groups by Group and counts the Students in each Group?
Insert a group in Crystal Reports on group_name.
Drag the student_id field to the Details section.
While the field is selected, right-click it and select Insert | Summary. Choose Count, then Group #1.
Right click in the margin to the left of the Details section and choose Hide.
Run the report.
Insert a summary field in the footer of each group which is a count of your primary key.