Mix overview and detail records in same report
Hello, in substance I need to mix results from overview table and records from details table in same report.
For creating the scenario:
CREATE TABLE ALPHA
ALPHA_ID NUMBER,
ALPHA_NR NUMBER,
ALPHA_TOTCT NUMBER,
ALPHA_FUND NUMBER
ALTER TABLE ALPHA ADD (
CONSTRAINT ALPHA_PK PRIMARY KEY (ALPHA_ID));
ALTER TABLE ALPHA ADD (
CONSTRAINT ALPHA_NR_UNI UNIQUE (ALPHA_NR));
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 1, 7 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 2, 11 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 3, 15 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 4, 17 );
CREATE TABLE HIST
HIST_ID NUMBER,
HIST_NR NUMBER,
HIST_ALPHA_NR NUMBER,
HIST_CT NUMBER,
HIST_VAL NUMBER,
HIST_DATE DATE
ALTER TABLE HIST ADD (
CONSTRAINT HIST_PK PRIMARY KEY (HIST_ID));
ALTER TABLE HIST ADD (
CONSTRAINT HIST_NR_UNI UNIQUE (HIST_NR));
ALTER TABLE HIST ADD (
CONSTRAINT HIST_ALPHA_NR_FK FOREIGN KEY (HIST_ALPHA_NR) REFERENCES ALPHA ( ALPHA_NR ) );
TRUNCATE TABLE HIST;
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 1 ,1 ,7 ,1 ,10 , TO_DATE('01.02.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 2 ,6 ,7 ,1 ,10 , TO_DATE('01.05.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 3 ,3 ,7 ,3 ,30 , TO_DATE('01.02.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 4 ,4 ,11 ,1 ,10 , TO_DATE('01.03.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 5 ,5 ,11 ,-2 ,-20 , TO_DATE('01.06.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 6 ,8 ,11 ,1 ,10 , TO_DATE('01.02.2011' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 7 ,2 ,15 ,2 ,20 , TO_DATE('01.03.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 8 ,7 ,15 ,5 ,50 , TO_DATE('01.06.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 9 ,9 ,15 ,-4 ,-40 , TO_DATE('01.02.2011' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 10 ,10 ,17 ,1 ,10 , TO_DATE('01.03.2011' , 'dd.mm.yyyy' ) );For updating the overview table, I used a view
CREATE OR REPLACE VIEW HIST_AGG ( HIST_ALPHA_NR, TOT_CT , TOT_VAL )
AS
SELECT HIST_ALPHA_NR
,SUM ( NVL(HIST_CT, 0 ) ) TOT_CT
,SUM( NVL(HIST_VAL, 0) ) TOT_VAL
FROM HIST
GROUP BY HIST_ALPHA_NR;
DECLARE
CURSOR cur
IS
SELECT
HIST_ALPHA_NR
,TOT_CT
,TOT_VAL
FROM HIST_AGG
BEGIN
FOR rec IN cur
LOOP
UPDATE ALPHA
SET ALPHA_TOTCT = rec.TOT_CT
, ALPHA_FUND = rec.TOT_VAL
WHERE ALPHA_NR = rec.HIST_ALPHA_NR;
END LOOP;
END;First report should the overview line from table alpha followed by all detail records from
table HIST, and this for each alpha_nr. At the end of the report a total from the overview
table alpha.
"SUMMARY";"ALPHA_NR";"ALPHA_TOTCT";"ALPHA_FUND";
;7;5;50;
;7;1;10;01.02.2009
;7;1;10;01.05.2009
;7;3;30;
;11;0;0;
;11;1;10;01.03.2009
;11;-2;-20;01.06.2010
;11;1;10;01.02.2011
;15;3;30;
;15;2;20;01.03.2009
;15;5;50;01.06.2010
;15;-4;-40;01.02.2011
;17;1;10;
;17;1;10;01.03.2011
"TOTAL_ALPHA_NR";4;9;90;Second report should display the overview per time period (year), but the records from
e.g. year 2009 start counting in year 2010. At the end of each year again a summary for
the actual status.
"YEAR";"ALPHA_NR";"ALPHA_TOTCT";"ALPHA_FUND"
2009;7;0;0
;11;0;0
;15;0;0
;17;0;0
"Total 2009";4;0;0
2010;7;2;20
;11;1;10
;15;2;20
;17;0;0
"Total 2010";4;5;50
2011;7;5;50
;11;-1;-10
;15;7;70
;17;0;0
"Total 2011";4;11;110
2012;7;5;50
;11;0;0
;15;3;30
;17;1;10
"Total 2012";4;9;90
Hi,
This is quite a different problem from what you first posted.
wucis wrote:
This is what I want to get
ALPHA_DATE ALPHA_NAME ALPHA_NR ALPHA_TOTCT ALPHA_FUND TRANS_DATE
01.01.2009 seven 7 5 50
7 1 10 01.02.2009
7 1 10 01.05.2009
7 3 30 01.02.2010
01.03.2009 eleven 11 0 0
11 1 10 01.03.2009
11 -2 -20 01.06.2010
11 1 10 01.02.2011
03.05.2010 twelve 12 0 0
02.02.2009 fifteen 15 3 30
15 2 20 01.03.2009
15 5 50 01.06.2010
15 -4 -40 01.02.2011
10.10.2010 seventeen 17 1 10
17 1 10 01.03.2011
TOTAL_ALPHA_NR 5 9 90
Do you really want to include alphr_nr=12? If so, what do you mean when you say
I have an approach but there are "unnecessary" rows ( the line with just alpha_nr = 12 ) and why don't you want alpha_nr=13?
so my join is buggyExactly! The join
... from hist, alpha b
WHERE b.alpha_nr = hist.hist_alpha_nr (+) ...means "include all rows from alpha, whether of not they have any corresponding rows in hist or not". If you want to exclude alpha_nrs 12 and 13, you probably want to do an inner join there.
You don't need any sub-queries to do that:
SELECT CASE
WHEN GROUPING (h.hist_alpha_nr) = 0
AND GROUPING (h.hist_date) = 1
THEN MAX (a.alpha_date)
END AS alpha_date
, CASE
WHEN GROUPING (h.hist_alpha_nr) = 1
THEN 'TOTAL_ALPHA_NR'
WHEN GROUPING (h.hist_date) = 1
THEN MAX (a.alpha_name)
END AS alpha_name
, CASE
WHEN GROUPING (h.hist_alpha_nr) = 0
THEN h.hist_alpha_nr
ELSE COUNT (DISTINCT (alpha_nr))
END AS alpha_nr
, SUM (h.hist_ct) AS alpha_totct
, SUM (h.hist_val) AS alpha_fund
, h.hist_date AS trans_date
FROM hist h
, alpha a
WHERE h.hist_alpha_nr = a.alpha_nr
AND a.active = 'Y'
GROUP BY ROLLUP ( hist_alpha_nr
, hist_date
ORDER BY GROUPING (h.hist_alpha_nr)
, h.hist_alpha_nr
, GROUPING (h.hist_date) DESC
, h.hist_date
;Output:
ALPHA ALPHA ALPHA
ALPHA_DATE ALPHA_NAME _NR _TOTCT _FUND TRANS_DATE
01.01.2009 seven 7 5 50
7 1 10 01.02.2009
7 1 10 01.05.2009
7 3 30 01.02.2010
01.03.2009 eleven 11 0 0
11 1 10 01.03.2009
11 -2 -20 01.06.2010
11 1 10 01.02.2011
02.02.2009 fifteen 15 3 30
15 2 20 01.03.2009
15 5 50 01.06.2010
15 -4 -40 01.02.2011
10.10.2010 seventeen 17 1 10
17 1 10 01.03.2011
TOTAL_ALPHA_NR 4 9 90If this is not what you want (e.g., if you want alpha_nr=12 in the results) then point out where these results are wrong, post the correct results, and explain how you get the correct results in those places.
Similar Messages
-
Keeping heading and detail on the same page
Hi, I have a report with a group header section and a detail section. How can I keep the heading section and all the detail section on the same page without starting each group on a new page?
The detail section will have either 2 or 3 records with some of the objects set to grow if the data doesn't fit on one line. This results in several changes of group appearing on the same page which is what I want. However, what I don't want is the header section on one page with the detail section on the next, or the header and some of the detail records on one page with the rest of the detail records on the next. What I would like is the report to start a new page if the header and all the detail records don't fit on the same page but without starting a new page for every group change. How can I achieve this?you can put the group header and details into a sub report on the old group header section.
then hide the details section -
Master and detail in the same page
db11xe , apex 4.0 , firefox 24 ,
hi all ,
i am trying to insert the master and detail data in one step in the same page :
i have two tables (clients) and (tests_administered)
the client table's region contains theses items
client_id
client_name
the other table's region contains these columns -- the tabular region
row selector
test_admin_id -- pk, hidden
client_id -- hidden , this is the one i should populate with values
and more columns
i've done this :
1- removed the condition of the tabular region .
2- Added the request CREATE to the list in condition of the APPLYMRU process -- or :request like ('CREATE')
3- Added new process with following code : -- with sequence before the applymru process and after process row of clients process
for i in 1..apex_application.g_f02.count
loop
apex_application.g_f02(i) := :p2_client_id ;
end loop ;
but nothing happened . why ? what did i miss ?
thanksHi,
Create a Master Detail Form through the APEX Wizard
Make sure you choose the Primary Keys for the Master Detail as one of your Column and not the ROW ID.
Selecting an existing Sequence for the Primary Key is preferred.
Select the option the where your Master and Detail appears in the same page.
Initially when you run the page your master and detail will not appear at the same time in the page when your Master Detail Form is in the entry form mode. For this you have to go to your Tabular Form(Detail Form) region, and below you will have to remove the Condition for the display of your Tabular form and set it to “No Condition”.
Now when you run the page both the Master and Detail form will appear together in the create mode but you will not be able to insert or create both master and detail records at the same time when u click the create button. For this the following needs to be done: You need to create a PL SQL Tabular Form process :
Let's say your master form is based on DEPT and your detail tabular form is based on EMP. Make sure the following things are configured:
The DEPT insert/update DML process runs before the new tabular form PLSQL process. (ie) the new PL SQL Tabular Form Process that you create should be inbetween Automatic Row Processing(DML) and Multi Row Update Process , so create the new Tabular Form Pl SQL process with a sequence number inbetween these two Processes.
Make sure you choose Tabular form while creating this PL SQL process.
The new tabular form PL/SQL process executes the following as the source
:DEPTNO := :P1_DEPTNO;
Where DEPTNO is the Foreign Key column in the Tabular Form that links the Primary Key Item P1_DEPTNO of the Master Form.
Finally this new PL SQL process conditionally runs when DEPTNO is null, so you need to add the following condition to the process:
The final step to accomplish in creating both the Master and Detail records at the same time is to make a change in the condition of the Multi Row Update Process. :request in ('SAVE','CREATE') or :request like 'GET_NEXT%' or :request like 'GET_PREV%'
-We make this change so that records get inserted into the Detail table when we click the ‘’Create” button.
Now you can Run your page and create both the Master and Detail records at the same time.
Thanks and Regards,
Madonna -
File content conversion - sender adapter for Header and detail records
Hi Experts,
I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
Thanks
DeepakHi
Refer the below fourm link,
Flat file whitout id
Regards
Ramg. -
Master and Detail records in the same table
Hi Steve,
I have master and detail address records in the same table (self-reference). The master addresses are used as templates for detail addresses. Master addresses do not have any masters. Detail addresses have three masters: a master address, a calendar reference and a department. Addresses change from time to time and every department has its own email-account, but they refer to the same master to pre-fill some common values.
Now I need to edit the master and detail address records on the same web page simultaneously.
My question is: Can I implement a Master-View and Detail-View which refer to the same Entity-Object? Or should I implement a second Entity-Object? Or can it be done in a single Master-Detail-View?
Thanks a lot.
Kai.At a high level, wouldn't this be similar to an Emp entity based on the familiar EMP table that has an association from Emp to itself for the Emp.Mgr attribute?
You can definitely build a view object that references two entity usages of the same entity like this to show, say, an employee's ENAME and at the same time their manager's ENAME.
If there are multiple details for a given master, you can also do that with separate VO's both based on the same entity, sure. Again, just like a VO that shows a manager, and a view-linked VO of all the employees that report to him/her. -
Sub-details in the same report at a double click
Hi All,
Can anyone let me know how to display the below details in the report?
Initially we can display the basic list with month details. Say we have 12 months (12 lines) in the output. Now if I double click on the month (say March), in the same report under the march month, it has to display the number of weeks (say 5 weeks). Is it possible to display the information using the normal ALV function modules.
Kindly do the needful.
Thanks in advance.
Regards
Ramesh.Hello,
You can use Hotspot for the month and Onclick command change the internal table with new entries and display this new internal table with Refresh Command.
Refer SALV_TEST_TABLE_REFRESH.
Thanks.
Nagendra -
Use different Layouts for Summary and Details in Drill down report
Hi All,
I have a 2 level drill down report in ALV.
The summary report has certain fields and the Detail report has different fields. Now my problem is that when i use a default layout (with all fields of summary report) for the summary report, and drill down to the detail report i'm missing the fields on detail that are not in Summary. And if i save the default layout as default (with all fields of Detail) and go back to sumary, I'm missing the some other fields on summary (which are not on detail report).
Is there a way to make different default layouts for each of those summary and detail reports:
Also as the layouts are choosen by the user, i cannot hardcode any particular layout;
So if the user chooses a layout for detail; it has to stay the same layout for the detail report if he goes to summary and then back to detail; unless the user changes the layout again.
I'm using two different Layout types for each report. but i still cannot get the desired effect.
Data:
gt_layout_s type slis_layout_alv,
gt_layout_d type slis_layout_alv,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_s</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_summary.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = <b>gt_layout_d</b>
i_callback_top_of_page = g_top_of_page
i_callback_user_command = g_user_command
i_callback_pf_status_set = g_status
i_save = g_save
is_variant = gs_variant
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
importing
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = it_detail_disp.Here is how you differentiate between the layout of two different grids. There is the parameter, IS_VARIANT in the function. You usually leave it empty or pass only the report name and username. <b>What you need to do is to pass unique string for each grids to the HANDLE field of the parameter IS_VARIANT.</b> You can probably hard code it as HEADER and DETAILS in your case. Once that is done, system identified that these two different layout for different grids.
Regards,
Ravi
Note : Please mark all the helpful answers<u></u> -
Insert Master and Detail in the same transaction
I have 2 view objects : Students and Enrollments.
Connecting those view objects, there is one view link :
Cardinality : 1..* (One student can enroll several courses).
This link is exposed in "Students" view object by the property "getEnrollments" and in "Enrollments" view object, by the property "getStudent".
I am try to insert records first in Student table, and Enrollment table in the same transaction.
The primary key for Student table is generatade by a sequence (database trigger)
My code is :
StudentListImpl studentView = getStudentList();
StudentListRowImpl studentRow = (StudentListRowImpl) studentView.createRow();
studentRow.setFirstname(student.getFirstName());
studentRow.setLastname(student.getLastName());
studentRow.setDatebirth(student.getDateBirth());
studentRow.setStatusid("A");
studentView.insertRow(studentRow);
EnrollmentListRowImpl enrollmentRow = (EnrollmentListRowImpl) studentRow.getEnrollments().createRow();
enrollmentRow.setCourseid("C-100");
studentRow.getEnrollments().insertRow(enrollmentRow);
The generated Student ID is not being retrieved by ADF and set up in Enrollment view object. So, database is firing foreign key violation (in Enrollment table - No student ID provided)
How can achieve this goal? Insert in DETAIL table with the key generated for the PARENT table?Yes, ID attribute in Student EO is DBSequence.
If I insert only Student it works. But when I try to insert an Enrollment for that just created Student (same transaction), the Student ID is not assigned to Enrollment EO.
The code I use to insert Enrollment is :
EnrollmentListRowImpl enrollmentRow = (EnrollmentListRowImpl) studentRow.getEnrollments().createRow();
enrollmentRow.setCourseid("C-100");
My question is :
Since I am creating a new Enrollment row using view link acessors in Student VO (getEnrollments), will the Student ID (just generated by sequence) be automatically assigned to Enrollment VO?
I am totally lost about this (inserting master and detail in same transaction) and I can't find documentation on this topic. -
BC4J - Inserting Master/Detail records in same transaction.
I know this is possible, but I seem to be missing something to allow it to happen within BC4J.
I'm creating a RowSet off of a View Object and inserting new Rows into this RowSet. This RowSet represents my child/detail records for insert into a child table.
I then create a new Row off of another View Object. This row represents my Master/parent record for insert into a parent table.
All of the above is being done in the same applicationModule transaction with locking mode set to Optimistic.
Before I commit the transaction, I grab the next sequence # to use as the primary key for the master record and the foreign key for the child records. I apply those to the newly created child rows and the newly created master row.
However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.
Any ideas?
Thanks in advance..
Teri Kemple
TUSC
[email protected]However, when I commit I continue to get a JBO-26041: Failed to post data to database during "Insert": error due to ORA-02291: integrity constraint (CUST_LICENSES_FK4) violated - parent key not found
If everything was created in the same transaction, why won't this allow me to insert into both tables with the correct primary/foreign keys? It's almost as if the child records are being inserted first prior to the parent record.This is due to the order of rows being posted. In this case it seems the detail row is getting posted before the master.
To avoid such situations, either you may implement your own post ordering by making sure that when a detail is to
be inserted, it's master is inserted or you may use "Composition Association" flag in the association wizard between
the master and the detail entities to let the framework manage a tight composition relationship between the two entity
types. BTW, there was another definitive thread recently on inserting master-detail in the
same transaction, but the forum search engine is so useless I can't find it. Anyone
have the msgid handy or know how to find that thread again??
FYI: the help describes the Composition flag functionality in terms of the Master record already existing in the DB. In our problem here, the Master is being inserted in the same transaction. Thus needs to be posted FIRST.
I got a integrity constraint exception too, then set the composition flag and now I get:
500 Internal Server Error
oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
void oracle.jbo.server.EntityImpl.create(oracle.jbo.AttributeList)
void gov.ga.gdc.otf.bc.JotfWithdrawalsImpl.create(oracle.jbo.AttributeList)
void oracle.jbo.server.ViewRowStorage.create(oracle.jbo.AttributeList)
void oracle.jbo.server.ViewRowImpl.create(oracle.jbo.AttributeList)
oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createInstance(oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
oracle.jbo.server.RowImpl oracle.jbo.server.QueryCollection.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.server.ViewRowSetImpl, oracle.jbo.AttributeList)
oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRowWithEntities(int[], oracle.jbo.server.EntityImpl[], oracle.jbo.AttributeList)
oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.createRow()
oracle.jbo.Row oracle.jbo.server.ViewObjectImpl.createRow()
void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.insertWithdrawal(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number, java.lang.Integer, int)
void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payOneObligation(java.lang.String, java.lang.String, java.lang.Integer, oracle.jbo.domain.Number, java.math.BigDecimal, int)
void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.payObligations(java.lang.String, java.lang.String, java.math.BigDecimal, oracle.jbo.domain.Number)
void gov.ga.gdc.otf.appmodule.JOtfOffenderAppModuleImpl.receiveFunds(java.lang.String, java.lang.String, int, java.math.BigDecimal, java.lang.String, java.lang.String, java.lang.String, java.math.BigDecimal, long)TIA much! curt -
View detail records from interactive report with button press
Hi I want to create a intractive report that will have a + sign for the user to expand the detail region below the record.
Thanks.
PKPthanks kartik,
I did exectly what is there in there. But I am having problem in display. I have put my application in
http://apex.oracle.com/pls/apex/f?p=44031:1
login as GUEST/password
select Company Accounts Management from Application Menu --> setup tab -> Companies from setup menu
the detail record is not displaying. correctly. -
Hi ,
I was trying to have a "SHOW ALL" feature on the master - detail page,
the detail table is an advancec table.
Please help me with inputs on how to have "SHOW ALL" feature,
Currently, we have to click on ":Show" for each record at master level to view the child data.
Trying to achive "Show All" Feature so that on click of this the master records on the page 'Expands" showiing all master records with respective detail records.
Regards
bhuvanmHi,
You should not set DetailFlag = "Y" in whereclause because there is no such record.
Also detail flag is transient attribute and not the query column, hence the error "Invalid indentifier".
I asked you to use DetailFlag as query column with static value "Y".
for example:
SELECT "Y" detail_flag
FROM <table_name>
This will display all the table records in expanded format. if you want it conditionally then use decode on some bind parameters.
For example:
SELECT DECODE(:1, "SHOWALL", "Y", "N") detail_flag
FROM <table_name>
This bind parameter should be passed whenever you want to execute query for the table.
Regards,
Sandeep M. -
How to supress the header if there is no detail record in the report
Hi,
I am trying to create a report using the TEXT_IO utility in oracle forms. The header part is created in one program unit and detail part is created in another program unit. How can I supress the header if there is no detail part? I came to know that I can use HOST command . How can I use this? Can any one help me in resolving this?
My report should apppear in the format specified below.
case number : 1
Name Address1 Address2 State ZIp
XXXXX XXXXXXX XXXXXXXx XXXXX XXXxx
case number: 2
Name Address1 Address2 State Zip
YYYYY YYYYYY YYYYYYY YYYYY YYYY
Edited by: 837462 on Feb 16, 2011 6:12 PMHi
i think it's a better idea to paste ur code here...
but logically... i supposed u have 2 function header_function & detail_function e.g. both functions returns either 1 or 0 if there is data then it returns and the contrary if returns 0
In the calling these functions i e.g. WHEN-BUTTON-PRESSED u need to validate as follow
DECLARE
v_header_output varchar(2);
v_detail_output varchar(2);
BEGIN
v_header_output := header_function ( PARAMETERS ... , ,);
v_detail_output := header_function ( PARAMETERS ... , ,);
IF v_detail_output = 0 THEN
v_header_output := 0; -- or u can do some works that change the return of the header_function to null or 0
END IF;
END;Hope it works...
Regards,
Abdetu... -
Place SR and Opportunity records in one report
Hi Exerpts,
Are we able to place SR and Opportunity information on the same report?
Thanks,
SabrinaHi Sabrina,
You should be able to achieve this, however you will need to use a combined analysis as there is no direct link between the SR and Opportunity subject areas. You will need to create a link between the two areas by using a field value common to both subject areas (such as Account or Contact).
Regards,
Cameron -
Displaying the master and detail records ....
Hi ,
There is a master - detail form. The end-user make some insertions/updates in the detail block...
How is it possible to display these detail records and its master when the user presses a custom button 'refresh' which just requery the records in both master and detail blocks...?????
When i write "to display these detail records and its master " i mean that the current record (the one which the cursor would be focused in ) would be this master record... however,all other records would be displayed as well....
Many thanks,
SimonFrom what I understand you want to re-query and go to the record where you were just before re-querying??
Interesting requirement, why you wanna do this? if for the user to see the changes of the updates, that is the default behavior.
You can do this in two ways.
1- in your "Refresh" button save the :system.trigger_record in a parameter :parameter.record_num, for the Master block and after the query you do a go_record(:parameter.record_num) .
BEGIN
GO_BLOCK('EMP'); --Master Block
:PARAMETER.RECORD_NUM := :SYSTEM.TRIGGER_RECORD;
EXECUTE_QUERY;
GO_RECORD(:PARAMETER.RECORD_NUM);
END;2 you can loop through the block with next_record built-in and an exit condition of a key value you saved in a parameter.
BEGIN
GO_BLOCK('EMP'); --Master Block
:PARAMETER.EMPNO := :EMP.EMPNO;
EXECUTE_QUERY;
FIRST_RECORD;
LOOP
EXIT WHEN :EMP.EMPNO = :PARAMETER.EMPNO;
NEXT_RECORD;
END LOOP;
END;Tony -
DMEE issue in header and detail record
Hi Gurs,
I am working in DMME payment medium .
I have declared DMEE header structure(00000001000001 ) as level 1 and detail (050000010020192 XX110000001) as also level 1.
This is the output format i am getting.
00000001000001
05000001002000 XX110000001
00000001000001
05000001002012 XX110000002
00000001000001
05000001002012 XX110000003 00000001000001
05000001002011 XX110000004
But my requirment not lke this. i need to dispaly all detail items under one header also i need to increase the counter for every items starting from 2.
Both header and detail are at level 1.If i declared the detail as level 2 the output is not generated.
This is what i need.
00000001000001
05000002002000 XXX110000001
05000003002012 XXX110000002
05000004002012 XXX110000003
05000005002011 XXX110000004
Pls suggest me any solutions
Thanks .NOT answered
Maybe you are looking for
-
Is there a way of installing 10.4.2 on a Mac mini without password?
I am trying to help a friend who purchased a Mac mini from a relative a few years ago. The OS needs reinstalling (too many faults to mention). I have the original install disc 1 and 2, but every time i try installing, the administrator password is ne
-
I'm using Captivate 2 and have linked some Excel files to my published movies. The published movies and the Excel files are on my Web server in the same directory, but users are having the following problems: The Excel file does not open and the user
-
Redeploying application errors out.
We have a clustered application servers (2), and have deployed the application using OEM Application Server Control. Sometimes, when we redeploy an application (EAR) we get the following error and the ASC removes the application from the OC4J contain
-
USB Keyboard just stopped being recognised
Hi I have an iMac 2.8 i7 that is running os x 10.6.8 I have an Apple USB keyboard connected to it and everything has worked fine for several years I booted up the iMac today and was greeted by the Bluetooth Keyboard Setup - no wireless keyboard conne
-
How A commitment Flag gets updated in Purchase Requisition
Gurus i am strugging to find out how and why commitment is being Linked to Purchase Requisiton .i am unable to proceedfor further processing , can any one make me understand how does this link happens thanks gurus milind