Not sure how to distribute sections across pages of subreport - jasper-reports

Please let me know if the explanation needs to be more clear.
I'm trying to create a report in Jaspersoft Studio composed of three sections: customer info (a JavaBean containing name, email, birthdate, etc.), customer addresses (a list of JavaBeans containing each of them street name, number, neighborhood, etc.) and customer orders (also a list of JavaBeans containing order number, date, a simple address description, order total, etc.)
From my understanding each of those sections would be a subreport and each one would be fed by a different JavaBean datasource.
I'm not sure how to distribute them across pages. For example, the first section (customer info) is small and could fit in one page together with the second section (customer addresses). But customer addresses may eventually grow beyond one page so perhaps it should be placed in a separate subreport (I'm assuming doing that creates separate pages for that section). I'm not familiar enough with JasperReports to look up a solution, in particular because I don't know how to add two datasources to the same report/page, only to a single report. This is why I'm considering one subreport per section, even though it is not very economic regarding the number of printed pages.
Also I'm not sure in which bands should I place the sections. I was able to place the first section in the Title and the second in the Summary band, but I'm not sure where to place the third section. Placing two sections in the same band (for example, in the Title) seems to cause the sections to overlap.
Any advice?

Related

Multiple Pages in Crystal Report

My report has too many columns to display. How can I create multiple pages in a single Crystal Report?
I've tried 2 Page Headers and 2 Detail sections but it doesn't work as I expected.
This will be difficult to implement, especially if you're looking to make your report printable on paper. Crystal usually expects to make multiple pages when there's too many rows, not too many columns.
You might be able to pull this off with clever use of subreports, one for Page A, and one for Page B, then forcing New Page After and alternating them. But that's dependent on what the rest of your report looks like. If each page still has multiple rows, I wouldn't try this.

Filemaker GetSummary from related table

I'm been using FM for the first time and have a need to use Get Summary on a financial information table. This generates various summaries of different income by customer, year and type. The layout generated from this table is good. The use of Get Summary allows me to do math with the various results, whereas sub summary totals by income type (as far as I know) cannot be added and divided by each other.
The problem I'm facing is that I wish now to create a layout based on customers and include some of the Get Summary detail from the financial table. Because my new layout is based on customers, I understand I cannot use Get Summary from financial as either a related field or in a portal.
The end game is simply to scroll through customer records, one after the other, and have key financial information show on their 'home' screen if you will, for years and type.
Any help gratefully appreciated. Thanks
I understand I cannot use Get Summary from financial as either a
related field or in a portal.
No, that's not quite correct. The GetSummary() function returns the sub-summary value by breakfield - if records are sorted by breakfield. Thus if the portal (or the underlying relationship) sorts the related records by type, you will see sub-summary values in the portal. However, you won't be able to see only sub-summary values, since a portal has no sub-summary parts.
There are other ways to show summarized related data. If you don't have (and don't expect to have) a large amount of records, considering filtering a (one-row) portal to show only a specific type of related records, then place the summary field inside it. Of course, this assumes the types are known in advance and unchanging.

Linked Sub-report Organizing Strategy

Is there a logic to deciding how to structure a master report with sub-reports?
For example, I have a 360 (employee feedback) report I'm trying to make, where there are 4 different ways of presenting the data. Each different presentation has a different page header & uses different groupings. So I think I need to make each presentation into a separate report & then bind them all together in a master report with subs.
But, how should I structure the master.
For example, should the master be the one with the most complex data, and then the other, simpler, sub-reports get tucked into headers & footers relative to where they need to be in relation to that 'core' report? Or should I make the title page be the 'master', with conditionally suppressed page headers and then put each way of presenting the data as a sub-report into a separate group header in order within that report?
i.e. what is a good organizational strategy for this?
If you need your subreports to repeat for each group of data or each detail record in your main report, then your subreports belong in a group or details area.
Another thing to consider is whether your subreports would ever make sense as 'standalone' reports - could they exist outside the context of the main report? In that case, design them this way, and make use of the 'reimport subreport' feature on your eventual main report(s) to automatically pick up changes.
Otherwise it doesn't really matter, as long as you can get the layout you want - in that case, just do what is simplest.

Crystal Reports Splitting Page up into Thirds

I have been asked to mock up a report in Crystal (i would normally use SSRS but the application uses crystal for report), and i need to split the page up into thirds. The idea is that the top 2 thirds are for the customer, then there will be a tear line on the paper and under that will be the section for us to keep.
What is the best way to accomplish this, baring in mind the report could go over 2 pages?
Cheers
Luke
Based on my understanding of the requirements, you just want to space things out over a customer's order (or something similar). I am assuming the grouping will be by customer with items in the details sections.
1) If all fields required are in a single records, and you can stick by the "2/3's page" visually, you can force the spacing simply by extending the reporting band sections. i.e., Increase the page header and include some customer information, or do the same with a group header, etc. and then space out a single details band with fields spread out as is visually pleasing.
With the spacing done this way, you can also embed a small band that holds only a dashed line, which will be a visual tear line.
Fields placed in the next band will be the portion that you intend to keep.
2) If the customer section will have multiple items in details -- be smaller or larger (i.e., if you are pulling in an inventory list that may have 1 or 21 items), then you can still something similar, but not using enlarged, fixed band sizes. You can put customer general information in a group header, followed by multiple details (records), and end with a two-band group footer. The first band can be any closing information for that customer, followed with a visual tear-bar, and the last band can be the information you wish to keep.
Grouping by customer and forcing new pages for each customer should give you what you're looking for.
I hope that's clear enough to give you two alternatives.
D'Oh... and, forgot to include: You can use the Section Expert to format a group footer to Print At the Bottom Of Page, forcing the portion that you want to keep to the lower part of the page. On a multi-page printout, it would be forced to the bottom of the nth page.

Adding a new group in Crystal Reports causes all of my existing groups to disappear

My problem in a nutshell: I create a new report, I insert a number of groups one at a time, and everything goes fine until I add the final group and suddenly I get zero results back for the entire report.
I'm new to Crystal Reports, so I'm not even sure I'm using the right vocabulary, and I'm sure this is one of the reasons I'm having such a hard time googling this. I have a book I'm going through (Pro VS 2005 Reporting Using SQL Server and Crystal Reports) but it's very specific about putting forth a set of steps to follow and it doesn't really explain the why of things.
I'm using VS 2005, C#, with built in Crystal Reports; I don't have a fancy stand alone version.
I am creating a DataSet and passing it into the report as the report Database. The DataSet has four tables: a user table (which includes a user Group ID), a course table with a list of courses that the user has taken, an exam details table with details about each exam in the course (including an exam score), and a topic details table, with information about exam topics (including a score for each topic on the exam).
I can add a user group group, a users group, a courses group, and an exam group, and return the details for each exam. But when I add a topic group everything disappears. If I add a topic group by itself I see a list of topics, but making the topic group an inner group of any other group only gives me a blank report.
I checked and I have relations defined between all my tables that should indicate which topic goes with which exam, etc.
Let me know if you need any additional information. I'm sure this is something simple that I'm overlooking because I don't have a dedicated Crystal Reports book.
Can you try and re-create the essential SQL that is being used, directly in the database? It sounds like you're getting data back until that last group is added, and that makes the query now return an empty set.
One of the remedies I found was removing underscore from sql fields, to keep the other tags from disappearing. I was initially having the field "abc_xyz" in sql, had to change it to "abcxyz" to make it work in crystal.