2006 IR Open Discussion Posted August 20, 2006 Share Posted August 20, 2006 By: Vincent Hikida - vhikida Using Insert in <queryString> 2003-12-26 12:25 Hi, I'm trying to insert subtotal data into a temporary table in the <queryString> of a subreport. I keep getting a SQL error so I assume that I can only use Select statements. The reason I am doing this is that in later subreports I want to compute SUMs and divide the subtotal information in the temporary table to get percentages. What is the best way to do this? By: Vincent Hikida - vhikida RE: Using Insert in <queryString> 2003-12-26 12:32 By the way, I realize that I can do something like the following SELECT x,(SUM(abc)*100) / (SELECT SUM(abc) FROM xyz) FROM xyz GROUP by x However, I have several subreports and don't want to compute the grand total each time. By: Vinod Kumar Singh - vinodsingh RE: Using Insert in <queryString> 2003-12-26 20:34 > However, I have several subreports and don't want to > compute the grand total each time. Try to pass them as parameter to subreports By: Vincent Hikida - vhikida RE: Using Insert in <queryString> 2003-12-27 10:16 Thanks again Vinod. I will use this technique on this particular problem as I know what I am recieving back in terms of subtotals or totals. What about the case of SELECT x, sum(y) FROM z GROUP BY x Where I don't know what x's are being returned or how many? For now this is only an academic question for me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now