General information
Category:
Reports & Report designer
>>I have a things table and a documents table, related many to many with a
>>common child table called thingdocs. What is the best view to use for a
>>report listing the documents for each thing, or the things for each
>>document? I haven't tried using parameterized views with a report before.
>>I wasn't sure if it was best to make one big view containing everything, or
>>two separate views, with one parameterized, or what. Thank you.
>
>select * from docs ;
> where doc in (select dist doc from thingdocs where thing=mything) ;
> into curs temp order by doc
>or
>select * from things ;
> where thing in (select dist thing from thingdocs where doc=mydoc) ;
> into curs temp order by thing
>....depending on which one you want. You need only two parameters to the
>routine doing this select - one to choose things on doc or doc on
>things, another to supply mydoc or mything.
>
>Wild guess: you really have a file named things.dbf?
Sorry it took me so long to reply. They're making me program in Access.
How do I apply the above SELECT so that I have a report of all the things for each document, or vice versa? Ed says I should use a cursor, not a view, to avoid overhead. How does the mything or mydoc parameter get incremented for each thing or doc in the report?
I don't really have a things.dbf, but perhaps I'll create one if I ever make everything.dbc :)
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only