Print Page | Close Window

2 report description fields from the 1 DB field

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=15980
Printed Date: 04 May 2024 at 8:17pm


Topic: 2 report description fields from the 1 DB field
Posted By: paulmcm
Subject: 2 report description fields from the 1 DB field
Date Posted: 25 Mar 2012 at 11:54pm
Hi on my report I have Secretary and Executive fields which is mapped to the same DB field but I distinguish between the two with an ID field (0 = Secreaty, 1 = Director). My problem is that for a company with both my report looks like this:
CompanyName    Secretary     Director
Test                    ABC           
                                              DEF
                                              123

how can I remove the blank space from the first row on list of Directors?



Replies:
Posted By: lockwelle
Date Posted: 26 Mar 2012 at 4:00am
I don't really see a way in just 1 report
 
CR prints 1 row on the report for each row of data.  The data is coming out as 3 rows, and the logic doesn't allow them to over lap.
 
The only option that I can see is to use a subreport for the field, and to change this from a detail line to a group header or footer (so that it only appears once on the report).  The subreport would print the data, and each one would be separate from the other, so they would not have a blank space at the top.
 
HTH


Posted By: paulmcm
Date Posted: 26 Mar 2012 at 4:38am
Thanks for the advice, I will try what you have suggested.


Posted By: paulmcm
Date Posted: 26 Mar 2012 at 5:32am
On my new subreport can I pass the selected company name parameter that was selected initially on the main report to load the data into my subreport?

Ignore this I found the answer here:
http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=2241


Posted By: paulmcm
Date Posted: 27 Mar 2012 at 1:53am
lockwelle I've created my SubReport which is only returning the 1 record that I want, I've added this subreport into the details section of my main report and I'm getting the record return on each row.
You have said above "The only option that I can see is to use a subreport for the field, and to change this from a detail line to a group header or footer (so that it only appears once on the report). The subreport would print the data, and each one would be separate from the other, so they would not have a blank space at the top."
Do i create a group in my Main report and put all the fields into the header/footer of this group? Or should the group e created in the SubReport?

This is no longer an issue - I've used the RecordNumber special field to count the records in my Main report details section and added the following suppression formula to my SubReport: If RecordNumber > 1 Then True this seems to be working like i want.



Print Page | Close Window