Crystal Reports Section Arrangement - crystal-reports

I am currently working on a Crystal Report wherein I use three different commands.
I use the first command to display the details on the header of the report while the other two commands contain two sets of data for the report body itself.
My problem is that the report's format should be grouped into two wherein the first group will appear after the header and the second group will appear after the first group. To give you a better view of it, please refer to the sample below:
CLASS CODE: AC01
SECTION : A
TEACHER : Ms. Teacher 1
GROUP 1
NAME AGE BIRTHDATE
Student 1 19 12-01-1990
Student 2 22 08-04-1987
Student 3 20 07-07-1989
SCHEDULE
TIME DAY SUBJECT
10-11 AM MWF HISTORY 101
12-01 PM MWF BIOLOGY 202
02-04 PM TTh BIOLOGY LAB
Please note that I am using TextTools for GROUP 1 and SECTION Labels. I have tried adding a new Header and placing the 'GROUP 1' in it then the preceeding Details Section contains the data for Group 1. However, I cannot add another Header below the Details Section so that I can start working with the SCHEDULE.
Are there any workarounds for this problem? Thank you very much!

Alright,
I did some other research and this is what I got: http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=12033
Apparently, I had to use SUBREPORTS.
Thanks for the help! :)

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.

Jasper Report with more than one page

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

Crystal Reports 2008: Suppress Group Header when details are suppressed

