Re: SQL*ReportWriter 1.1 Master/Master summary?

From: Tauno Olavi Ojala <tojala_at_network.cc.jyu.fi>
Date: 26 May 1994 22:44:22 +0300
Message-ID: <2s2u6m$sa7_at_tukki.cc.jyu.fi>


Olli Pihlajamaa (ojp_at_tik.vtt.fi) wrote:
: I have report that has two master queries in both of which I count and
: sum fields. Now the problem is: How to sum the results from either
: query?
 

: Greatly simplified example:
 

: QUERY 1 QUERY 2
 
: select count(*) cnt1 select count(*) cnt2
: from foo from bar
 

: How to make sum from cnt1 and cnt2 (cnt1 + cnt2) printable?

        I didn't try this, but i think it works.

	You already have SRW-fields cnt1 and cnt2. Create one extra field
	(say total) in the Field-definition sheet with the source column 
	something like this:

        	  _at_SQL select cnt1+cnt2 into :total from dual

	After this you can print total-field just like any other field
	by inserting it into the Text manually (note that this changes
	the text object's status from default to edited). 

	I'm not sure about the syntax of the above command, but you'll 
	find it in the SRW-documentation.

	Hope this helps you!

	Tane
	
Received on Thu May 26 1994 - 21:44:22 CEST

Original text of this message