So I am trying to suppress a specific bar on my bar graph. So instead of populating the graph from the database, I am populating it from a formula field. So in my formula field, I have something like this:
if field <> "Member" then
formula = field
So it gets rid of the field however it leaves me with this:
I know I can make a subreport that gets rid of that field from the beginning, but I was hoping to avoid creating a subreport for this.
Any ideas? Thanks!!
Instead of leaving the group name as blank when the field is "Member", I suggest changing it to be the same as another group which you can always expect to appear on the report - perhaps "SR not handled timely".
This would lump in all the member values with the other group's values, so if you haven't already done so, I suggest graphing the value of a derived field which is set to 0 for "Member". (I suspect you have already done this, as the blank group is showing a value of 0.)
The least error-prone method is probably the subreport. If this report is very dynamic, and you always want to hide group A in the graph regardless of it's value, then this is the best way to go.
If a static number of groups will be appearing in your graph, you can limit to display the top N groups. i.e. If there are 7 groups total, and you only want to hide 1 of them (which always has a value of 0), then you can display the Top 6 groups (picture is of Crystal XI):
Thanks for all the help guys, the data will be pretty dynamic.. So I am going to go with the subreport. I will add those little tricks to my toolbox though! Thanks again.
Alternatively, you can set a "specific order" and only include the values you want to include in your graph. In the "Other" tab you need to select "Discard all others".
Related
I have a main report that uses a formula in the Record Selection. The numbers are set by choosing the "is between" option in the Select Expert. I need these numbers to go through to the subreport, however, no matter what I do, I can't get both numbers through to the subreport, just the one. Is there any way I can pass both these numbers through to the subrport? Neither of them are based on parameters, we use a system here at work where the parameter is set at runtime.
Attached is a picture of the main reports' Select Expert - I need to get the 2 and 6 through to the subreport. Is this possible?
Thank you.
The answer in the link below seems to work, if you have a similar problem. To quote:
Create two formulas
MinValue as Minimum({vw_P_SDL_MTDSummaryList.PAYROLLDETAIL_ID})
and MaxValue as Maximum({vw_P_SDL_MTDSummaryList.PAYROLLDETAIL_ID})
and pass them to the subreport as a parameter without linking it to any of the > field in sub report.
http://scn.sap.com/message/16971134#16971134
I have a master report (using iReport 5.0.4) with a subreport that uses grouping by a field called "Group Number" (sorry, but that is the actual column name).
My report works fine when there are more than one group, but it generates each group result scrolling down the page vertically.
I would like to be able to have each group go across vertically, but when I tried using columns, it simply forces each group's data into columns, and not the entire group 1, followed by group 2 in the next column, etc.
There can be up to 8 groups, so I was hoping not to have to create 8 individual sub-subreports with a "print when" expression to show/hide them.
Can anyone tell me if this should be possible?
Thanks,
Mitch
I think making subreports is the easiest and obvious way. But if you want to make it in other way, I can only suggest to use scriptlet, and form dataset manually (Transpose it).
Another suggestion is when you generating report directly from database (i.e. passing connection into jasper) you can modify query and transpose the data (PIVOT table).
Anyway provide more info about your case. I will try to help you.
I have a stacked bar chart in Crystal Reports which is used to display the number of employees in each process area that still require training.
Crystal automatically sorts fields in each bar on the bar chart alphabetically, this would normally be fine but I want to rearrange the order in which the areas appear so that they coincide with the production sequence.
I thought that I would be able to rearrange the order by going to Chart Expert>> Data>>Order and clicking on Specified Order. But this doesn't appear to be working so I must be doing something wrong.
Does anyone have any advice?
Any help is greatly appreciated.
I'm assuming the chart risers (= the bars) are coming from a grouping level you've specified in Group Expert and selected in Chart Expert.
Here's what to do:
In Group Expert, insert a second group. Leave the original group unmodified so you don't inadvertently affect the chart.
Set the new group to group by your sort key – the field that specifies the desired order of the bars.
Move the new group up in the group list – so it precedes the original group.
Suppress the new group's headers and footers.
Now Crystal will first sort your records by the sort key, and then by the field you're currently using. You should get the same risers in a different order.
Note: If the records for a given bar have differing values for the sort key, this won't work. If that's the case, you'll need a summary field and Group Sort Expert instead.
I just encountered this problem. My solution was as follows:
In the "Chart Expert" Select the field in the "On Change of" block
Click the TopN button
"For this group sort" to "All"
"based on" the field you want to sort by.
This will keep your bars labeled as their original category, but instead of writing in alphabetical order they will sort by the field you choose.
I have a multi-column Crystal 2008 report that is grouped on a date field, and I want to prevent that group from being split across the column to column boundary.
Googling it, it seems impossible - no one even has some sort of hack for faking it.
Here is an image of the issue - I would like Friday the 26th to all be in the second column.
Nothing is impossible!
While initially discouraged with the voted answer, I kept searching and found something about using a subreport for the "details". Then I used a mailing label, although this may not be necessary, but in my use I wanted each group to have identical size, this worked perfect to make sure the groups stayed together in the columns. It is a little clumsy but seems the subreport won't cross columns.
Anyway this is an old topic, but thought I would leave this here just in case someone dusts it off.
Looks like this is impossible for now.
Right click the group, select 'Change Group...', select the Options tab, check the 'Keep group together' option.
If you can determine beforehand that you want the group to print on the next column, have a blank detail line extra at the bottom of the detail lines and check the print at bottom of page and suppress it with a formula that is controlled by either a crystal variable or a database field. This is the only way I have found to cause a group to stay together. You find the print at bottom of page in the section expert, add the blank line as the last of your detail lines.
I have several groupings in my report, and based on a formula, sometimes there are no rows displayed for the parent grouping. How can I hide the parent grouping if there are no rows displayed? I have SupressIfBlank set to true but that doesn't seem to do anything.
I'm a little rusty, so bear with me....
In the section properties for the group totals, there's a setting for "Suppress", and one of the options is a button that lets you write a formula (in the most recent version I used, this was blue if blank & red if there's a formula written). Click this, it'll take you to the Formula Editor. Write something that counts the rows and returns a Boolean: True for zero rows, False for non-zero.
According to this similar question I found on the Internet, it doesn't seem like CR has this functionality built in. The options presented there are as follows:
Restructure the report's queries so that group headers aren't returned if the detail records are missing. As in you push the formulas down into the queries themselves so that the headers are never returned.
Count the number of detail records on a per-header basis. So you make a formula for the header's suppress field, and suppress it if the detail count is 0.
Either of those should work with the majority of reports. Don't know the specifics of how to implement them, though.