Hide row in Crystal Reports Crosstab - crystal-reports

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.

Related

Surpress emtpy row in cross table (Crystal Reports)

I am counting unique values in a crosstab, a blank value is also calculated as unique value.
For this purpose, an extra row is then correctly displayed in the crosstab. I would like to hide this row and can't find a way to do this.
For me, only the rows with a real number are relevant.
How do I suppress this complete row?
Crystal has no option to filter crosstab.
So you need to filter the report using a record selection formula.
If you can't filter the whole report because you need the blank cases in other areas of the report, place the crosstab in a filtered subreport.

Crystal report Cross-Tab order by another column

I've made a crosstab in crystal report like below:
However, as you can see, the ordering is weirld (i.e. the correct one should be like below:)
And the ordering is stored in another field called order, I took a look in the crystal report's cross-tab expert sorting option, it doesn't allow me to order by another column, it only allows me to sort either ascending or descending, how can I set the ordering by another column?
Crosstab's sorting is based on the rows order, if you want to sort it in your on you have to add some extra rows and have to suppress subtotal and Label in Customize Style of Crosstab Expert
Example:
If you have 3 rows(A,B,C) to display and you have to sort it in order like B,C,A then you have to add 2 new rows(B,C) now your Crosstab looks like (B,C,A,B,C) now you have to suppress Rows B and C you meet your both requirements for sorting and display order
But This solution have some limitations like
if you want to export the report in Excel then it will add extra cells in grand total.
otherwise you are good to go.
Example:
If you have 3 rows(A,B,C) to display and you added one row and you suppress it to solve your sorting issue then in Excel its grand total looks like
A B C
a 1 3
b 2 2
---------------------------
Total: 3 5
Yes, you can not sort on another column. You must use any of one column as a header.
In Crystal report, sorting happened based on header column's value (That's why you see as per alphabetic).
I also face this issue and how I solved, that I am explain. You have to use a formula which have order, but either hide it or use a value like in this link.
https://scn.sap.com/thread/3341846
Second option as per this link. (I think first you check this)
http://www.codeproject.com/Tips/493334/Custom-sorting-for-Crystal-Report-Cross-Tab
https://scn.sap.com/thread/1172741
open crosstab expert, highlight the column that you want to reorder, go to Group Options and select in specified order. This will open another tab where you will have your available values listed there. Using the arrows on the right side you can move up or down your values and accommodate them in the order you want them to be displayed.
Simple way would be take order column from stored procedure to cross tab and set the order according to that column.
Then supress the order column and reduce the width of that column to minimum pixel so that it doesn't appear in cross tab.
Make the field you want to sort by a group field and hide it. To hide it, in the Crosstab Expert > Customize Style dialog select this group then use the Group Options area to Suppress Subtotal and Supress Label. Worked for me.
Use the order field as the grouping column and change the label for said column to show the actual sizes. The labels can be changed in Crosstab Expert, Grouping Options and then the tab Options.

multiple columns crosstab layout

how can I achieve below layout using a crosstab? Month in the top of the columns and columns below with their own names.
thanks
In the Cross-Tab Expert you can create groupings like this by just adding more columns (The outer-most groupings are those higher in the Column list). In your case, the first column of your Cross-Tab should be your record date with the option selected to print for each Month. Then just add the rest of your columns to your Cross-Tab as usual.
I have created the crosstab, added a formula that shows me the month name as column and the other fields as summarized fields. Then on crosstab expert -> Customized Style tab, under columns section I selected my grand totals, checked show labels and Horizontal and was able to get the desired layout. Thanks #Ryan

How to group by two fields in 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.

Is it possible to create a row that spans all columns of a Matrix in SSRS 2008?

Is it possible to have add a row to an SSRS 2008 Matrix that spans all of the matrix's columns?
This crude diagram shows roughly what I'm looking for:
The basic idea is that each line item is a person, and each column is a field in a form for that person. The fields themselves are dynamic (and implemented as column groups on the matrix). Additional column groups are included to append non-dynamic form fields, like the time the record was entered and who entered it. Under each person's record is a comments field, which should span all of the form fields above it.
At the moment I have the matrix embedded in another tablix, with the name and fields in the matrix and the comments in the parent tablix. This works for the data (each instance of the matrix ends up being one row), but the header repeats too often (once per person) because it's attached to the matrix. The only thought I have as to how to fix this is to create another matrix in the parent tablix with the same grouping and use it to display the headers... But this will require quite a lot of manual synchronization to keep the two matrices the same.
Edit: The key problem here is making the second row span multiple column groups.
Here's what you can do:
Select the column grouping you want to add above and right click and select
Add Group... Parent Group...
Group the column by something that will not aggregate the data. You'll have to select a field from your dataset to group by so that it creates an overlapping column grouping.
Check the Add group header box
You should now see something similar to this:
Now you just need to move the Value1 field and it's header over under the new column to the right beyond the matrix dividers. Once that's done, simply delete the ungrouped column where you just copied Value1 from and be sure to select Delete columns only checkbox.
Your finished product should look like this:
It is possible - And the above answers are partial answers leaving out one key step: Merging the cells of the child row.
First, right click on your grouped row, then select Insert Row -> Inside Group - Below and you will get two rows with the cells aligning on the columns
Second, ctrl click all the cells in your new row (ie row without the data) then right click on one of the highlighted cells, and then select Merge Cells.
Now you have the table you like. To add a value to the new row: first right click your new (multi column) cell,select Create Placeholder, and then add the dataset item you desire to the placeholder.
[Edit]
After several attempts, I'm going to say this isn't possible in SSRS. The best I could come up with is a group footer that spans columns 1,2, and 3, but not the User column.
[Original Response]
I recently did something similar to this.
First, what tool are you using to create SSRS reports? (I used SQL Server Business Intelligence Development Studio)
You'll want to create a row group (grouped on Person)
Append a row to your table in "Design" view (Right click, "Insert Row --> Inside Group - Below").
Add an expression to the row that pulls the value for your "Comment" column (=Fields!Comment.Value).
Let me know if that helps...
Try adding in you column group "header" with a grouping expression of (1=1). Then a detail field will need to be defined. If you define the other group with correct data then the "header" will stretch across all details columns. You may need to merger depending on other options.
The easiest way to do this is to create a Tablix with only one column, and your row grouping.
Then, you create two rows inside this group.
In the first row inside the group, you insert a Matrix, wich you can then subgroup as you prefer.
I just had a similar problem, and this was my solution.
I banged my head against the wall for a lot of time, until i realized the solution to my problem wasn't "making a cell span multiple column groups", but "making a cell split into multiple column groups".
You can accomplish the goal by using a subreport for each person. The subreport will receive the employee id and create the hierarchy for you. Make sure your subreport column widths match the widths of the parent report.