Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How i create required layout in my reports.

Status
Not open for further replies.

umeshs79

Programmer
Aug 7, 2002
42
DE
Hi,
I have two tables Item and ItemComments.
The relationship between both table is by ItemID.
Means ItemID is FK in Itemcomments Table. And it is not necessary that every item will have comment.

Now i need the following layouts in my report.

ItemID ItemPrice Units
----------------------
1 $10 5
2 $15 2
3 $12 4
4 $14 3
-----------------------
Total: $51
-----------------------
Comments:
-----------------------
ItemID Comment
-----------------------
1 Comment 1
3 Comment 3
4 Comment 4
-----------------------

Means first i want to show the Item details and after end of the Item details i want to show the comments of all the items( if an item has comments).

Reply.




Umesh Sharma,MCSD
India
 
I think that you'll have to use a subreport to accomplish this. Just place a subreport in the report footer of the details report which does the comment viewing (since it's a different data set anyway, details may not have comments).

You might get there using an array to accomplish this, but you'll likely get into complications with size, etc., and the coding and maintenance probably wouldn't justify the efforts.

-k kai@informeddatadecisions.com
 
What is the data type of the comment?
If it is a memo field, you will need a subreport.
If it is a string, you could use a left outer join to the comments table, and a cross-tab (with no lines) to recap the comments at the end. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks, it's workng fine. Umesh Sharma,MCSD
India
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top