PlasteredDragon
Programmer
Hi!
I've inherited the reporting subsystem of a large multi-site tracking application. (We're using CR10). Each report/subreport gets its data from a different stored procedure on a SQL Server database.
All of the reports, by requirement, have to display the name of the customer's company in the report footer. Since this software is used by multiple customers, this text cannot be fixed. So all of our reports have an unlinked subreport in the page footer that calls a small stored procedure that fetches the company name from its hiding place in the database.
While running performance traces on the database I was amazed to discover that Crystal is calling this stored proc once for each row in the main report resultset. So if there are 100,000 rows of detail data, Crystal will request the Company Name 100,000 times even though it isn't part of or used in the detail section. This is swamping the database with traffic and it is wholly unecessary to run the company name query more than once.
Which brings me to my question. Is there any way to run an unlinked subreport ONCE only? If not, do I have any other options so that Crystal will fetch this value once, instead of 100,000 times? Please help! I know databases but I'm pretty inexperienced with Crystal.
Thanks!
-- Chuck S.
I've inherited the reporting subsystem of a large multi-site tracking application. (We're using CR10). Each report/subreport gets its data from a different stored procedure on a SQL Server database.
All of the reports, by requirement, have to display the name of the customer's company in the report footer. Since this software is used by multiple customers, this text cannot be fixed. So all of our reports have an unlinked subreport in the page footer that calls a small stored procedure that fetches the company name from its hiding place in the database.
While running performance traces on the database I was amazed to discover that Crystal is calling this stored proc once for each row in the main report resultset. So if there are 100,000 rows of detail data, Crystal will request the Company Name 100,000 times even though it isn't part of or used in the detail section. This is swamping the database with traffic and it is wholly unecessary to run the company name query more than once.
Which brings me to my question. Is there any way to run an unlinked subreport ONCE only? If not, do I have any other options so that Crystal will fetch this value once, instead of 100,000 times? Please help! I know databases but I'm pretty inexperienced with Crystal.
Thanks!
-- Chuck S.