Why do groups appear in different orders on report? - jasper-reports

I am currently trying to group data together based on a field "type" using iReports 5.6.0. It seems to work but spreads the groups into different places see example below:
What happens
ID Name Location Type Cost
1 C1 FRA Car 2k
2 C1 FRA Car 2k
3 Transit USA Van 10K
4 Custom USA Van 20K
5 C2 FRA Car 4K
Expected Result:
Example Data
ID Name Location Type Cost
1 C1 FRA Car 2k
2 C1 FRA Car 2k
5 C2 FRA Car 4K
3 Transit USA Van 10K
4 Custom USA Van 20K
I wish the data to come out as the expected result below instead of groups seem to be split up (which I think is it the order data is fed into the report from the application)
I have tried using the keep together option but it doesn't seem to work in this situation.

When using grouping in jasper report to get correct output the data
needs to already be ordered according to the group expressions used.
See: Grouping Data in JasperReports
You can achieve this by either:
order your datasource through query ORDER BY or if using custom datasource for example Collections.sort()
or
use the <sortField/> element in the report for example <sortField name="myField"/>.
In iReport IDE open the Report Query Dialog "edit query" and click the "Sort options..." button (bottom of interface)
In JasperSoft Studio open the dataset and query dialog, find the tab "Order" at the bottom and add your field(s)

Related

How can i get 2 or more SSRS tablix reasons to display on the same page including page breaks

im building a report that has multiple tablix in it and i am grouping each one by name. i want to display each table, grouped by the name so that all of the tables for a particular name are on the same page. for example on the first page of the report i should have something like:
name
address
city
bob
123 main st
los angeles
name
hobbies
age
bob
fishing
44
name
net worth
salary
bob
$2,400,000
$78,000
and then the second page of the report should have something like:
name
hobbies
age
felicia
54 gordon ct
atlanta
name
hobbies
age
felicia
yoga
33
name
net worth
salary
felicia
$750,000
$224,000
where the data for each of these tables comes from either one large query or multiple queries(I've tried it both ways). I have tried multiple approaches to solve this but the one that got me the closest was creating 3 separate subreports (each grouped by name and with page breaks) and putting them all in a main report. When i do this the main report does not respect the page breaks in the subreports and instead puts all of the data for each subreport in a clump like this:
name
address
city
bob
123 main st
los angeles
felicia
54 gordon ct
atlanta
I have also tried creating 3 separate tablixes and putting them one after another with page breaks but the tables dont show up on the same page, so i end up with everything on separate pages
I've tried tinkering with group settings and also tried to use rectangles but get the same output. Can this be done in SSRS?
There are a few ways to do this but my preference would be using a single sub report.
Create a report that takes 'name' as a parameter (e.g. pName). Build the report as normal so it handles just the data that relates to the name parameter, so make sure your dataset query only returns data for the 'pName' provided. Include all three tablixes and whatever else you want.
Test the report and then..
Create another report with a dataset that contains just a distinct list of the names you want to report on.
Add a tablix (table of list) to the report and set it's dataset to be the dataset containing the list of distinct names. This will generate one row per name. Inside the first textbox in the tablix, you need to insert a subreport. Go to the subreport properties, select the report you created at the start of this. In the subreport's parameters section set the pName parameter to the name field of the dataset.
Finally, in the rowgroups panel, go to the rowgroup properties (there will probably only a be a details row group- that's OK) and then set the pagebreak property to 'between each instance'
That should do it.

Tableau - Related Data Source Filter

I have data split between two different tables, at different levels of detail. The first table has transaction data that, in the fomrat:
category item spend
a 1 10
a 2 5
a 3 10
b 1 15
b 2 10
The second table is a budget by category in the format
category limit
a 40
b 30
I want to show three BANs, Total Spend, Total Limit, and Total Limit - Spend, and be able to filter by category across the related data source (transaction is related to budget table by category). However, I can't seem to get the filter / relationship right. That is, if I use category as a filter from the transaction table and set it to filter all using related data source, it doesn't filter the Total Limit amount. Using 2018.1, fyi.
Although you have data split across 2 tables they can be joined using the category field and available as a single data source. You would be then be able to use category as a quick filter.

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.

crystal report, 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'.

Diaply Header Name in all the pages in SSRS

I am working on a report where i gropued the date based on Employee_ID, and my report should fetch the details of the report based on Employee_ID.
Inside my report i have 4 parameters like Employe_name which is drop
down field and multiselect value.
AsoFDate parameter, which is text field. and two more parameters.
i have selected two values from employee_name parameter, for example i selected ram and rahul two employees from employee_name parameter, my report has to fetch the details of ram and rahul based on their Eid.
on page one details of ram, and on page 2 details of rahul. upto here it is working fine fine for me. Now i need to display the names of the employee at top of report.
For example if am fetching the results of ram, my report has to show the deatils of Ram like this
Ram
DepatID Designation salary
1 Programmer 20k
then when i move on to next page, it should fetch rahul details like
Rahul
DepatID Designation salary
1 Programmer 20k
2 programmer 45K
i am able to display the details, but not the employee_names Ram and Rahul at the top of corresponding report.
Yes i sorted out this issue, i placed employee_name parameter inside the table tablix. Now am able to get the desired outcome.