function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MohanaGopalMohanaGopal 

Data Table problem

Hi...
 
        I have to display parent and child object details in tree based Table structure in PDF..
 
IE
 
      Name                                             Amount             Total
      Grand Parent object Name 1        G.Amount         G.Total_G__c
      Parent Name1                               P.Amount         P.Total_Parent__c
      Child 1                                           C.Amount         C.Date_Child__c 
      Child 2                                           C.Amount         C.Date_Child__c 
      Child 3                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 2        G.Amount         G.Total_G__c
      Parent Name  2                             P.Amount         P.Total_Parent__c
      Child 4                                           C.Amount         C.Date_Child__c 
      Child 5                                           C.Amount         C.Date_Child__c 
      Child 6                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 3        G.Amount         G.Total_G__c
      Parent Name 3                              P.Amount         P.Total_Parent__c
      Child 7                                           C.Amount         C.Date_Child__c 
      Parent Name 4                              P.Amount         P.Total_Parent__c
      Child 8                                           C.Amount         C.Date_Child__c 
      Child 9                                           C.Amount         C.Date_Child__c 
     
 
Here my relation is
 
Child has Parent lookup.. Parent has GrandParent Lookup
 
Grand Parent Fields Amount & Total
Parent Fields Amount & Date
Child  Fields Amount & Date
 
Above are sample fields.. My requirement is like that...
 
How to achieve my requirement..
 
I think Datatable and repeat method will help me...
 
Any one has a sample code,  that will help more...
 
I dont know how to achive this....
KeithJKeithJ
I had the exact same problem recently and would be interested to see an elegant solution!
I had considered using a Map to populate my values in the controller but afaik, this can't be utilized in
a VF page.
MPIMPI
I can't be sure if this will work, but have you tried nested components? Something along the lines of a parent page with the Grandparent object controller, inside a repeat or data table you have a component which uses a variable to pass the grandparent object currently being iterated, then the component has its own internal component that does the same.
MohanaGopalMohanaGopal

Thanks for ur reply..

       But still I am in starting position.....

Thanks once again for ur quick response...

JimRaeJimRae
There was another discussion about this in a different thread. I posted an example using a custom wrapper class combined with the repeat tag that should help.
Look for the link here: http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=7930


Message Edited by JimRae on 12-23-2008 08:36 AM
MohanaGopalMohanaGopal
Hi.. Jim..
 
  Thanks for ur reply..
 
But I got following message when I click ur link
 
The page you are trying to access was not found. Please check your URL for typos and try again.

JimRaeJimRae
copy and paste the link now.  Hope it helps!