Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multi Line Issue Post Reply Post New Topic
Author Message
Jay Poucher
Newbie
Newbie


Joined: 25 Jul 2011
Online Status: Offline
Posts: 4
Quote Jay Poucher Replybullet Topic: Multi Line Issue
    Posted: 25 Jul 2011 at 9:32am
Hello,
I am a noob to crystal reports but am loving what I have learned in the last couple of weeks in creating new forms for my business. However I'm running into an issue with my newest form in trying to show options of a product. I apologize but I'm more of a designer so maybe it would help by showings pictures.

Image 1.after running report



Image 1a.inside crystal reports



As you can see this looks good.Each one of these products (these happen to be chairs)can pull multiple lines of data if I insert the option fields in a group, but when I do this it replicates the product line item by however many options are added and changes my total as seen here in Image 2.



Image 2a.inside crystal reports



It looks to me like its not grouping the options under 1 product and creating new line items for each product which then totals as 8 line items when there is only 2 items with 4 options a piece.

This is the outcome I was trying to reach.
Image 3.


Should I be creating a new section? I apologize for the format in which I asked this question but this is the best way I know how to ask the question. Hopefully it all makes sense and I would appreciate any help with my issue.

Thanks
Jay

Edit-It does the same thing if I add a new section under Details.
Image 4.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 26 Jul 2011 at 2:02am
Add a Group, Group1, and have it group by Product#. Remove the Group #1 Name field that it creates and move the fields from your detail line to your Group1 line. In the details line, place the Options field.

This should get you what you are looking for, or really close to it.


Edited by FrnhtGLI - 26 Jul 2011 at 2:03am
|< /\ '][' ( )
IP IP Logged
Jay Poucher
Newbie
Newbie


Joined: 25 Jul 2011
Online Status: Offline
Posts: 4
Quote Jay Poucher Replybullet Posted: 26 Jul 2011 at 8:36am
Thanks FrnhtGLI. The visuals all look great now. However for some reason my summary total using sum for ITEMS.EXTPURCHASE is multiplying by 4 (which is the number of options the chair has). i.e. if the total of 1 chair is $500 because the chair has 4 options the grand total is $2000. It should only display $500. Help, please...
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 26 Jul 2011 at 10:29am
Try using a Running Total and evaluate on change of Product#.
|< /\ '][' ( )
IP IP Logged
Jay Poucher
Newbie
Newbie


Joined: 25 Jul 2011
Online Status: Offline
Posts: 4
Quote Jay Poucher Replybullet Posted: 26 Jul 2011 at 10:44am
Thank you again your're the best.
Last question I have a price adjustment field that can pull in tax cost, installation cost, and freight cost. I need this to be under the subtotal you just helped me create and again I dont know where to put it because it keeps multiplying the item if I put it in the group you had me make previously.

Any thoughts.

As you can see in image3 of my first post on the bottom.

Edited by Jay Poucher - 26 Jul 2011 at 10:46am
IP IP Logged
Jay Poucher
Newbie
Newbie


Joined: 25 Jul 2011
Online Status: Offline
Posts: 4
Quote Jay Poucher Replybullet Posted: 26 Jul 2011 at 11:56am
After messing around all afternoon this is where I got.



I got the grand total to work with your running total recommendation but I cannot figure out the price adjustments. I added the 2 extra sections under report footer and inserted PriceAdjustments:Desc and Priceadjustments:ExtSell. As you can see from here:



there is installation and a seperate line item sales tax, its only pulling one in, and it pulled the 2nd entry not the top,...weird. I highlighted what I mean in red here:



Also why does it change the sequence order as shown highlighted in green.

I really appreciate your help.

Edit: I just noticed now to it's doubling the options. Ugh...this is getting frustrating.

Edited by Jay Poucher - 26 Jul 2011 at 12:24pm
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 27 Jul 2011 at 3:11am
I'm going to start from the easiest that I can handle and go from there.

1. Sequence # - Create a group from the Sequence # field and move it to the top (Group 1). That will bump the Product # group to Group 2 which is fine.

2. Doubling Options - Is there any reason why it would be evaluating each option twice? What is your data source for these? A fix I can think of is to go to the suppression section for the detail line (the line the option information is on) and suppress if:

{table.productnumber}=previous({table.productnumber})
and
{table.optioncode}=previous({table.optioncode})

When I say the option code field I am referring to the field next to the option description (.C, $(5), .IE, 49, .D, $(4), .cu, 19)

3. Price Adjustment - I see the problem being that the report footer is only getting evaluated once, but not sure why it would be pulling the second item instead of the first. Not really sure of a solution, but you can try a manual running total field. Here would be how to set it up.


3.a. Initialize Manual Running Total field - Create the following formula and place in the Report Header section, suppressed:

whileprintingrecords;
global stringvar sAdjustment:="";
global stringvar sAdjAmount:="";


3.b. Calculate Manual Running Total field - Create the following formula and place in a section where the Adjustment fields can be evaluated:

whileprintingrecords;
global stringvar sAdjustment:=sAdjustment & (if {table.adjustmentdescription} in sAdjustment
     then ""
          else
{table.adjustmentdescription} & chr(13));
global stringvar sAdjAmount:=sAdjAmount & (if {table.adjustmentamount} in sAdjAmount
     then ""
          else
"$" & {table.adjustmentamount} & chr(13));


3.c. Display Manual Running Total fields - Create the two following formulas and place them in your footer under the sub-total section. Format the field's Can Grow to 0 and set it to On.

Formula 1 - DisplayAdjDesc
whileprintingrecords;
global stringvar sAdjustment;

Formula 2 - DisplayAdjAmount
whileprintingrecords;
global stringvar sAdjAmount;


3.d. Create Running Total field to calculate Grand Total - This will be a little tricky. Since the Adjustment Amount isn't being display as a number you will not be able to use it. You may be able to create a Running Total field and evaluate on change of the Adjustment Description field. Not sure though. You may have to play with that a bit.


Hopefully this has pointed you in the right direction. Please let me know how this goes and what worked/didn't work.

Also, what data source are you using. Just curious. May help me if you have further problems/questions. 


Edited by FrnhtGLI - 27 Jul 2011 at 3:13am
|< /\ '][' ( )
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.