How to repeat table in jasper report based on grouped data from SQL - jasper-reports

This is the output from my SQL query
I am trying to create a report in Jasper Studio which will create a separate table for each city.
Right now, what I have created is something that looks like below. It shows all the data with the City listed as St. Louis. What features in Jasper will allow me to do as above?

Finally figured this out.
Create a group band for your report in Jasper. (Right click report Outline-> Create Group)
Next you have two options - create group from a report object or create group from expression. I used the first option and selected City from the list of group objects displayed. Click Next.
Selected the checkbox Add the group header and click finish.
The other change I did was - Previously my headers were under column header, I moved them under the new band group header. Now it works exactly like how I wanted.

Related

SSRS report need to show n-time based on dataset rows

I have designed two pages and each page have different table.Currently my dataset return only one user details.So i have bind all details in table.
Requirement
In case data set return two user details ,need to print two user details.First two pages for first user and second two page for second user.
Is this possible in SSRS report? If yes please guide me.
As you already have a report working for a single user then I would normally do this with subreports.
Asumming your current report accepts a userid or similar as a parameter....
Create a new new report.
Add a dataset that returns a list of users that you want to produce the report for
Add a table and set its dataset property to the name of the dataset you just created.
You can remove the header row and all columns except one from the table
In the remaining cell, right-click and choose "insert Subreport"
Right-click the subreport placeholder and choose properties
Choose your original report as the subreport
Click the parameters tab and choose the subreport property name on the left side, choose the field from your dataset that contains the userid (or whatever value you pass as a parameter) on the right side.
That's pretty much it, when you run the new report, it will produce 1 row per user, in each row it will run your subreport.
You will need to use a matrix, specifically row groups, grouping by using user details, and possible inserting a page break between each instance. This should get you going in the right direction.

Merge data inside group Crystal Reports

I have a Crystal Report setup in my WPF Application. The report is grouping data based on VENDOR NAME field as shown in attached image. Now what i want is to show data inside a group only once.
I mean as in first group TOYOTA HOUSE the Vendor name is repeating although other column values are different. i want is under this group just show this record once and for other columns ADD/sum their values and show. I know i can do that in SQL query but can i do this in crystal report ?
Instead of showing in the details section add it to the group footer section.
suppress details section
and add totals in group footer

Detail field, linked to new report

I have a main report in Crystal Reports XI that I am using which has fields ProjectNumber, DateOfEvent1, DateOfEvent2, ProjectCategory.
I would like to either have an additional detail field OR hyperlink one of the existing fields so that on click it will open a new table with other records specific to that row's ProjectNumber.
I've used a parameter field with a subreport but cannot get it to dynamically create reports specific to the clicked row. I can only create full reports with all the fields (i.e. for ALL ProjectNumber).
"Hyperlink to another report object" for an existing field seems like an option, but I can comprehend how that is supposed to work.
Any help would be greatly appreciated.
Add an "on demand" subreport:
insert a subreport; check "on demand subreport"; click "Report Wizard":
click "Link" tab; link main report to subreport:
place subreport in desired location; right click and format report; choose "subreport" tab:
add a formula for both captions

Jasper Subtotal

I have a report- from another question: Jasper report data summary which shows totals for a number of columns by location. I need to sub-total some of the location_cds and am not sure where to start. I have one group - by location_cd. Some location_cds have sub-locations, i.e. 3A has 3A1, 3A2, 3A3. Right now I have the totals for each individual row displayed in the group footer. I would like to see a subtotal for any location_cd that has sub-locations. I am trying to puzzle out how I am going to approach that. Should I see if I can do that in the query or will Jasper help me out here?
I am querying Sybase ASE 15.7.0 and am using Jasper Studio 5.5.1
Sub totals are the same as totals, just check the following:
add the order by corresponding to your list - usually add the item to the order by list
ORDER BY some_name_wharever, my_subtotal_thing_to_be_ordered
create a new group using the wizard, right click the root of the report on the report inspector and select "add report group"
create a new variable just like the total one but mind the reset and increment group
That should do it. Hope it helps. Good luck.
I feel like you are trying to create a crosstab, with different subtotals and a general total... Do try looking into crosstabs.. they may be tricky to use, but the end result is great if used properly!

Crystal Reports Group Header edit

I'm trying to figure out how to change or edit Group Header titles in Crystal Reports. Group Header title is pulled from sql and I only have two Group Headers and it's the second one I need to edit. It reads SEP which is pulled from data table, but for reporting purpose I'd like it to read Separate Accounts. Group Headers are not text objects, so I don't know how to edit. Thanks.
click on the group Tab then Properties
so you can change the name
What version of Crystal Reports are you using? Exactly how do you want to edit the titles?
In the grey area of the designer, right click on the group you want to edit, select change group and look for 'Customize Group Field Name'. Depending on what version (I am looking at Crystal 2011 right now), you can choose another field or Use a Formula as a Group Name. I think that the latter should suit your needs. Create a formula (you will have to know how to use Crystal formula logic) to modify/append your groupname tiles.
Alternatively, you could make title changes in the SQL itself using SQL functions, CASE statement, etc.
I hope this helps