Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Multiple SubItems Post Reply Post New Topic
Author Message
darknoobie
Newbie
Newbie
Avatar

Joined: 07 Nov 2012
Location: United States
Online Status: Offline
Posts: 1
Quote darknoobie Replybullet Topic: Multiple SubItems
    Posted: 07 Nov 2012 at 6:27pm
Hello forum,
I have just started using Crystal Reports. I'm using visual Studio 2005. I have a dataset with 2 tables.

Datable1:
MainItemIndex
ItemNumber
Description
qty
price

datatable2:
MainItemIndex
SubItemIndex
Description
qty
price

Im trying to link each SubItem(datatable2) with the MainItem(datatable1) using the MainItemIndex field. I can link them but I get the following

Item:1 Description Main Item Qty:12 Price:$12
       Description Sub Item 1 Qty 4 Price $0.50

Thats fine if I only have 1 sub item for each main item.
But If I have two subitems I get.

Item:1 Description Main Item Qty:12 Price:$12
       Description Sub Item 1 Qty 4 Price $0.50

Item:1 Description Main Item Qty:12 Price:$12
       Description Sub Item 2 Qty 4 Price $0.50

I would rather have it like the following.

Item:1 Description Main Item Qty:12 Price:$12
       Description Sub Item 1 Qty 4 Price $0.50
       Description Sub Item 2 Qty 4 Price $0.50

Item 2 .........

I have tried and googled for hours. Any help would be appreciated . Thank you

Also forgot to mention if I dont have a sub Item it does not show a main item.


Edited by darknoobie - 07 Nov 2012 at 6:28pm
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 10 Nov 2012 at 4:16am
have tried creating a in the report for table1, mainindex
then displaying the details of table2?
 
if the sql looks good and it is returning what you expect, I would think that it is just a report layout issue.
 
and i've been wrong before ;)
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 12 Nov 2012 at 11:06am
I think that what lockwelle is saying is to try creating a group on table1.mainindex (or any other field that you would use to sort the data from table1.
 
Put the fields from table1 in the group header section and the fields from table2 in the details section to get what you're looking for.
 
-Dell
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.030 seconds.