report using a generic query?
Is there a way to create a generic report using a query.
the query may have one or more fields as a result.
e.g:
select * from customer will give me a report with all customer table fields
select customer_name from customer should give me a report showing customer
name only.
I could use the query to get a different set of results like: select * from
products
I want the result to be handled by one report only. Bottom line, I want to
create the report fields and columns during the runtime.
Any ideas?
Thanks,
the query may have one or more fields as a result.
e.g:
select * from customer will give me a report with all customer table fields
select customer_name from customer should give me a report showing customer
name only.
I could use the query to get a different set of results like: select * from
products
I want the result to be handled by one report only. Bottom line, I want to
create the report fields and columns during the runtime.
Any ideas?
Thanks,
This discussion has been closed.
Comments
There are three ways to approach this type of reporting application.
1. Control the visibility of the data aware components inside the
Band.BeforePrint events based on which items you would like your user to
see. Perhaps set a flag before the report runs and based on that value
toggle the visibility of each report component.
2. Create multiple report templates, each showing a different amount of
data. Then based on which data you would like your user to see, load that
specific template when they run the report.
3. Based on what data you would like your user to see, create the report on
the fly in code at runtime before you view it. There is an article on
creating a report completely in code located in the Tech-Tips newsgroup.
There are probably a few more ways to go about this but they are all
variations of the above three.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com