How to Suprress a Group Header and Display It Upon Group Drilldown? - crystal-reports

I'm using Crystal Reports XI to render data from a SQL Stored Procedure. I have created a group in Crystal and have set several summarization metrics for the group. There are half a dozen fields that need to be displayed for each record in a given group. I want to display my summary headers when the group details are hidden and display my detail headers when the user drills down into a group.
I've created two Group Headers. The first contains the headers to display in summary and the second contains headers to display on drilldown. How do I ensure that Group Header B is suppressed until the user drills into the group details?

What I have done in the past is in the section expert or format object, use the X-2 beside the Suppress option. Then enter the formula DrillDownGroupLevel = 0, DrillDownGroupLevel = 1, etc. The number represents how far you are drilling down before it shows up.

Related

Merge data inside group Crystal Reports

I have a Crystal Report setup in my WPF Application. The report is grouping data based on VENDOR NAME field as shown in attached image. Now what i want is to show data inside a group only once.
I mean as in first group TOYOTA HOUSE the Vendor name is repeating although other column values are different. i want is under this group just show this record once and for other columns ADD/sum their values and show. I know i can do that in SQL query but can i do this in crystal report ?
Instead of showing in the details section add it to the group footer section.
suppress details section
and add totals in group footer

Crystal Report: skip page if detail section is null

I have a subreport to filter the processing of specific products within a selected week set by the user. The subreport has 5 groups section and a detail section.
Specifically, the groups filter the data like this:
Group1: filters the starting date of the process
Group2: filters the products' group
Group3: filters the products' code
Group4: filters the products' number
Group5: filters the products' sub-number
I use group1 section for writing some simple text. In the detail section, I put some fields. Now when I have no record in the detail section, the sub-report prints the text of group1. For example, because in the day of the print there isn't any processing work.
How can I skip the page if the detail section has no records? (Or perhaps it is necessary to suppress the group1?)
Try to right click on the section, go to section expert, and check suppress blank section. This should hide the section if there are no values for that particular day
You should try supressing the group 1 if the details section is null. I'm not sure that you can actually skip a page.
If you are wondering how to know if the details section is null, maybe using a shared variable inside that section, which will count how many records will be inside the details section, to be used in the supression formula for the group 1.

Crystal Reports: how to repeat Details A section on every page

I'm creating a report in Crystal. It's a pretty basic report: I have two groups based on the same date field: year and month.
Those two groups serve as a way of organizing my details. I have the details hidden so they can be drilled down upon.
So when you first view the report, you just see the year(s) for group 1, and then the months for group 2.
If I wasn't using the grouped dates in this way, and was just creating a basic table, I would put the field headers in the page header section, which would automatically put the field headers on every page. However, since I have the grouped dates (hiding the details) on my first page, I can't put the field headers in there.
As a result, I created two detail sections (A and B). I put my field headers in A with the suppress formula (not onfirstrecord). This serves my purpose, but for when the report details fill up multiple pages, my Details A sections will only display on the first page.
Is there some formula or other way for me to:
1) Keep my field headers in Details A, but repeat the field headers on each new page?
2) or, move my field headers to the Page Header section, but somehow suppress it when my groups are being displayed on my main page (where the year and month groups can be drilled down on)?
Thank you!
You may want to use a repeated group header.
To do this open the Change Group Options dialog (right click on a group header, then choose Change Group). On the Options tab check Repeat Group Header On Each Page.
Put your headers for your detail section in a group header (maybe an additional one just for this purpose). Repeat this header on each page.
You can even detect if the header is printed the first time or if it is repeated using InRepeatedGroupHeader. This way you can implement a 'continued' on a repeated group header.

How to get a page per register stored in DDBB in jasperreports?

I have a report with the following structure:
PAGE HEADER
DETAIL BAND (12 of those)
SUMMARY BAND
The detail bands show depending on expressions I specified. Also, the content of the detail bands are subReports, one per detail band (don't know if that is relevant or not here).
What I'm trying to achieve is to execute the report without any filter as the ID or any other field of the table. Instead, I want to extract the information of all the registers of one specific table (let's name the table USER).
What I'm expecting to find when I execute the report is something like the following:
PAGE HEADER
detail sections (shown depending on the expressions )
SUMMARY
What I'm getting looks similar to the following:
PAGE HEADER
DETAIL 1 (for user1)
DETAIL 2 (for user1)
DETAIL 1 (for user2)
DETAIL 4 (for user3)
and never the summary band (just at the end of the report)
As you can see, all the users are getting mixed while what I want to do is to start a new page for each one of them.
QUESTIONS:
How can I get the report to show each one of the users from the table
in separate pages?
Is there some property I missed that allows me to
do that?
Thanks!
I think I found a way to solve this challenge. I just made a group (Group1) based on the ID's of the users and put the content of my Page Header inside the Group Header just created. Did the same with the Summary band, put all it contents inside the Group Footer.
Then, selecting the Group Header (or the Group Footer) I checked the Keep Together and the Start New Page checkboxs from the Appearance tab.
Furthermore, for each one of the detail bands, selected the Group1 just created for the Group Changes selection combo in the Appearance tab.
I didn't do much testing yet but it seems like it's working as I wanted it to. If I find any other (better) solution I'll update the answer. Still open to hear advices though.

crystal report - repeat group header across multiple column

I have a report that has 3 columns and it is grouped by a value that i display in the group header. The report is setup to run down then across.
If the details span across multiple columns, how do I repeat that group header on the next column.
I have already checked "repeat group header on each page" in the group expert.
I have already checked "format groups with multiple column" in the Layout tab of the details section.
It will not let me insert a text object in the group header of each column.
Not sure how to do this. I could write a formula to only show at the top of each column, but not sure if there is a function to find out when the second column has started.
edit
What i want is below
Group Header Text Group Header Text Group Header Text
Detail Values Detail Values Detail Values
Detail Values Detail Values Detail Values
I would like to have the Group Header Text show at the top of each column. Doesn't matter if its the start of a new group or in the middle of the group.
thanks.
okay, I have your solution, the field, that you are grouping by , just place it on to the page header and it will repeat itself on every page until the columns of that group are finished.
Lets say you are grouping by Employee Names, just put the Employee Name field on to the page header and it should solve the issue, I jsut tried it and it worked, thanks.
There is Previous() function available in formulas that allows to show-hide a Text Object based on the change of specific field value from previous to current record.
Is this what are you looking for? Can you edit you question drawing a sample af what you have and what you want?