?
Solved

Parent Group and subreport in Crystal Reports

Posted on 2010-08-12
5
Medium Priority
?
431 Views
Last Modified: 2012-05-10
I found the description of the task  I am trying to complete in Crystal Report when googling.  And it is described like this:

-hire car header
--rentals header (group)
---rental from 01-02-2008 to 01-06-2008
---rental from 01-08-2008 to 01-09-2008
---rental from 01-12-2008 to 01-15-2008
--rentals footer
--repairs header (group)
---repair from 02-02-2008 to 02-05-2009
--repairs footer
-hire car footer
hire car is the normal report and rentals and repairs are the groups. the groups are not nested. My current problem is that i cnat really create something like that and i cant change the structure to solve this problem...


Below is the 2 solutions suggested:

1.One solution would be to use two sub-reports for the rentals and repairs.

2.Another solution would be to union together the repairs and rentals. Then have crystal group on the column that specifies if the row is rental or repair data. You would also have to show/suppress the correct labels, fields, etc. This get's very clunky so your best bet is to go the sub-report route.

My question is:
Does the suggested solutions are the only 2 possibilities?

I am thrown to the task in the last moment. And I dont have days, just hours to reslove.

To the environment I am in I wish I could do something with the groupinngs, headers and footers rather then make 2 subreports, insert them in another suubreport that will subsequently be inserted into main subreport.


 
0
Comment
Question by:Aquarus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:JayConverse
JayConverse earned 1332 total points
ID: 33426257
Assuming rentals and repairs are in different tables, those are your best two solutions.  You have to be careful with the subreport solution, because the main report needs to have the entire set of hire cars for the selection criteria.   Though if you were always pulling from the car master, regardless of the number of repairs or rentals, then it doesn't matter.  It sure would be nice if rental and repair transactions were in the same table, but I guess that's why you need the union...

0
 
LVL 101

Accepted Solution

by:
mlmcc earned 668 total points
ID: 33426651
What data do you have to work with?

The method of developing the report and the kinds of reports you can build a dependent on the data available and the structure of the data.

mlmcc
0
 

Author Comment

by:Aquarus
ID: 33428790
This is my responde to mlmcc:

I am working with the recordset provided by the single stored procedure.  One row of the recordset contains fields that are displayed either on the main report or on one of the subreports.

The structure of the Main Report is :
Report Header A: - Title of the report
Report Header B: Subreport 1 that is the subject of the current question
Page Header: Labels for the Main report
Group 1 Header
Group 2 Header
Group 3 Header
Group 4 Header
Details of the Main Report
Group 4 Footer
...
Group 1 Footer
Report Footer: Subreport 2
Page Footer

As for the way the data is supplied for the report it is like this:

Rep.ttx was created that  is the data and field definition for all the fields from Stored Procedure.
Connection was created to the Rep.ttx file and Main Report and all subreports uses fields from this ttx file.  Some on Main, some on Subreport 2, some on Subreport 2.

This approach is restricted by the VB6 application, that creates the Crystal Report Object,  provides the connection, the location of the actual Crysta Report,and most important only one recordset for any of the reports.

I hope that I have answer your question.

0
 
LVL 12

Assisted Solution

by:JayConverse
JayConverse earned 1332 total points
ID: 33428849
A TTX file is a flat text delimited file, therefore you should be able to do all of this with no subreports, assuming that there is a field or formula that you can use to distinguish rental records from repair records.  All you have to do is make the rental/repair formula your second grouping below hire car.
0
 

Author Comment

by:Aquarus
ID: 33429356
Thank you JayConverse and mlmcc.  Your replies hold me within the resonable efforts.  I solved the problem and will be crediting both of you
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question