Solved

Parent Group and subreport in Crystal Reports

Posted on 2010-08-12
5
411 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
  • 2
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:JayConverse
JayConverse earned 333 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 100

Accepted Solution

by:
mlmcc earned 167 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 333 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now