Solved

Parent Group and subreport in Crystal Reports

Posted on 2010-08-12
5
413 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Rounding duration within 20 min intervals 3 37
Mask on Parameter CR2008 28 45
Crystal 11 Suppress main report section if subreport is blank 24 90
Problem to With line 4 43
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
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…

863 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

24 Experts available now in Live!

Get 1:1 Help Now