How to group by two fields in crystal reports - crystal-reports

Currently I can group just by one field not by two fields in a cross-tab

You should create a formula field that concatenates the text of these two fields, then use that formula as the field that you group on.

For reports, you just select Insert > Group and add a second group. For crosstabs, just add them to the Rows section.
If you want to have two physically separate statuses ("Temporary" and "Permanent") like in the picture, you'll want two physically separate crosstabs (the second of which will need to be in a subreport).
It would be easier to have one crosstab and just add the Status to the Row section.

Related

Crystal Report Group by Field

I am attempting to group by order #, and display this as one row.However since the same order #, the 'Total' should only add 47.66 once.
I've attempted to use the group expert to no avail. I can do this in SQL but can't design it Crystal reports.
Create a new group by Order # and move all items from the detail section to the header of the Order # group. This should do the trick of displaying it as a single row.

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?

iReport multiple copies of same report with different label

I am using iReport 4.1.3. I have created invoice report and I want to have 3 copies of same invoice report. The first invoice should have label as "ORIGINAL", second should have "DUPLICATE" and the third should have label as "TRIPLICATE" on it.
Thank you.
If you would like to show all three copies every time you open the report, here is a creative if not elegant solution.
Add a cross join to the FROM clause of your query returning the three different copies. In MySQL it looks like this:
CROSS JOIN
(
Select 'ORIGINAL' as copy, 1 as sequence
UNION
SELECT 'DUPLICATE' as copy, 2 as sequence
UNION
SELECT 'TRIPLICATE' as copy, 3 as sequence
) x
Then add the "copy" field to your select statement. This will cause your query to return 3 records for each record it was previously returning. One record with "ORIGINAL" in the copy field, one with "DUPLICATE" and one with "TRIPLICATE". Add "sequence" to your ORDER BY clause.
Then in the report, group by the "copy" field. Force a new page for each group and you should be all set. Any variables you are totaling at the report level you will need to change to the group level ("copy" group). And if you have any controls in the Summary section, move them to the new group footer section. Also create a text field to display the "copy" field in the page or group header.
It's not necessarily pretty, but it should work.

Merging two groups with textbox and tablix together in SSRS 2008

I am facing formatting problem in generating SSRS report. I am having two groups in my report, one group is on list and other on tablix.
The first group with list contains only a textbox which display say AccountNo, while the other group has the entire table which displays the account details (AcctNo, AcctName, Type etc.).
I want to merge this two groups together, such that on each page I can see the both the groups, i.e., textbox the one with AcctNo and other with the table with acct details.
I am getting the first group on different page followed by the other group.
Can anyone suggests me how to merge these two group together on one page?
if possible in the table, the easiest way would be to create a parent group for the two groups, so both groups would have the same parent group

Hide row in Crystal Reports Crosstab

Is it possible to hide a row in a crystal reports crosstab?
I have two rows that are only used to calculate a third row and I would like to hide them so only the result is visible to the user.
I have similar problem. I want to display only rows that have specific values and ignore all others.
Here was my solution:
Open Cross-Tab Expert. In Cross-Tab under Rows select your row which should be conditional suppressed. Then select Group Options. This will open Cross-Tab Group Options dialog. Go to Specified Order and add filter. In this case, rows that match your criteria will be displayed in your cross-table all other rows will be placed in one row "Others". Then select tab Others and check Discard all others.
Not directly. I recommend grouping by a custom formula.
For example, let's say you have a crosstab that is grouped by StoreName. StoreName has values groups "A", "B", and "C". You want to combine "B" and "C".
Make a new formula field. Call it StoreName_Combined. In your new formula, enter:
If {StoreName}="B" or {StoreName}="C" then "B+C" else {StoreName}
In your crosstab, use StoreName_Combined instead of StoreName.
Edit
If you look around a little, you may also think about using Cross-Tab Expert->Group Options->Options->Use a Formula as a Group Name, but I couldn't get it to work. The rows stay separate, they just have the same name, which doesn't really help.