I need to merge 2 cells vertically in crystal report and then want to display avarage value. For more clarification I attached a image. Please help. Thanks in advance.
(https://i.stack.imgur.com/CluQl.png)
Its tricky. I can think of 3 options:
1) If you have some sort of common link between Paper 1 and 2 of a Subject, then you could possibly use Grouping.
2) Otherwise you will have to use Group by Formula and use Substring to match first few letters of the subject and if substring is a match then group them.
For eg: "English" for English 1st paper and English 2nd Paper to group all English papers.
3) Last and my recommended approach would be to work this out at backend at query level and return results grouped for Crystal to just dump on the report.
I cant replicate this in any of my reports unfortunately.Hope it gives you some direction. Thank you.
Related
I'm not sure if this is the best way to ask the question, but I can't think of a better one. I am new to Crystal Reports and have been basically left to figure it out on my own with just some resource books and YouTube.
My issue is this: I am building a report for a school that displays the next year's course selections. The report is pulling the values from an online form the students fill out and displays results on the report with two names, let's call them "report.name" and "report.value". "report.name" is an arbitrary value that the HTML of the form uses. I am wondering if it's possible to give Crystal a set of conditions so that I can format the way it displays to be a little cleaner.
Example:
CurrentMathClass Geometry
NextYearsMathClass Algebra 2
ElectiveChoice1-Grade10 Spanish 1
Right now the report is showing it like this because those are the values it is seeing. I would like it to be like this:
Current Math Class Geometry
Next Year's Math Class Algebra 2
Elective Choice 1 Spanish 1
Is there a way to give CR a set of conditions that tells it to print something different when it sees specific values, without removing the 'Name' field from the report?
Sorry if this questions is all over the place, I'm having a tough time organizing my thoughts. I appreciate any and all help.
Look to the right of Crystal. You'll see "Formula Fields".
Create a new formula. Call it #namechange or something.
If {report.name} = "CurrentMathClass" Then "Current Math Class".
Drag that formula object onto the report.
Help please
I have a project at school to create crystal report
where I have three columns [itemcode---price----Change]
Item codes has five different codes and all I need is how do I sort two of those items
say cu-8967 and mp-7865 this applies for all CU and MP items and under changes calculate
their differences.
Any guidance would great appreciated .
Thanks.
You can do it by using crystal report formula.
write a formula like
totext({itemcode},"00",0)
and then drag and drop the formula where you want to show the result.
I am developing a report in Crystal Reports 2011 that has 3 sub-reports pulling data from 3 different databases. I have a Multi-Value Parameter (String) in the main report that passes the input values to the 3 sub-reports which have the same Multi-Value String Parameter.
Sample Input Values are:
P000000030,
P000000930,
P000001730
The user does not want to input the leading alpha character and preceeding zeroes. They want to input the following:
30,
930,
1730
The sub-report pulls all of the records successfully if the user puts the entire string value in with the following Record Selection Criteria, but it does not work with the partial strings input:
{Command.Puchase Order} in {?Pm-?Reference}
Can anyone advise the syntax needed to pull the data in the subreport with the substrings as inputs?
Thanks in advance!
Thank you for your input guys!! I took a bit from everyone and came up with the following solution:
Create a column in the datasource that trimmed out the desired value --> ltrim(regexp_replace(a."po_num",'P',''),'0') as "Puchase Order2"
Modified my Record Selection Criteria to select for either column --> {Command.Puchase Order} in {?Pm-?Reference} or {Command.Puchase Order2} in {?Pm-?Reference}
I really appreciate your input! I am able to deliver the desired solution with your aid.
go ahead and create a formula that calculate the length of your parameter(len({?Pm-?Reference})) and place it suppressed on your report header. Then put below in your record selection formula
right({Command.Puchase Order},{your length formula}) in [{?Pm-?Reference}]
You could add the "number only" version of [Puchase Order] to your datasource...
cast(cast(right([Puchase Order], len([Puchase Order]) - 1) as int) as varchar(9))
as [Puchase Order Number]
...then use that in the select expert. I'm getting the number without the leading P, casting to int to remove the leading zeros, and then back to a varchar for the string comparison in Crystal.
You could do the same with a formula in Crystal reports. Then reference that formula in the select expert. Downside is having to repeat that in all 3 sub reports.
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.
Hi
I'm trying to write my first report!!!
and have number of question I cant seem to find the answer to can anyone help me please!
Q1.
i drag a DB field on the the report which is a string format and need to divide the value by 1024 and display the result. I know i need to use tonumber({fieldname}] but don't know where or how to add this and then do the division. how do I do it?
Q2.
on the report I have a group in its header I have the items that display across the report. in the detail I have the fields of a table that relate to above line. all good so far! How do add another Group or section that would allow another collection of data relating to the same first line!
as I see it I need to add another group with another detail section but I can't do this!
Hope this make some sort of sense!
thanks
Answer 1:
That operation should be done in a formula -- the formula editor will provide views to functionality you can access in that context.
Answer 2:
The Group Editor is what you need to use. You can access it from one of the menus at the top, or by right clicking the row header for the appropriate section IIRC.