Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Crystal Report & two tables Post Reply Post New Topic
Author Message
PaulMinsk
Newbie
Newbie


Joined: 11 Mar 2009
Location: Byelorussian SSR
Online Status: Offline
Posts: 2
Quote PaulMinsk Replybullet Topic: Crystal Report & two tables
    Posted: 11 Mar 2009 at 7:47am
There are two tables in my dataSet. Can I display the tables (header 1<-> table 1 &  header 2<-> table 2) in Crystal Report (two tables - one report)?
Thanks (Crystal Reports VS 2008).
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Mar 2009 at 12:37pm

You will need to create some empty formulas in the report  header sections and then you should be able to use code pass in the field values from the dataset tables. These formulas become part of a collection and you can reference the collection by name (a string) or the index number (an integer). For simplicities sake I always use the name.

Without looking, I believe this is done using the datadefinitions properties, though the .Net help file will give you the correct syntax for the object model.
 
Perhaps others can help with the explanation or correct any errors I may have made.
 
Apart from that, I hope this gets you pointed to the solution you need.
 
Regards,
John W.
IP IP Logged
jbleep
Newbie
Newbie


Joined: 11 Mar 2009
Location: United States
Online Status: Offline
Posts: 4
Quote jbleep Replybullet Posted: 11 Mar 2009 at 12:51pm
You can insert a subreport anywhere you want.  So do one report as you normally would, and then in the report footer of that one, after the last group, on the menu insert subreport.  You can create one, and it can be related to the first one or not.  It can be anything you want, and can use any tables you can access.
JB Leep
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 11 Mar 2009 at 1:20pm
Sorry my mind was seeing a different question than the one you asked. I was trying to make it harder than it needed to be. You should be able to  create the dataset and put the datafields wherever you want them. I do have some recollection that  CR likes the datasets to be strongly typed. The subreport solution is one way but depending on what you want to do may be not be needed.
 
My apologies for what was a poor suggestion.
 
Regards,
 
John W.
IP IP Logged
PaulMinsk
Newbie
Newbie


Joined: 11 Mar 2009
Location: Byelorussian SSR
Online Status: Offline
Posts: 2
Quote PaulMinsk Replybullet Posted: 13 Mar 2009 at 1:39am
Thanks for your help.
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.