you could use links something like

def get_stuff(user_id):
    # fetch the items for that user
    # iterate through items, intersperse with BR()
    # return the whole mess in a SPAN()


# Caveat: not sure of following syntax and too lazy to look it up in manual
# Just look in the writeup for smartgrid
links = [{'head': 'Purchases', 'body': lambda value, row: get_stuff(value)}]

form = SQLFORM.smartgrid(....links = links....)


On Tuesday, April 30, 2013 6:54:51 PM UTC-4, Alex Glaros wrote:
>
> Am returning to this question as I have a better description of what I'm 
> looking for.
>
> The example is the owner's list of all shopping purchases in a store for 
> one day.
>
> George - 10 coffee cups
>                1 blender
>                3 boxes of laundry soap
>
> Henry  -    2 napkin holders
>
> Customer names are in the parent file, and items purchased are in the 
> child file.
>
> The store owner doesn't want to see "George, George, George", etc. listed 
> on his report. Just the one-time group header "George"
>
> Is the only way to get a formatted report in the example above to hand 
> code it?
>
> Anyone know of any examples?
>
> thanks,
>
> Alex Glaros
>
> On Saturday, March 16, 2013 11:01:18 PM UTC-7, Alex Glaros wrote:
>>
>> thanks Steve but your example doesn't have the child detail records the 
>> way mine does, so it's a different example
>>
>> pythonanywhere host seems great
>>
>> I'll hold off on this problem till later
>>
>> much appreciated,
>>
>> Alex
>>
>> On Saturday, March 16, 2013 5:39:58 AM UTC-7, 黄祥 wrote:
>>>
>>> maybe my code is similar for you, please check :
>>> https://sugizo.pythonanywhere.com/task/default/task
>>>
>>> email : us...@gmail.com
>>> password : password
>>>
>>> email : us...@gmail.com
>>> password : password
>>>
>>> if you want i can share the code.
>>> in that webapps, i'm using task, maybe you can change it into database 
>>> table : project, with the field with what you want
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to