I have a report that currently displays data in the following format:
GROUP HEADER
January Meter Number Name Class Facility ...
...
December MeterNumber Name Class Facility ...
GROUP HEADER
January Meter Number Name Class Facility ...
...
December MeterNumber Name Class Facility ...
I have a conditional suppression formula on the details lines that will suppress a record if one of the fields values is higher than a specific value. Everything works great if I suppress the Group Header line, but I just get a long list of the records
that are not supposed to be suppressed. I would like to leave the Group Header visible so the report is easier to read. The problem is that when I add the conditional suppression formula to the Group Header line, it only looks at the first record in the group. If that record is suppressed, then so is the Group Header, but there may be 3 months worth of records that are not supposed to be suppressed so I would still like the Group Header to display. Instead what I get is the following:
March 10003 Name Class Facility ... //Notice no Group Header
April 10003 Name Class Facility ...
December 10003 Name Class Facility ...
Group Header
January 10004 Name Class Facility ...
March 10004 Name Class Facility ...
February 10005 Name Class Facility ... //Notice no Group Header
March 10005 Name Class Facility ...
Due to the January month being suppressed for meter number 10003 and 10005, the Group Header is also suppressed. I tried placing the Group Header on the details line and that works in the since that it prints the Group Header on every line but then I format that field and suppress duplicates and it does the same thing all over again. It only displays those Group Headers where the January record is not suppressed. This wouldn't be such a big deal but I am dealing with 1000+ records after the suppression.
I have searched for two days for a solution to no avail. Is there any way to look at all records in a group instead of just the first record when it comes to suppressing?
EDIT: For those questions as to why I need to suppress the Group Header when all of the details in that meter are already suppressed it's because if I don't then I get the following:
10003
10004
January 10004 Name Class Facility ...
March 10004 Name Class Facility ...
10005
February 10005 Name Class Facility ...
March 10005 Name Class Facility ...
10006
10007
10008...
In other words, I will get a few pages of just group headers before I see one with actual details.
For the sake of illustration, I'm going to assume that the logic to suppress your Details section is contained in the formula {#SuppressDetails?}. Now, create a new formula that outputs a 1 when the section is suppressed and a 0 otherwise:
if {#SuppressDetails?} then 1 else 0
Place this new formula in the Details section and suppress it. Now, create your Group Header suppression formula such that it compares the number of suppressed Details sections to the total number of records in that group (that is, the {table.MeterNumber} group):
count({#SuppressDetails?},{table.MeterNumber}) = sum({SuppressDetails?},{table.MeterNumber})
I actually found my own way to do this which I now prefer. It's very similar to the one #ryan posted.
I first created a formula field that returns a 1 when the condition is met and I set the condition to the same condition for the detail level suppression. I put that field on the detail level and I suppressed it.
I then created a summary field that sums up that field over the group. And put that field in the group summary and suppressed that too. I then added a suppression rule to the group that said if that summary field is less than 1 then suppress the group summary too.
Viola

Crystal Reports XI - Suppress group header based on suppression status of sub-groups

I have a rather simple problem that I haven't managed to workout for myself despite many hours of searching the web.
I have a report containing timestamped data from a few thousand devices (loggers), to present the data in a sensible manner, I set up two groups in the report; Loggers and Timestamp so the data first grouped by logger id and then by timestamp which is working fine
Group 1 Logger 1
Group 2 Timestamp 01/08/2012
Data...
Data...
Data...
Group 2 Timestamp 02/08/2012
Data...
Data...
Group 1 Logger 2
Group 2 Timestamp 01/08/2012
Data...
Data...
Data...
Now the data (detail) fields are hidden from the user and I only want to display the header for group-2 if there are 4 or more records in each group-2. To achieve this I have used the following suppression formula on group-2
Count ({GMAC_spDg2Report;1.tTimeStamp}, {GMAC_spDg2Report;1.tTimeStamp}, "daily") < 4
The trick is that there are certain level 1 groups where all group-2 headers are suppressed and where this is the case, I want to hide the group-1 header as well.
Using the same suppression formula as group-2 in group 1 did not yield the desired result. I have also tried to use a running total (called {#Count Unsupressed Days}) in the group-1 footer with a distinct count and the formula below being reset on each group-1
Count ({GMAC_spDg2Report;1.strLogger}, {GMAC_spDg2Report;1.tTimeStamp}, "daily") > 4
The running total works perfectly, returning a 1 in group-1 footer if the group has sub groups that are not suppressed and 0 if all group-2 headers are suppressed.
So here is the CHALLENGE, I cannot seem to apply a suppression rule in the header of group-1 using the output from the running total.
To demonstrate the problem I created a formula field containing only the output from the running total and placed this in the group-1 header.
The results are confusing to say the least... the formula field does not show the same value as the running total and hence the suppression rule is not working.
I hope this makes some kind of sense... I feel like I have tried everything
I don't have a definite solution, but using a formula field starting with
WhilePrintingRecords;
...
the formula will be processed after all records are read, and therefore you will be able to use it in section headers with correct result.
Now there is the problem of finding a formula logic that will be of use for you, but perhaps this first step can help you in the right direction.
I had a similar problem once. As I remember, the trick was to check Suppress blank section in every detail section and checking some similar sounding option Suppress blank group (?) in group header section.
Sorry I can't give you the exact name, it's long ago and I used the German version. I know it's possible without formulas, though.
I take it you don't use sub reports. If you do, note that the trick only works if the sub report has the option Suppress empty report (?) checked along with what I wrote above.

Selectively showing groups in Crystal Reports

I have a report which displays information by group; I'd like to not show any group that doesn't have at least two items in it. Is there an easy way to do this?
Example:
Bob
3/1
4/3
Joe
3/2
3/7
3/9
Mark
5/9
James
John
8/17
9/2
Grouped on name, should not show Mark or James.
If your report is simplistic enough, you can get away with just suppressing the Group Header, Group Footer, and Details sections by using a summary function like count({table.somedate},{table.dudesname}) < 2. Note that the second parameter to a summary function has to be a field being used to group on.
Your mileage may vary with doing it this way. If you are displaying calculated summaries in the report footer, for example, it won't make sense to just suppress these groups as their data will still affect any report-level summary. The other problem you might run into is needing to use a distinct count on some field instead of just a count, depending on your table joins.
You could create a group-selection formula (Report | Selection Formula | Group...):
Count({table.field_to_count}, {table.grouped_field}) < 2