Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Dispaying one to many results from different repor Post Reply Post New Topic
Author Message
mooza
Newbie
Newbie


Joined: 21 Mar 2012
Online Status: Offline
Posts: 3
Quote mooza Replybullet Topic: Dispaying one to many results from different repor
    Posted: 21 Mar 2012 at 5:39am
Hi
 
I have report 1() and subreport 2.
 
e.g  report one has farms as a field,subreport2 has cat ,cow,chicken that belong to a farm in report 1.
 
I need to display this data in report 1 as:
 
farm1 & cat
          & cow
          & chicken.
 
I managed to get both farm1(as a field) and (cat ,cow,chicken) Farmanimals:  from subreports
 
problem is how do i put this field and subreport together to look like example above. i tried concatinating in formula using:
 
 1.
farm1 & ' & ' & Farmanimals  //& is this  e.g  & cow
 
Prblem is that Farmanimals does not return a list of all three Farmanimals.
 
2.
i tried to take farm1 as a text field, add '&' in subreport Farmanimals ,and them place this close to each other. getting  (overlapping or too apart)
 
problem is that the size of field farm1 is not fixed.
 
3.
in formula i tried to concatenate Farm1 and a declared Farmanimals  field using the command for the subreport,this shows to be working but it only returns farm1 & cat:below was done for different formulas smalteneously.
 
shared stringVar  tt;
 
 
stringVar  tt:={Command_1.Farmanimals} ;
 
{Command.farm1} &'  & '&  stringVar tt  \\tt is displayes as just one Farmanimals
 
please help,results should be :
 
farm1 & cat
& cow
& chicken.
  
 


Edited by mooza - 21 Mar 2012 at 5:49am
IP IP Logged
mooza
Newbie
Newbie


Joined: 21 Mar 2012
Online Status: Offline
Posts: 3
Quote mooza Replybullet Posted: 21 Mar 2012 at 5:40am
Please note that a table does not work is this results should show at the report footer.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Mar 2012 at 8:06am
so how about both farm and animal display in the subreport.
 
farm  &animal        farm is field, animal is a field, take a text object, type & and drop the animal.
 
the right click the farm field, format text object, common table, supperss if Duplicated.
 
done.
 
HTH
IP IP Logged
mooza
Newbie
Newbie


Joined: 21 Mar 2012
Online Status: Offline
Posts: 3
Quote mooza Replybullet Posted: 22 Mar 2012 at 8:36am
Animal is not a text field,it is a subreport and you can not have subreport in a text box.
There are not duplicates in my sub report.
My subreport dispalys:

& cat
& cow
& chicken

And this is where i specified that it should be supressed if null.

Problem is combining sub report and field farm.

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Mar 2012 at 8:40am
put the farm and animal in the same subreport
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 22 Mar 2012 at 8:41am
or...
 
set a shared variable in the main report (for the farm) and use that in the subreport if the subreport cannot get the information independantly...
 
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.014 seconds.