This is a migrated thread and some comments may be shown as answers.

Question about Using Crosstab

5 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 2
Dan asked on 08 Aug 2011, 06:14 PM
I'm trying to recreate an old report in the Telerik Reporting environment.  I'm having trouble grasping exactly how to do this.  I think that I need to use a crosstab, but I'm unsure of how to set it up.  Here's what I need the report to print:


Page Header
-----------------
Job Code     Employee Name      Dept    
SUP               Dan P.                      10       
JAN                Karl S.                      10      

2 Employees in this Department.


(New Page)
Page Header
-----------------
Job Code     Employee Name      Dept    
SUP               John P.                      20        
JAN               Tony R.                      20        
JAN               Charles B.                  20        

3 Employees in this Department.



So I basically need to group by department.  I need to show the records for that department followed by a total count.  I want each group to display on a new page.  Does this make sense?  Is a crosstab the correct way to do this?

5 Answers, 1 is accepted

Sort by
0
IvanDT
Telerik team
answered on 09 Aug 2011, 03:45 PM
Hello Daniel,

There are a couple of solutions for your case. You can add a group and set grouping by Department and you should change the PageBreak property to Before. After that in the detailed section you can add the actual data. You can check the attached project in which the described case is implemented.

Regards,
IvanDT
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Dan
Top achievements
Rank 2
answered on 09 Aug 2011, 07:34 PM
That handles my grouping problem.  Thanks!

Now I have another question.  I'm displaying this data in rows.  Nothing fancy there.  What if I want to dynamically hide columns?  So for example, if I pass in a report parameter that indicates whether or not the Job Code column should be displayed, how would I hide that data in the report and shift the other columns over to the left side?  This is where I thought a table or crosstab would come in handy.  
0
IvanDT
Telerik team
answered on 11 Aug 2011, 09:57 AM
Hello Dan,

You are right that you can do this by using a report parameter. Also you can also use conditional formatting. I have attached to you the same sample project but with the correction you want. I use a report parameter and when you select '1' the JobCode column is shown and when selecting '2' the column is hidden.

Regards,
IvanDT
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Dan
Top achievements
Rank 2
answered on 11 Aug 2011, 03:07 PM
I understand the example you posted, but the problem that I have is this:  What happens if I want my other columns to shift over to the left if the first column happens to be hidden in the report?  I can't figure out a way to do this with conditional formatting.
0
Steve
Telerik team
answered on 12 Aug 2011, 04:24 PM
Hello Dan,

We believe the example that my colleague has attached does just that - when the first column is hidden, all the other columns move to the left. Do let us know if we misunderstand your request.

All the best,
Steve
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Dan
Top achievements
Rank 2
Answers by
IvanDT
Telerik team
Dan
Top achievements
Rank 2
Steve
Telerik team
Share this question
or