Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: The same table twice in the same report Post Reply Post New Topic
Author Message
JuliaRomero
Newbie
Newbie


Joined: 01 Jun 2009
Location: Spain
Online Status: Offline
Posts: 4
Quote JuliaRomero Replybullet Topic: The same table twice in the same report
    Posted: 01 Jun 2009 at 7:39am
Hi friends,

I have a report with the same table twice. One with the original name (Company) and the second with alias (Company_A). This report wants to show a "tree" of companies. With code I get a Dataset and I fill the report with it. This Dataset have two tables the original and the alias table with one and two rows expletively. The data is correct is what we expect that the report will show but this not occurs. He only see the rows of the original table and if you get more than one row in it he try a Cartesian product and we see invalid results. Can I fill the report with the correct rows to show in the report? Is there any other possibility? To help I put an example:

Fields of table Company as original table in the report: Company.

Fields of table Company as alias table (Company_A) in the report: Company and OriginCompany.

There is a relation between Company and Company_A through the field Company (original alias) and OriginCompany (alias table).

The dataset is like this:

Table Company: one row --> Company1.

Table Company_A: two rows --> Company1a, Company.

Company2a, Company.

Then the report only shows the rows of the original table Company but no trace of the alias table Company_A


If someone can help me thanks and if not also!!!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 Jun 2009 at 8:49am

Are you linking from Company to Company_A or from Company_A to Company?  It should be from Company to Company_A.

Group by {Company.Company} and put that field in the group header.
Put {Company_A.Company} and {Company_A.OriginCompany} in the details section.
 
-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.031 seconds.