Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: New User - need help with report Post Reply Post New Topic
Author Message
Tennessee Paul
Newbie
Newbie


Joined: 23 Sep 2008
Online Status: Offline
Posts: 3
Quote Tennessee Paul Replybullet Topic: New User - need help with report
    Posted: 24 Sep 2008 at 6:10am
I'm doing my 2nd ever Crystal Report using the Visual Studio 2008 version.  The report has 2 different types of detail lines, each with their own corresponding heading.  I made two groups, two details and set conditional logic to determine which one prints for each type of data.  This works great.  But I need 1 (and only 1) of the details to do a "Format with multiple columns" type display with 2 or 3 columns of the data fields in each row of the dataset for this particular detail.  I can't see a way to set "Format with multiple columns" for only 1 of the detail lines.  I'm thinking there must be some way to do what I want (perhaps an array?) but I can't find any examples on the web or in the books I have.  FYI I tried doing this task with a Sub Report for the multi column detail but I ran into problems with the headings, pagination, and using multiple datasets so I abandoned that approach.  Could someone please offer some help?
Thanks,

Paul
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Sep 2008 at 10:28am
Hmmmm, this is  a tough one. You do need to use subreports as you originally tried. An array won't do it because you would still have to format the section two different ways, and this isn't possible. I don't know why a subreport would cause problems with datasets (its still just a report). But I can see why there would be pagination issues and I doubt if there is a way around that.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Tennessee Paul
Newbie
Newbie


Joined: 23 Sep 2008
Online Status: Offline
Posts: 3
Quote Tennessee Paul Replybullet Posted: 25 Sep 2008 at 12:43pm
I was thinking that there should be a way to capture each detail record before it printed.  I could keep a counter of what record number I was on.  If it was an odd number record I could populate two variables with the two fields from the current detail record.  If it was an even number record I could populate two other variables with the two fields from the current detail record, then print all 4 variables (with the appropriate formatting) as a detail line.  I could do this until the end of the group.  At the end of the group I'd check to see if I needed to print a last line because of an odd number of records.  I guess if I had more than one group (which I do) I could reset the "what record is it?" counter in the group header.   In other programming languages this would be pretty simple, but I have no idea how to manipulate the detail section of CR like this.  Is it doable?  With something like a "WhileReadingRecords"?  If so can you give me some how to?
 
Thanks,
 
Tennessee Paul
Thanks,

Paul
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.