on 11-20-2007 10:58 PM
Post Author: vdm
CA Forum: Data Connectivity and SQL
Hi,
I need to develop a report the data for which cannot be easily selected from tables using a sql statement. It needs to first call a stored procedure which would populate some temp tables and crystal would then report from these temp tables.I am from Oracle reports background which has a before report trigger in which you could put any of this pre-processing but not sure if crystal (CR XI) has the equivalent of that.what I did try with crystal was this :- 1. On my main report I have this query - select * from temp......2.I have put a sub-report in my Report Header section. This sub-report calls a sql server stored procedure which populates the temp table.But what I am finding is that before the sub-report is called crystal has already executed the select statement -which is still empty at this stage.Question:1.What I am trying to do is just not possible to do in crystal ?2. Or is there a way that I can stop crystal from executing the main select statement until the sub-report has been called ?thanks in advanceVishal
Post Author: yangster
CA Forum: Data Connectivity and SQL
really depends what you are doing or achieving with the temp table in the subreportand the very nature of the subreport within a main report means the main report datasource will always come before the subreportreverse the order of your reports if you want to execute the procedure firstor better yet tell us what you are trying to do and we'll be able to tell you if you even need a subreport
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: bettername
CA Forum: Data Connectivity and SQL
Why not just use a single Command object as your datasource, and have it contain the following sql:
exec sp_your_stored_procedure
--that should have generated your temp_table
select * from your_temp_table
drop table your_temp_table --or not, depending on your preference...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.