Order a JasperReports report by several columns - jasper-reports

Is it possible to create a subgroup in iReport/JasperSoft Studio?
I have a report and I want to group it by name. Then inside that group I want to group it by street.
Each time I group something by name the headers I start a new page reprint the headers. That's the point where I'm at. Now I want to group (inside the name group) by street so that the headers display again each time a new street is found.

You can only use grouping on sorted data. If you need ordering by several columns you will have to pass it that way to Jasper and order the rows yourself either with multiple order columns in your SQL query or with custom Java code.

Related

Crystal Report Group by Field

I am attempting to group by order #, and display this as one row.However since the same order #, the 'Total' should only add 47.66 once.
I've attempted to use the group expert to no avail. I can do this in SQL but can't design it Crystal reports.
Create a new group by Order # and move all items from the detail section to the header of the Order # group. This should do the trick of displaying it as a single row.

Dynamic columns number in Crystal Report?

I want to make a report that runs a query on database, it gets the count of items used in a specific transaction grouped by their name, so both item's name and its count are retrieved from db, is it possible ?
The query will get results similar to this:
You can use cross tabs for this purpose.
Create a cross tab and use Item name in columns and count in rows.
There are many links when google, below is as sample
https://www.tutorialspoint.com/crystal_reports/cross_tab_layout.htm

Display one Column as Multiple Columns

I have Table Structure Like
I am Using Visual Studio 2013 and Crystal Report 13.0.12
You could use a Cross Tab for this, but you'll get more freedom by not using one:
In your report, group by Customer Name, then by TestName. Suppress all 5 of these sections except for the Group Footer of Customer Name. Here, place Customer Name, Result, and a new formula named Sugar. And inside sugar put this code:
PREVIOUS({Result})
Assuming there's no other TestNames besides Protein and Sugar, and assuming every Customer has one value for each, you should get the desired results in the footer. Let me know if that's the case and I can update the answer to accommodate.

Joining two datasets to create a single tablix in report builder 3

I am attempting to join two datasets in to one tablix for a report. The second dataset requires a personID from the first dataset as its parameter.
If i preview this report only the first dataset is shown. but for my final result what i would like to happen is for each row of a student there is a rowgrouping (?) of that one students modules with their month to month attendance. Can this be done in report builder?
The best practice here is to do the join within one dataset (i.e. joining in SQL)
But in cases that you need data from two separate cubes(SSAS) the only way is the following:
Select the main dataset for the Tablix
Use the lookup function to lookup values from the second dataset like this:
=Lookup(Fields!ProductID.Value, Fields!ID.Value, Fields!Name.Value, "Product")
Note: The granularity of the second dataset must match the first one.
We had a similar issue and that can be resolved this way.
First of All, ensure the first data set's query and second data set's query are working fine by executing separately on the Database client tool such as Datastudio.
Build two data sets on SSRS tool with the respective queries and make sure both the data sets have same key column (personID).
On the SSRS report design, create a table from tool box and add the required columns from the first data set along with the matching key column(personID). Add a new column and use look up function to get the required column from the other data set against the same key column (personID).

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.