Use of summary columns?
Typically, this sort of thing is easily achieved in Excel where you can calculate the values in an output column based on input values. I need to do this in Reports. I am using Reports 6i (Report Builder 6.0.8.27.0)
I have a relatively simple query where I am outputting values (Counts) and then I need to display the summation on the next line. Let me explain using an example:
ID Start Date End Date Column 1 Column 2
=============================================
1 01-JAN-2010 30-JUN-2010 120 0
2 01-JUL-2010 31-DEC-2010 200 120
3 01-JAN-2011 30-JUN-2011 115 320
4 01-JUL-2011 31-DEC-2012 300 435
5 01-JAN-2013 30-JUN-2013 100 735
As you can see that Column 2 is derived by adding the previous values in Column 1 and outputting it on the next line.
So, for ID = 4, Column 2 = 120 + 200 + 115 = 435 and ID = 5, Column 2 = 120 + 200 + 115 + 300 = 735.
When I use summary columns, I don't get the desired result.
I could technically create a Formula column and have a place holder column and re-query the results but I was hoping to avoid another SQL when the data has already been fetched. Any ideas or pointers would be greatly appreciated!
Thanks
hi,
i think i can satisfy u
download the rdf (6i)
https://www.zeta-uploader.com/1236837069
This URL is valid until Tuesday, June 25, 2013
thanks
mostafiz mitul
Similar Messages
-
Access Summary column in a query
Hi All,
I am new to oracle reports. I am using report builder 10.1.2.0.2.
I have a summary column in my report. I would like to use this summary column in another query.
if is use this column directly in the query, i am getting the below error:
"Field 'F1' references column '<summary column name>' at a frequency below its group. "
Both these fields are in the same frame. In the object navigator, both are displayed under the same group name.
please let me know if there any way to access summary columns in another query.
Thanks.You can use a field from one query in another query as parameter, i.e. preceded by colon. To do this first create link of "Group to Query" type between the first query's group where the summary column is, and the second query.
-
Can i order a report using a summary column?
Hi Chew,
You can order by a formula column, not a summary column. It is pretty easy to create a formula column to do the same thing as your summary column.
However, you can only set the order of the master group with the formula column, not the detail group. To set the order of a master group with a formula column, you need to set the break order to Asc or Desc. See Builder help on "Break Order" property for more details.
Navneet. -
Summary column OS confliction problem
hi
Ihave a big problem in each time using a summary column on it
I creat my summary column icon on the datamodel then I connect to database normally ,but after writing the query and press next an Os window appears that says
reports builder has encountered a problem and need to close.
please tell microsoft about this problem
When gong further by links I find the following information
the following file will be included in this report error
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\a497_appcompat.txt
please can anyone help?
thanks.
windows os.
developer 6i
database 9iIt's in report
specifically on the query statement of the datawizard window
for further details It's say as following ;-
tell Microsoft about this problem.
to see what data this error report contains ,click here
after clicking
Error signature:-
AppName: rwbld60.exe AppVer: 3.0.0.0 ModName: rwlib60.dll
ModVer: 0.0.0.0 Offset: 00245977
This error report includes:information regarding the condition of reports builder when the problem occurred;the operating system version and computer hardware in use ;your Digital product id,which could be used to identify
your license; and the internet protocol[ip] address of your computer. -
Hi,
I am running a report consisting of 4 columns named as OPBAL QIN QOT BAL, and each columns had a sum at the last page.
the report run successfully but........... when i apply conditional formatting of hiding the row having value = 0 on 2 columns named QIN, QOT then it hides the column but its show the total of sum in columns OPBAL AND BAL, means it also sum the hided rows as well whereas i dont want that the hided rows be summerize at the last page
Can any1 help me on this kind of matter
Regards
M. Laeeque A.Hi,
add a formula column which returns the value of your original column per default and 0, if your condition is met and use your summary column for this formula coklumn istead of the original column.
regards
Rainer -
Using Summary Columns in Reports 9I
Hi
I am using Oracle 9i Reports
I want to use Summary cols in the report
I have a table with the flwg data:
TRANS_ID ACC_ID DEL AMT
LEL0002045 SLEND RECEIVE 1200
LEL0002053 SLEND DELIVER 1000
LEL0002100 SLEND DELIVER 500The Report format is
TRANS_ID ACC_ID DEL AMT
LEL0002045 SLEND RECEIVE 1200
LEL0002053 SLEND DELIVER 1000
LEL0002100 SLEND DELIVER 500
RECIEVE 2200
DELIVER 500
GRAND 2700I have defined a summmary column in the Data Model(C_S1)
and have defined a text field in the paper layout and setting
this to C_S1.
I get the total of 2700 in the report for this.
I want to define 2 summary cols - one for 2200 and other for 500
and then a grand total of 2700.
How shud i define this please?Table :
TRANS_ID ACC_ID DEL CCY AMT TRADE_DAT LENDER
LEL0002045 SLEND RECEIVE GBP 1200 02-AUG-05 LENDERA
LEL0002053 SLEND DELIVER GBP 1000 02-AUG-05 LENDERA
LEL0002100 SLEND DELIVER USD 500 02-AUG-05 LENDERB
LEL0002000 SLEND DELIVER KRN 1000 03-AUG-05 LENDERCREPORT OUTPUT
LENDER A
LEL0002045 SLEND RECEIVE GBP 1200 02-AUG-05
LEL0002053 SLEND DELIVER GBP 1000 02-AUG-05
Total 2200
LENDER B
LEL0002100 SLEND DELIVER USD 500 02-AUG-05
Total 500I want to break LENDER A total in 1000 for RECEIVE and 1200 for DELIVER
I have used the SQL as mentioned is yr mail
decode(DEL,'RECEIVE',AMT,0) as REC_AMT
, decode(DEL,'DELIVER',AMT,0) as DEL_AMTcreated 2 summary columns : CS_1 --> REC_AMT
CS_2 --> DEL_AMT
but i get this result :
A
LEL0002045 SLEND RECEIVE GBP 1200 02-AUG-05
LEL0002053 SLEND DELIVER GBP 1000 02-AUG-05
1000 ????
Total 2200
LENDER B
LEL0002100 SLEND DELIVER USD 500 02-AUG-05
1000 ????
Total 500 -
Using Page Level Summary Column in Report 6i
Hi Folks,
I'm trying to create a report in which I want a Page level Summary column i.e., the Summary column should reset at each page and should display the sum of a particular field on each page depending upon how many records are displayed on each page. But whenever I choose the Reset Property to Page the following error is displayed" Page level summaries are not supported in the defaulting" and in certain case the summary column displays the sum only on the last page of the report and the rest of the pages do not display the summary column. The database has three tables i.e., master-detail-detail.
Do I need to make some changes in the Data Model or what?
TIA
HassanHi Hassan,
it only works onceWell, this is definitely not expected. Maybe you can try to see after running the report once whether all the values you set in your report (from my last post) remain the the same, or somehow they revert back to their default values.
if I do some formatting of the report... summary also disapperasYou could try placing the page level summary in another frame, below your group repeating frame, with enough gap between them. Also, try setting the value for "max no of records" to some lower value, which makes sure there is space for the summary column on every page.
Another idea for making a page level summary is - you can place the summary BEFORE your group repeating frame, which means the summary will print on top of every page. In this case, you won't even have to worry about setting "max no of records per page" to some particular value. See if this suits your needs.
Navneet. -
How to get summary columns in delimited text file
How to get summary columns in delimited text file
I am trying to generate a delimited text file output with delimited_hdr = no.The report is a Group above report with summary columns at the bottom.In the text file the headers are not getting repeated & thats ok.The problem is the summary data is getting repeated for each row of data.Is there a way where i will get all the data & summary data will get displayed only once.I have to import the delimited text file in excel spreadsheet.Sorry there were a typos :
When I used desformat=DELIMITEDDATA with desttype=FILE, I get error "unknown printer driver DELIMITEDDATA". When you look for help, DELIMITED is not even listed as one of the values for DESTFORMAT. But if you scroll down and look for DELIMITER it says , this works only in conjuction with DESTFORMAT=DELIMITED !!!!!!??!! This is in 9i.
Has this thing worked for anybody ? Can anyone please tell if they were able to suppress the sumary columns or the parent columns of a master-detail data for that matter ? -
Can I reference a Summary Column in my sql query?
Basically the subject asks it all. I have a very complex report that has many data linked queries from the "main" query. One of these data linked queries has a sub-query within it that references the primary key of the main query. I can't data link (I can, but it's useless) using this field as it's a sub-query that needs the link, and that link specifically. I've tried to create a Summary Column that gives me the "First" (and only, so it's safe) in order to reference it in the SQL block, but no go. I'm thinking this isn't even possible? Anyone have any ideas? Right now I'm referencing it as I would in a PL/SQL block (:CS_PK), but it's just treated as a parameter that's never passed. Doesn't read the summary column. Hmmm... I'm stuck.
Hi all... this report is still not completed. I've tried the summary column, and created a formula column that sets the user parameter to the primary key that's needed elsewhere. The report runs, no errors, but my best guess is that it's simply not reading that formula column. Here's my formula column:
function CF_1FORMULA0024 return Number is
begin
if :tblassessmentinst is null then
:tblassessmentinst := :CA_ASSESS_INST;
elsif :tblassessmentinst is NOT null then
:tblassessmentinst := :CA_ASSESS_INST; -- this WAS :tblassessmentinst but not working with prod ver, so delay
else
:tblassessmentinst :=0;
end if;
return(:tblassessmentinst);
end;
For testing, I display both the :tblassessmentinst on the report, as well as this formula column. The formula column always displays the correct number, but the :tblassessment only displays 1 (of many) records that need to be displayed. It's like it's not refreshing the formula column for each record? Again, still super stumped, so throw any ideas my way please.
Thanks again,
TL -
Summary column with where clause
Hi all,
I'm using Oracle Report Builder 10GR2. I have the following issue: In one of the query i have the following result :
Suppliers 0
Suppliers 1408
Total in BGN 1408
Customers 6024
Customers 11779.32
Customers
Total in BGN 11779.32
Taxes 0
Taxes 0
Total in BGN 0
Cash 1363.85
Cash 691
Cash 991.23
Cash 688
Total in BGN 2355.08I want to make a sum for these columns where corresponds to description " Total in BGN" . Maybe it is a simple task... Do i have a chance to select from a query in a Report Builder?
If yes, pls specify? Or maybe there is a chance to add a where clause for summary column. But keep in mind that this is one of the queries in the report builder and i have to add summary with this conditions. I cannot change the existing query but probably add a new one.
Any ideas?
DB Version: 11g
Thanks in advance,
Bahchevanov.
Edited by: bahchevanov on Sep 29, 2012 2:21 AMHello,
You should use parameter file.Another question i can see you are using 11g.Why don't you use data pump?.
Data Pump is faster and have more features and enhancement than regular imp and exp.
You can do the following:
sqlplus / as sysdba
Create directory DPUMP_DIR3 for 'Type here your os path that you want to export to';then touch a file:
touch par.txt
In this file type the following the following :
tables=schema.table_name
dumpfile=yourdump.dmp
DIRECTORY=DPUMP_DIR3
logfile=Your_logfile.log
QUERY =abs.texp:"where hiredate>'01-JAN-13' "then do the following
expdp username/password parfile='par.txt'
If you will import from Oracle 11g to version 10g then you have to addthe parameter "version=10" to the parameter file above
BR
Mohamed ELAzab
http://mohamedelazab.blogspot.com/ -
Sorting by summary column, query based on previous query.
Using 10g reports.
I've got a report with one query currently thats broken down itno a couple groups. I'm trying to change the order they are displyed by based on a summary count of each group. I'm also trying to do another query for the report based on the results of the first one and display that with the information from the first.
The report currently:
Chain name
ABC Stores
Month
JUN
Store Name Store ID bad sales
Store1 storeid1 5
Store2 storeid2 3
Store3 storeid3 1
month total: 9
JUL
Store1 storeid1 6
Store2 storeid2 5
Store3 storeid3 2
month total:13
Chain total 22
XYZ Stores
JUN
Store1 storedid1 20
Store2 storedid2 15
month total 35
JUL
Store1 storedid1 11
Store2 storedid2 7
month total 18
Chain total 53What I want to do is sort the order the store chains appear in based on the CHain total of bad sales. This is a summary done by the report and not in the sql query at the moment. I would also like to create a second query where it takes the store id and month from the first query and uses it to look up the total sales each store did so I can determine what percentage of the total sales the bad sales were. I would like to add this column plus a calculated percentage column to the right of the current columns but still have them grouped as they are. Is this possible to do or will i need to change my original query?
Not very familiar with reports and I haven't been able to find anything to indicate how this should/could be done yet. Any help is appreciated.hi,
there is no break order property for summary columns .
so use the group by and take the sorting order for whole group
example:
SELECT DEPTNO, JOB, ENAME, SAL FROM EMP
ORDER BY SAL
You then create two groups, G_DEPT and G_JOB. G_DEPT contains
the DEPTNO column and G_JOB contains the JOB column. If you
specify a Break Order of Descending for the DEPTNO column and
Ascending for the JOB column, your output would appear similar
to that below (assuming you use a Tabular style):
Deptno Job Ename Sal
30 CLERK JAMES 950.00
MANAGER BLAKE 2850.00
SALESMAN WARD 1250.00
MARTIN 1250.00
TURNER 1500.00
ALLEN 1600.00
20 ANALYST SCOTT 3000.00
FORD 3000.00
CLERK SMITH 800.00
ADAMS 1100.00
MANAGER JONES 2975.00
10 CLERK MILLER 1300.00
MANAGER CLARK 2450.00
PRESIDENT KING 5000.00 -
Using The Summary Function in ADG
Hello All,
Please see my code below. Im using the advance data grid to create a summary row. The summary row currenty SUMs up the 'unqiuevists' and 'redemptions' columns and all is working well.
What i want to do is then create a 3rd row called 'conversion rate' this conversion rate is a calculation between the uniquevisits and the redemptions columns. If you review the code at the bottom I have managed to create a custom summary func and that function seems to be working fine (using trace)..
However, I cannot then get the calculated result back into the advance data grid, am i missing something really obvious or is what Im trying to do not possible using the summary row function?
Please try and help, Ive been on this for days!
Thanks
<?xml version="1.0"?>
<!-- dpcontrols/adg/SummaryGroupADGCustomSummary.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="createGrouping(dpFlat)">
<mx:Script>
<![CDATA[
import mx.collections.GroupingField;
import mx.collections.Grouping;
import mx.collections.SummaryField;
import mx.collections.SummaryRow;
import mx.collections.GroupingCollection;
import mx.collections.ArrayCollection;
import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
import mx.collections.IViewCursor;
import mx.collections.SummaryObject;
private var groupingCollection:GroupingCollection = new GroupingCollection();
private function createGrouping(tmpArray:ArrayCollection):GroupingCollection
groupingCollection.source = tmpArray;
var summaryRow:SummaryRow = new SummaryRow;
var summaryField:SummaryField = new SummaryField;
summaryField.dataField="redemptions";
summaryField.operation="SUM";
var summaryField1:SummaryField = new SummaryField;
summaryField1.dataField="newvisits";
summaryField1.operation="SUM";
var summaryField2:SummaryField = new SummaryField;
summaryField2.dataField="conversionrate";
summaryField2.summaryFunction = summFunc;
summaryRow.fields = [summaryField,summaryField1,summaryField2];
summaryRow.summaryPlacement = "group";
summaryRow.summaryObjectFunction = summObjFunc;
var grouping:Grouping = new Grouping();
var groupingField:GroupingField = new GroupingField("site");
var groupingField1:GroupingField = new GroupingField("merchant");
grouping.fields=[groupingField,groupingField1];
groupingField.summaries = [summaryRow];
groupingField1.summaries = [summaryRow];
groupingCollection.grouping = grouping;
groupingCollection.refresh();
return groupingCollection;
[Bindable]
private var dpFlat:ArrayCollection = new ArrayCollection([
{site:"BBVA", merchant:"TALLINK", Offer:"10% Off", newvisits:38865, redemptions:40000},
{site:"BBVA", merchant:"LIVEIT", Offer:"10% Off", newvisits:29885, redemptions:30000},
{site:"CartaSi", merchant:"Central California", Offer:"10% Off", newvisits:29134, redemptions:30000},
{site:"CartaSi", merchant:"Nevada", Offer:"10% Off", newvisits:52888, redemptions:45000},
{site:"BarclayCard", merchant:"Northern California", Offer:"10% Off", newvisits:38805, redemptions:40000},
{site:"BarclayCard", merchant:"Northern California", Offer:"10% Off", newvisits:55498, redemptions:40000},
{site:"Nordea", merchant:"Southern California", Offer:"10% Off", newvisits:44985, redemptions:45000},
{site:"Nordea", merchant:"Southern California", Offer:"10% Off", newvisits:44913, redemptions:45000},
{site:"BBVA", merchant:"TALLINK", Offer:"10% Off", newvisits:38865, redemptions:40000},
{site:"BBVA", merchant:"LIVEIT", Offer:"10% Off", newvisits:29885, redemptions:30000},
{site:"CartaSi", merchant:"Central California", Offer:"10% Off", newvisits:29134, redemptions:30000},
{site:"CartaSi", merchant:"Nevada", Offer:"10% Off", newvisits:52888, redemptions:45000},
{site:"BarclayCard", merchant:"Northern California", Offer:"10% Off", newvisits:38805, redemptions:40000},
{site:"BarclayCard", merchant:"Northern California", Offer:"10% Off", newvisits:55498, redemptions:40000},
{site:"Nordea", merchant:"Southern California", Offer:"10% Off", newvisits:44985, redemptions:45000},
{site:"Nordea", merchant:"Southern California", Offer:"10% Off", newvisits:44913, redemptions:45000},
private function summFunc(cursor:IViewCursor, dataField:String,
operation:String):Number {
var conversionrate:Number = 0;
conversionrate += (cursor.current["redemptions"] / cursor.current["newvisits"]) * 100
trace (dataField)
trace (conversionrate);
return conversionrate;
private function summObjFunc():SummaryObject {
// Define the object containing the summary data.
var obj:SummaryObject = new SummaryObject();
// Add a field containing a value for the Territory_Rep column.
obj.conversionrate2 = "Alternating Reps";
return obj;
]]>
</mx:Script>
<mx:DataGrid id="test" dataProvider="{dpFlat}">
</mx:DataGrid>
<mx:AdvancedDataGrid id="myADG" width="100%" height="100%" dataProvider="{createGrouping(dpFlat)}">
<mx:columns>
<mx:AdvancedDataGridColumn dataField="site"/>
<mx:AdvancedDataGridColumn dataField="offer"/>
<mx:AdvancedDataGridColumn dataField="newvisits"/>
<mx:AdvancedDataGridColumn dataField="redemptions"/>
<mx:AdvancedDataGridColumn dataField="conversionrate"/>
<mx:AdvancedDataGridColumn dataField="conversionrate2"/>
</mx:columns>
</mx:AdvancedDataGrid>
<mx:Button label="Button" click="groupingCollection.refresh()"/>
</mx:Application>For those who are interested this is the corrected custom summary function -
private function summFunc(cursor:IViewCursor, dataField:String,
operation:String):Number {
var totalNewVisits:Number = 0
var totalNewRedemptions:Number = 0
var tmpVisits:Number = 0;
var tmpRedemptions:Number = 0;
while (!cursor.afterLast)
tmpVisits = cursor.current["newvisits"];
totalNewVisits += tmpVisits;
tmpRedemptions = cursor.current["redemptions"];
totalNewRedemptions += tmpRedemptions;
cursor.moveNext()
var conversionrate:Number = 0;
conversionrate = (totalNewRedemptions / totalNewVisits) * 100
return conversionrate; -
How do I sort my report based on a summary column I have created?
hi,
there is no break order property for summary columns .
so use the group by and take the sorting order for whole group
example:
SELECT DEPTNO, JOB, ENAME, SAL FROM EMP
ORDER BY SAL
You then create two groups, G_DEPT and G_JOB. G_DEPT contains
the DEPTNO column and G_JOB contains the JOB column. If you
specify a Break Order of Descending for the DEPTNO column and
Ascending for the JOB column, your output would appear similar
to that below (assuming you use a Tabular style):
Deptno Job Ename Sal
30 CLERK JAMES 950.00
MANAGER BLAKE 2850.00
SALESMAN WARD 1250.00
MARTIN 1250.00
TURNER 1500.00
ALLEN 1600.00
20 ANALYST SCOTT 3000.00
FORD 3000.00
CLERK SMITH 800.00
ADAMS 1100.00
MANAGER JONES 2975.00
10 CLERK MILLER 1300.00
MANAGER CLARK 2450.00
PRESIDENT KING 5000.00 -
Matrix report data with summary column in excel format
Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance.Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance. -
Change of source of Summary columns in RDF
Hello Everybody.
For the existing query column in RDF, which is used by one of the summary column as source.
If the query is getting changed as per the bussiness requirement, the source of the Summary column is changing to NULL.
Is there any way not to allow this change in RDF. Because lot of query modifications are done.And it consumes lot of time to change every source of the Summary columns being used.
Appreciate your help.
Thanks.Yogesh,
Does both the clients allow development in the server? Generally it should not be the case.
Does the client still exists in the server?
Here is a thread with replies for such an error message.
Re: regarding Client change for transport request
Check it,it may give you some lead.
K.Kiran.
Maybe you are looking for
-
More Image/stylesheet issues
Hello again, Just wondering if anyone could give me some quick style sheet issues, have an img class that looks a little something like this: img { border: 5px solid #adadad ! important ; padding: 5px ! important ; margin: 4px, 4px, 4px, 4px ! import
-
I am a first time us er of Acrobat X. I have spent 2 days reading, following tutorials and have en ded up NOT getting the info I need to do my job. I have an scanned invoice that I need to modify to include items listed on numerous other invoices. Th
-
Hi, I am using my studio papi wsdl - http://localhost:8585/papiws/PapiWebServiceEndpoint?wsdl, and using interface PapiWebService i am trying to abort the instances for a particular process with a filter condition i.e. customer id as '111000' I am ge
-
Hello, I try to generate a SWC from modified osmf sources (for my own needs). When I compile my app with my custom osmf SWC and other SWCs (use official osmf SWC), I have some compilations errors : Application.as(51): col: 19 Error: Access of undefin
-
Airport Extreme will not show IP address after new cable provider install
I got a call from Comcast that he is unable to get my Airport to give a Wifi signal after he installed their service and modem. Has been working fine with the Sprint 4G modem. I'm between Mac's, running a PC with Linux Ubuntu, so unsure how I can res