crystal report, tsql - tsql

I am working on crystal report with backend as sql server 2005.
Report is used to display tenant details with a flat in which he is residing. On filter screen i have filter Sort By tenant or unit.
When I sort by tenant, details appear as shown below,
Tenant name tenant_unit tenant_rent
A 160 1000
180 1000
B 170 2000
When sort by Unit, details appear as shown below,
Tenant name tenant unit tenant rent
A 160 1000
B 170 2000
A 180 1000
My question is, Is there any way to bring details in one line instead of two lines when sorting by unit?
FYI: On crystal I have group of tenant with sort order original.

I think I see what you want now, if you want to display details for a single tenant on one row with totals, what you need is a group:
Tenant name tenant_rent
A 2000
B 2000
To do this you can add a group on Tenant (Under Report > Group Expert) then right click on the tenant_rent field and go to Insert > Summary then set the location to 'Group 1'.

Related

How to create an Dependent measure in Tableau?

I have 2 reports displaying data as
Filter Partner Name (Applies only to Report1)
Report 1:
Country Name : XXX
Members Count:1500
Report 2:
Partner name : XYZ
Members Count:1203
On applying filter only to Report 1 : Member count changes
now how can i show the data on Report 2 for the Members Count displayed on Report 1?
Report 2 should have members count that is displayed on Report 1 only
What i'm looking is like a dynamic Count(ID) in Report 2 that changes every time there is a change in Count(ID) of Report 1
on Applying Filter to Report 1
On clicking on bar like above the Data in Report 2 must display only for the (72 members) as Shown Below
How to do this in Tableau 8?
Don't understand, why can't you just apply Partner Name filter to both reports (right click, apply to worksheets,...)?
That way both reports will only display data for the selected partners. You can even build a dashboard with both reports side by side, an put a quick filter so you can select the partners you want to show, and apply the filter to both sheets at the same time.
If this does not work, I'm going to need a little more detail of what you're trying to do, how your database is organized, and how you built the sheets.

Getting the values of the maximum record

I am facing some difficulties while developing a report. The problem is that I am getting a number of values in the Details section and I want only to display the record which it is having the maximum event number for each group (one record to be shown for each group).
My report structure is:
GH1:{Deal_NO} 1 -- Suppressed
Details:{Deal_NO} {Amount} {Event_no} {Comments}
1 1000 222 Rate
1 2345 655 Principal
1 444 111 Sell
GF1: {Deal_NO} -- Suppressed
So, my result should be:
1 2345 655 Principal
So, please instruct me on how to do that.
I tried to define in the Group Selection under Select Expert:
{Event.Event_no}=maximum({Event.Event_no},{Deal_No}), but some deals were disappeared.
You can't use that logic with record or group selection. Instead, use the logic you have but use it to suppress the Details Section. So,
//Suppress Details if the current record is not the record with the
// maximum amount for the group
{Event.Event_no}<>maximum({Event.Event_no},{Deal_NO})
Now, when you run the report every record will be suppressed except for the one with the maximum amount per group.

How to get individual group totals in report

I have a jasper report being made with iReport, which is basically a list of pages received the day prior. The report has total pages for the whole day and then individual totals for each group of page types.
The requirements state I need to display all the totals above the listed records and groups (ex. display in the title band). I created a variable for the total of all pages and that works but am having trouble getting each individual group total.
It should look like:
Total pages received: 50
Total GROUP_A: 20 Total GROUP_B: 30
When I try to use the variable set up for group totals, it only gives me the last used group, so it would say 30. I'm unsure how to create a variable to get the total for only a specific group.
I could include in my SQL result set the totals but was asked to do it within iReport.
If I understand the problem right you need to put a copy of the variable that you are using in the group and put it in your title band. the trick is on the object in the title band make sure you have set the evaluation time & evaluation group group or report depending on what you are truing to get a total of.

Crystal Reports - Total Count

looking to show an employee total on a report which has the following.
The report shows, by company divisions, count of employees to have had their annual assessment, I also wish to show total employee count per division so we would show
North Division - 50 employees had assessment out of 170 employees
East Division - 30 employees had assessment out of 50 employees
I cant seem to figure how to show the total count by division.
any pointers would be appreciated.
First of all; you need to group your data by Division.
You then need add a running total: Set it to count a a field displayed on each line (such as employee id). Then click in the "Evaluate" section - "Use a formula". Click the X-2 button to open the formula editor.
Your formula will be dependant on your data. You want it to output "True" for employees who have had their assement and false otherwise. [*]
Then in the "Reset" section, click "on change of group" and select your division group.
Now place your running total in the group footer of the division group.
[*] if this does not work, you will need to create a formula that outputs 1 or 0, on every line depending on whether the employee has had an assessment. Then create a sum on this formula to count the employees.
There are multiple methods of achieving what you want. Google "Crystal Reports Conditional Sum" for more answers.

Crystal report - print count of a record

I am working on VS 2005. I am using 2 databases called student and group.
student (student_id,group_id(int))
group (group_id(int),group_name(varchar))
I have created a connection to the database.
Now I have to create the following report
Group Name Count
Biology 14
Computer Science 10
and so on
How do I go about it?
So, you want a report that groups by Group and counts the Students in each Group?
Insert a group in Crystal Reports on group_name.
Drag the student_id field to the Details section.
While the field is selected, right-click it and select Insert | Summary. Choose Count, then Group #1.
Right click in the margin to the left of the Details section and choose Hide.
Run the report.
Insert a summary field in the footer of each group which is a count of your primary key.