Create new row in Report automatically
Post Author: miwalker
CA Forum: Crystal Reports
I have a report that contains a table with a row for each week and columns containing totals for how many defects are in each state (i.e. Open, Verify, Closed). Each week I update the table and add a new row with the totals for that week. I also have a bar graph that displays this information graphically. Is it possible to create a formula that when I run the report it automatically creates a new row in the table and updates the totals rather than me having to do it manually? If I can do that I would then like to use a scheduler to automatically run the report each week. Thanks,
Post Author: miwalker
CA Forum: Crystal Reports
Thanks Mavrick5. I was able to generate the correct date now, but I'm still having problems getting it to write on a new row. Row #1 will contain the running totals of each "state" for the week. I then want a new line generated when I run the report the following week with the totals for that specific week, and so on as the weeks progress. Right now it just keeps overwriting the first row. Is there a function I can use in the formula to get it to write to a new line? I've been looking through the forum but haven't found anything on this subject. Thanks,
Similar Messages
-
Creating new row right after popup opens (JBO-35007 because of trigger)
Hi,
I have the same popup (with an ADF form) to add and to edit data. But i have two buttons which displays this popup - Add new and Edit, Edit works OK, on add, i insert new record like this:
DCIteratorBinding dciter =
(DCIteratorBinding)bindingContainer.get(iterator);
ViewObject view = dciter.getViewObject();
Row newRow = view.createRow();
view.insertRow(newRow);
view.setCurrentRow(newRow);before popup is open. And it adds a new record. But the record has id -10 (or some other negative number). This -10 is shown on calling page (the page from which the popup is open) in ADF ReadOnly table as -10 as id and other cells in row empty. That shouldn't happen (se bellow why). User then edits empty form in popup, and commits - then i get JBO-35007 because -10 changed to 123 - because of trigger.
I tried to requery - it doesn't help, see Refresh after pop-up window closes.
Can you suggest a solution on how to create a row right after popup opens?
Also,
i create new record on button's LaunchListener method. This method seems to execute before popup is open and so it affects the calling page also. I think the problem would be solved if new row would be created after popup is opened, not while opening it. (clicking create in popup works fine)in my real case, i usually don't show ids; but to simplify debugging, i created test project where i show as many things as possible.
you mean, creating new record like following?
bindings.getOperationBinding("Create").execute();I don't use that because i don't get empty fields in popup window (although new record is created). Actually, i don't know how to set this created record to be selected one. Suggestions?
And I did some more testing, if I create new record with clicking on Create (not creating new row automatically), i get JBO-35007 only if there was selected any other than the first row in table.
and i tried to move create method binding in pagedef, so it's the first one.. But it seems like there is no effect.
btw, i found this in one of examples on web:
<invokeAction Binds="Execute"
id="refreshTableViewObjectAfterAddingNewApp"
Refresh="prepareModel"
RefreshCondition="#{processScope.addedNewApp}" />refresh condition must be true when adding new row and false for everything else. I'm not sure what that does, but it seems to work... :)
I really shouldn't use the same View Objects in popup and 'master' page, should I? -
How to create new Custom XML Report without using Form Builder
Hi,
What are the steps to create new Custom XML Report without using Report Builder ?
Thanks and Regards,
AbhiHi,
Steps we now follow
1)Create Data Model in Reports Builder
2)Create xml
3)Insert xml in Publisher to build Fomat
4)FTp rdf
5)Create Data Definition and Template
6)Create executable and Concurrent Program
Is there any way we can build reports without use of Report Builder ? By writing PL SQL Package for Before Report and After Report etc ...
Thanks and Regards,
Abhijit Rode -
Unable to create new rows in master detail
Hi, I am new to ADF
I am using Jdeveloper 11.1.1.6, I have two tables customer and contacts, customerId is a foriegnKey in contacts. when customer is deleted all the contacts need to be deleted.
I have created an association (1 to * customer to contacts) between customerEO & contactsEO (checked Composite association, implement cascade delete option), and a view link (1 to * customerVO to contactsVO).
I am testing the viewlink through AM, not using JSF
when i am trying to create new row in details(contacts) table, the customer id is populating in details table.
when i am trying to commit to database (Details table) i am getting the following error
java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3769)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3904)
at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:9417)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1512)
at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:429)
at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:8575)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6816)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6893)
at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3290)
at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:3093)
at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:2097)
at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2378)
at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1615)
at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1417)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1437)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
at oracle.jbo.uicli.jui.JUActionBinding.actionPerformed(JUActionBinding.java:193)
Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02291: integrity constraint (CONTACT_CUSTOMERID_FK) violated - parent key not found
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:931)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:548)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:213)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1111)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1488)
Can you please help me how to solve this issue
Thanks & Regards
Ani
Edited by: 987691 on Feb 12, 2013 2:50 PM
Edited by: 987691 on Feb 12, 2013 2:54 PMHere is My CustomerEO.xml file_
<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<!---->
<Entity
xmlns="http://xmlns.oracle.com/bc4j"
Name="CustomerEO"
Version="11.1.1.61.92"
InheritPersonalization="true"
DBObjectType="table"
DBObjectName="XX_CUSTOMER"
AliasName="CustomerEO"
BindingStyle="OracleName"
UseGlueCode="false"
xmlns:validation="http://xmlns.oracle.com/adfm/validation"
RowClass="customer.model.CustomerEOImpl">
<DesignTime>
<AttrArray Name="_publishEvents"/>
<Attr Name="_codeGenFlag2" Value="Init|Access"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Attribute
Name="Customerid"
ColumnName="CUSTOMERID"
SQLType="NUMERIC"
Type="oracle.jbo.domain.DBSequence"
ColumnType="NUMBER"
TableName="XX_CUSTOMER"
PrimaryKey="true"
IsUpdateable="while_insert"
DefaultValue="@0"
Domain="oracle.jbo.domain.DBSequence"
RetrievedOnInsert="true">
<DesignTime>
<Attr Name="_DisplaySize" Value="22"/>
</DesignTime>
</Attribute>
<Attribute
Name="Firstname"
IsNotNull="true"
Precision="50"
ColumnName="FIRSTNAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Firstname_Rule_0"
ResId="customer.model.CustomerEO.Firstname_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Firstname_Rule_1"
ResId="customer.model.CustomerEO.Firstname_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Firstname_Rule_2"
OnAttribute="Firstname"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"
ResId="customer.model.CustomerEO.Firstname_Rule_2"/>
</Attribute>
<Attribute
Name="Middlename"
Precision="10"
ColumnName="MIDDLENAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="10"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Middlename_Rule_0"
ResId="customer.model.CustomerEO.Middlename_Rule_0"
ValName="Precision : (10)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Middlename_Rule_1"
ResId="customer.model.CustomerEO.Middlename_Rule_1"
OnAttribute="Middlename"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Lastname"
IsNotNull="true"
Precision="50"
ColumnName="LASTNAME"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Lastname_Rule_0"
ResId="customer.model.CustomerEO.Lastname_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Lastname_Rule_1"
ResId="customer.model.CustomerEO.Lastname_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Lastname_Rule_2"
ResId="customer.model.CustomerEO.Lastname_Rule_2"
OnAttribute="Lastname"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Dob"
IsNotNull="true"
ColumnName="DOB"
SQLType="TIMESTAMP"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="7"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Dob_Rule_1"
ResId="customer.model.CustomerEO.Dob_Rule_1"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:MethodValidationBean
Name="Dob_Rule_0"
ResId="customer.model.CustomerEO.Dob_Rule_2"
MethodName="validateDob"/>
</Attribute>
<Attribute
Name="Address1"
IsNotNull="true"
Precision="100"
ColumnName="ADDRESS1"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Address1_Rule_0"
ResId="customer.model.CustomerEO.Address1_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Address1_Rule_1"
ResId="customer.model.CustomerEO.Address1_Rule_1"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Address1_Rule_2"
ResId="customer.model.CustomerEO.Address1_Rule_2"
OnAttribute="Address1"
Pattern="^[a-z0-9A-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Address2"
Precision="100"
ColumnName="ADDRESS2"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Address2_Rule_0"
ResId="customer.model.CustomerEO.Address2_Rule_0"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Address2_Rule_1"
ResId="customer.model.CustomerEO.Address2_Rule_1"
OnAttribute="Address2"
Pattern="^[a-z0-9A-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="City"
IsNotNull="true"
Precision="30"
ColumnName="CITY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="City_Rule_0"
ResId="customer.model.CustomerEO.City_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="City_Rule_1"
ResId="customer.model.CustomerEO.City_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="City_Rule_2"
ResId="customer.model.CustomerEO.City_Rule_2"
OnAttribute="City"
Pattern="^[a-zA-Z(\s)]*$"
Inverse="false"/>
</Attribute>
<Attribute
Name="Country"
IsNotNull="true"
Precision="30"
ColumnName="COUNTRY"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Country_Rule_0"
ResId="customer.model.CustomerEO.Country_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Country_Rule_1"
ResId="customer.model.CustomerEO.Country_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="State"
IsNotNull="true"
Precision="30"
ColumnName="STATE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="30"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="State_Rule_0"
ResId="customer.model.CustomerEO.State_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="State_Rule_1"
ResId="customer.model.CustomerEO.State_Rule_1"
ValName="Precision : (30)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="Gender"
IsNotNull="true"
Precision="5"
ColumnName="GENDER"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="5"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Gender_Rule_0"
ResId="customer.model.CustomerEO.Gender_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Gender_Rule_1"
ResId="customer.model.CustomerEO.Gender_Rule_1"
ValName="Precision : (5)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<Attribute
Name="Primaryphone"
IsNotNull="true"
Precision="12"
ColumnName="PRIMARYPHONE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Primaryphone_Rule_0"
ResId="customer.model.CustomerEO.Primaryphone_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Primaryphone_Rule_1"
ResId="customer.model.CustomerEO.Primaryphone_Rule_1"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Primaryphone_Rule_2"
ResId="customer.model.CustomerEO.Primaryphone_Rule_2"
OnAttribute="Primaryphone"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Secondaryphone"
Precision="12"
ColumnName="SECONDARYPHONE"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Secondaryphone_Rule_0"
ResId="customer.model.CustomerEO.Secondaryphone_Rule_0"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Secondaryphone_Rule_1"
ResId="customer.model.CustomerEO.Secondaryphone_Rule_1"
OnAttribute="Secondaryphone"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Email"
IsNotNull="true"
Precision="100"
ColumnName="EMAIL"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="100"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Email_Rule_0"
ResId="customer.model.CustomerEO.Email_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Email_Rule_1"
ResId="customer.model.CustomerEO.Email_Rule_1"
ValName="Precision : (100)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Email_Rule_2"
ResId="customer.model.CustomerEO.Email_Rule_2"
OnAttribute="Email"
Pattern="[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Fax"
Precision="12"
ColumnName="FAX"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER"
DefaultValue="###-###-####">
<DesignTime>
<Attr Name="_DisplaySize" Value="12"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Fax_Rule_0"
ResId="customer.model.CustomerEO.Fax_Rule_0"
ValName="Precision : (12)"
Subtype="PRECISION_SCALE"/>
<validation:RegExpValidationBean
Name="Fax_Rule_1"
ResId="customer.model.CustomerEO.Fax_Rule_1"
OnAttribute="Fax"
Pattern="[0-9]{3}-?[0-9]{3}-?[0-9]{4}"
Inverse="false"/>
</Attribute>
<Attribute
Name="Languages"
IsNotNull="true"
Precision="50"
ColumnName="LANGUAGES"
SQLType="VARCHAR"
Type="java.lang.String"
ColumnType="VARCHAR2"
TableName="XX_CUSTOMER">
<DesignTime>
<Attr Name="_DisplaySize" Value="50"/>
</DesignTime>
<validation:PreDefinedValidationBean
Name="Languages_Rule_0"
ResId="customer.model.CustomerEO.Languages_Rule_0"
ValName="Mandatory"
Subtype="MANDATORY"/>
<validation:PreDefinedValidationBean
Name="Languages_Rule_1"
ResId="customer.model.CustomerEO.Languages_Rule_1"
ValName="Precision : (50)"
Subtype="PRECISION_SCALE"/>
</Attribute>
<AccessorAttribute
Name="ContactsEO"
Association="customer.model.CustomerEOtoContactsEO"
AssociationEnd="customer.model.CustomerEOtoContactsEO.ContactsEO"
AssociationOtherEnd="customer.model.CustomerEOtoContactsEO.CustomerEO"
Type="oracle.jbo.RowIterator"
IsUpdateable="false"/>
<Key
Name="SysC007004">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007004"/>
<Attr Name="_checkCondition" Value='"CUSTOMERID" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes"/>
</Key>
<Key
Name="SysC007005">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007005"/>
<Attr Name="_checkCondition" Value='"FIRSTNAME" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Firstname"/>
</AttrArray>
</Key>
<Key
Name="SysC007006">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007006"/>
<Attr Name="_checkCondition" Value='"LASTNAME" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Lastname"/>
</AttrArray>
</Key>
<Key
Name="SysC007007">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007007"/>
<Attr Name="_checkCondition" Value='"DOB" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Dob"/>
</AttrArray>
</Key>
<Key
Name="SysC007008">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007008"/>
<Attr Name="_checkCondition" Value='"ADDRESS1" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Address1"/>
</AttrArray>
</Key>
<Key
Name="SysC007009">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007009"/>
<Attr Name="_checkCondition" Value='"CITY" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.City"/>
</AttrArray>
</Key>
<Key
Name="SysC007010">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007010"/>
<Attr Name="_checkCondition" Value='"STATE" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.State"/>
</AttrArray>
</Key>
<Key
Name="SysC007011">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007011"/>
<Attr Name="_checkCondition" Value='"COUNTRY" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Country"/>
</AttrArray>
</Key>
<Key
Name="SysC007012">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007012"/>
<Attr Name="_checkCondition" Value='"GENDER" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Gender"/>
</AttrArray>
</Key>
<Key
Name="SysC007013">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007013"/>
<Attr Name="_checkCondition" Value='"PRIMARYPHONE" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Primaryphone"/>
</AttrArray>
</Key>
<Key
Name="SysC007014">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007014"/>
<Attr Name="_checkCondition" Value='"EMAIL" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Email"/>
</AttrArray>
</Key>
<Key
Name="SysC007015">
<DesignTime>
<Attr Name="_DBObjectName" Value="SYS_C007015"/>
<Attr Name="_checkCondition" Value='"LANGUAGES" IS NOT NULL'/>
<Attr Name="_isCheck" Value="true"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Languages"/>
</AttrArray>
</Key>
<Key
Name="XxCustomerdetailsPk"
PrimaryKey="true">
<DesignTime>
<Attr Name="_DBObjectName" Value="XX_CUSTOMERDETAILS_PK"/>
</DesignTime>
<AttrArray Name="Attributes">
<Item Value="customer.model.CustomerEO.Customerid"/>
</AttrArray>
</Key>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="customer.model.CustomerModelBundle"/>
</ResourceBundle>
</Entity> -
Hi,
I am facing a strange problem. i have created many new rows and inserted the data, but now i am facing a strange problem.
This is my requirement.
I have table with table action button as create.
when i click create it is not at all creating new row for the view object but instead it will take the row at the top of the table and replace that line with new data.
Below is the code :
In CO
In PR
if (!pageContext.isBackNavigationFired(false))
TransactionUnitHelper.startTransactionUnit(pageContext, "RVSchematicAttributeCreateTxn");
if (!pageContext.isFormSubmission())
System.out.println("control entered create block");
OAApplicationModule am = pageContext.getApplicationModule(webBean);
System.out.println("before calling ");
am.invokeMethod("createRVSchematicAttribute",null);
System.out.println("after calling ");
else
if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "RVSchematicAttributeCreateTxn", true))
OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);
pageContext.redirectToDialogPage(dialogPage);
IN PFR
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if(pageContext.getParameter("Apply")!=null)
System.out.println("apply button is clicked");
OAViewObject vo = (OAViewObject)am.findViewObject("xxczVAGCSSchematicAttributeVO1");
String schematicId = (String)vo.getCurrentRow().getAttribute("SchematicId");
String msg= "SchematicId "+schematicId+"has been added";
am.invokeMethod("apply");
System.out.println("returned back to create CO");
OAException confirmMessage = new OAException(msg,OAException.CONFIRMATION);
pageContext.putDialogMessage(confirmMessage);
pageContext.forwardImmediately("OA.jsp?page=/va/oracle/apps/xxcz/gcs/maintenance/webui/xxczVAGCSRVSchematicAttributeResultsPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
in AM
public void createRVSchematicAttribute()
System.out.println("entered createRVSchematicAttribute ");
xxczVAGCSSchematicAttributeVOImpl vo = this.getxxczVAGCSSchematicAttributeVO1();
// OAViewObject vo = (OAViewObject)this.getxxczVAGCSSchematicAttributeVO1();
vo.setMaxFetchSize(0);
vo.clearCache();
if (!vo.isPreparedForExecution())
vo.executeQuery();
/* Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
System.out.println("Row.STATUS_INITIALIZED");*/
int rowCount = vo.getRowCount();
Row row = vo.createRow();
vo.insertRowAtRangeIndex(rowCount, row);
row.setNewRowState(Row.STATUS_INITIALIZED);
Please help me i don't know where i am going wrong. i have checked so many times but didn't find any bug.
-MithunHi Zafar,
Ok i will explain my problem with an example.
I have employee table with following fields.
Empname
Empnumber
Salary
Table data
Empname EmpNumber Salary
Jack 10 1000
sam 20 2000
joe 30 3000
Above is the table structure for which i need to add another row
I have two page one results page and another create page
In Results page i will show the above table structure with table action button "Create" in order to insert new record to table.
When i click Create button it will navigate to create page
In Create page i will get the below data
Empname : Jack
Empnumber :10
Salary :1000
Instead of
Empname :
Empnumber :
Salary :
suppose now if i change the jack to jack1 , 10 to 11 , or 1000 to 10001 and click submit
Now the result page will show
Empname EmpNumber Salary
Jack1 11 1001
sam 20 2000
joe 30 3000
No fourth row is created it is actually behaving like update functionality and updating the top most row.
-Mithun -
Please help! (creating new rows in a table)
Hi guys.
I have the following table:
Guest ID | visit ID | start date | end date | days | total amount | avg amount
1234.......| 6750...| 01/01/08...| 20/01/08 | 20....| $2000.........| $100
Avg amount = amout per day = days/total amount
I need to figure out a way of summing up all the profits from, say, last 3 weeks, 2 months etc.
To do that, I am thinking of breaking up each stay period by days.
i.e. to create a new row in a table for each day.
So, for this example, we'd have 20 new rows,
with same guest iD and visit ID,
start date and end date are the same because we only count one day...
Guest ID | visit ID | start date | end date | days | total amount | avg amount
1234.......| 6750...| 01/01/08 ..| 01/01/08 | 1.......| $100............| $100
1234......| 6750....| 02/01/08 ..| 02/01/08 | 1.......| $100..........| $100
etc
The question is, is there any way to make oracle do this?
As in, to create new rows (maybe in a new table?)
Any help/ideas would be appreciated!
I am using Oracle SQL Plus 8.1.7.0.0I have used all_objects to populate multiple records as you are living in stone age :-)
SQL> drop table temp;
Table dropped.
SQL> create table temp (
2 Guest_ID integer primary key,
3 visit_ID integer,
4 start_date date,
5 end_date date,
6 days integer,
7 total_amount integer,
8 avg_amount integer);
Table created.
SQL> insert into temp values (1234, 6750, '01/jan/08', '20/jan/08', 20, 2000, 100);
1 row created.
SQL> commit;
Commit complete.
SQL> select t.guest_id,t.visit_id,t.start_date+rownum-1 start_date,t.start_date+rownum-1 end_date, 1 as days, avg_amount as total_amount, avg_amount
2 from temp t,
3 (select 1
4 from all_objects,
5 (select (end_date - start_date) + 1 day_count
6 from temp t
7 where guest_id = 1234)
8 where rownum <= day_count);
GUEST_ID VISIT_ID START_DAT END_DATE DAYS TOTAL_AMOUNT AVG_AMOUNT
1234 6750 01-JAN-08 01-JAN-08 1 100 100
1234 6750 02-JAN-08 02-JAN-08 1 100 100
1234 6750 03-JAN-08 03-JAN-08 1 100 100
1234 6750 04-JAN-08 04-JAN-08 1 100 100
1234 6750 05-JAN-08 05-JAN-08 1 100 100
1234 6750 06-JAN-08 06-JAN-08 1 100 100
1234 6750 07-JAN-08 07-JAN-08 1 100 100
1234 6750 08-JAN-08 08-JAN-08 1 100 100
1234 6750 09-JAN-08 09-JAN-08 1 100 100
1234 6750 10-JAN-08 10-JAN-08 1 100 100
1234 6750 11-JAN-08 11-JAN-08 1 100 100
GUEST_ID VISIT_ID START_DAT END_DATE DAYS TOTAL_AMOUNT AVG_AMOUNT
1234 6750 12-JAN-08 12-JAN-08 1 100 100
1234 6750 13-JAN-08 13-JAN-08 1 100 100
1234 6750 14-JAN-08 14-JAN-08 1 100 100
1234 6750 15-JAN-08 15-JAN-08 1 100 100
1234 6750 16-JAN-08 16-JAN-08 1 100 100
1234 6750 17-JAN-08 17-JAN-08 1 100 100
1234 6750 18-JAN-08 18-JAN-08 1 100 100
1234 6750 19-JAN-08 19-JAN-08 1 100 100
1234 6750 20-JAN-08 20-JAN-08 1 100 100
20 rows selected.Thanks,
Karthick. -
Create new sheets in report with script?
Is it possible to create new sheets in the report using VBscripts?
I am writing a script that will create a report with different sheets. The number of sheets in the report will change in each report depending on the number of groups added in the data portal. For example: If there are 3 channel groups in the data portal I will need 3 sheets in the report.
I searched for the instructions but I could not find how to do it.
And another question: how can I insert the name of a channel group in the report?
I am using DIAdem 9.0.
Thank you very much!For all with the same problem: You can copy the Picture an paste it automaticaly in ms word.
Here my code:
Call PicPrint("WinClip") ' Copy picture to clipboard
'open Word document
' Start Word via OLE.
' Always a new instance of Word will be created.
Set Word = CreateObject("Word.Application")
' Make Word visible. Until now Word was not visible.
Word.Visible = True
' Maximize Word-window.
Word.WindowState = wdWindowStateMaximize
' Create new Word-document based on prepared template.
AutoDrvLibr="C:\......" 'direction of the Word ducument
Const DiademWordTemplate = ".....doc" 'ducument name
Word.Documents.Add AutoDrvLibr & DiademWordTemplate, false
' Maximize document-window.
call copy_to_Word
Private Sub copy_to_Word
Word.ActiveWindow.WindowState = wdWindowStateMaximize
' Activate fullpage mode in Word.
Word.ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage
' Set reference to Word-document.
' With the help of this reference you can easily acess the Word-document.
Set WordDoc = Word.ActiveDocument
Const wdPasteMetafilePicture = &H3
'Paste picture
Word.Selection.Range.PasteSpecial , , , , wdPasteMetafilePicture
Word.Selection.EndKey 5 'Set Courser to end of page
Word.Selection.Range.InsertBreak(&H1) 'paste new sheet
Word.Selection.MoveDown 5,1 'move ohne row down to set the courser to the next page
end sub -
Creating new file using report generation express vi
Hello,
In my application, I need to write certain data in excel sheet. For that I created an excel template and I used the express vi in report generation toolkit to save the appropriate data in appropritate columns. I need a new file created everyday by that day's name and write the data to it rest of the day. I am having problems creating new file using this express vi. I tried using the low level vi's but not been able to it properly.
Attaching my code and excel template.
Please help.
Thanks!
Solved!
Go to Solution.
Attachments:
excel write2.vi 119 KB
Book2111.xltx 8 KBr_te wrote:
The thing is everyday there cannot be a file provided.
Sure there can. Don't you see the input on the Express VI for a file? "Path To Save Report" is the name of the input you want.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
How to add one button at top of table that creates new rows each time a user clicks on it?
In the help guide, there is an example of adding buttons to each row - an Add Row and Delete Row button. I am interested in having one button at the top of the table that can add rows.
Hi,
You can create a table with a header row, where you can place your add button in one of its cells.
Then you need a script to create a new row in the buttons click event. In a table named 'Table1' with a row named 'Row1' it looks this way:
Table1._Row1.addInstance() -
Problem in Creating new row & inserting data using CreateInsert and Commit
Hello All,
I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
Here is the code snippet of my application:
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
*if (!operationBinding.getErrors().isEmpty()) {*
return null;
OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
Object result1 = operationBinding1.execute();
*if (!operationBinding1.getErrors().isEmpty()) {*
return null;
I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
Is there anything I am missing?
Please Help.hi user,
i dono. why are trying with codes. adf provides zero lines codes.
a wonderful drag and drop functionality provide by the framework.
while double click the button the codes are registered in your bean
public String cb6_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb8_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb7_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("Delete");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
public String cb14_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Delete4"); // some different here. after deleting usually do commit
OperationBinding operationBinding1 =
bindings.getOperationBinding("Commit"); // so here commit operation.
Object result = operationBinding.execute();
Object result1 = operationBinding1.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
if (!operationBinding1.getErrors().isEmpty()) {
//add error handling here
return null;
return null;
}if am not understud correctly. please some more explanation need. -
How to create new rows in a JTable dynamically?
I want to add new rows to a JTable dynamically based on my resultset from the database .
How to do ?
Please help me
Thanks in advanceThank u for ur reply .But still i need to clarify something.
I've used the below code to create a basic table within my frame.
Object[][] data = { {"dilipp", "r", "early", "10","20"}};
String[] columnNames = {"First Name", "Last Name", "payment", "from", "to"};
table = new JTable(data, columnNames);
after this i connect to database and query .The values returned are to be populated in the table created above through say a button "Next" month.
now my button event goes like this :
public void actionPerformed(ActionEvent e)
if (e.getActionCommand().equals("next"))
here i need to add a new row for the values
How to add here ?
please tell me -
Hi,
I need to add a new record through report, I have a Add new button clicking on which report should add and editable row with textboxes to add new column values.
Please help. Thanks.Hello User.
Please change your name from the default #'s to your name, or a nickname etc.
It makes things easier for everyone to communicate.
Can you please provide some more details of your problem?
Can you rewrite your question. I don't understand what your problem is...
Which version of Apex are you using?
Have you read and looked at the online instruction manuals?
Here's a link.
http://www.oracle.com/technology/products/database/application_express/index.html
http://download-west.oracle.com/docs/cd/B31036_01/doc/nav/portal_booklist.htm -
Creating new rows in OrderLines child
I am currently having an issue when trying to create a new row in my order_lines table for an existing Order. When I try to do row.createRow() I get:
Trying to create a new order line
oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity.
void oracle.jbo.server.EntityImpl.create(oracle.jbo.AttributeList)
void org.cgfns.cerpass.bc.products.CrpOrderLinesImpl.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 org.cgfns.cerpass.bc.products.TestMasterDetailView.main(java.lang.String[])
This is the meat of the program. I've started simple to try to isolate the issue. BCs are having trouble inserting using the example provided in other OTN posts covering the same type of issue. I thinking BC4J might have a problem with the primary keys. The OrderHeaders table is linked to the OrderLines table via the OrderHeaderID but there is also a DB Sequence field for OrderLines called OrderLinesId. Both of there are checked as PK. I'm not sure if this may be causing an issue or not.
I did create a test using the OE schema on Orders and Orderlines and I am able to create rows in it. Howerver there is no DBSequence in the OrderItems table like there is in the OrderLines table that is giving me a problem. I am able to create a view link to the OrderHeaders table and the do the link.getSource and link.getDestination calls to get the viewObjects. I then create a new row using createRow and set the attributes and commit. All works fine in OE. I do the same on the other table (OrderLines, OrderHeaders) I get the error. My source is a follows.
public static void main(String[] args) {
TestMasterDetailView test = new TestMasterDetailView();
test.getApplicationModule();
String orderId = "1106";
if(test.am == null) {
System.out.println("Error appMod null");
ViewLink ordersToItems = test.am.findViewLink("CrpOrderHeaderFk1Link");
ViewObject ordersV = ordersToItems.getSource();
ordersV.setWhereClause("ORDER_HEADERS_ID = " + orderId);
ordersV.executeQuery();
System.out.println("RowCnt = " + ordersV.getRowCount()); // returns 1
Row oRow = ordersV.next(); // throws invalid entity
System.out.println("OrderHeadersId = " + oRow.getAttribute("OrderHeadersId"));
ViewObject itemsV = ordersToItems.getDestination();
if(itemsV == null) {
System.out.println("Error itemsV == null!");
System.out.println("Trying to create a new order line");
Row itemRow = itemsV.createRow();
itemRow.setAttribute("OrderHeadersId", orderId);
itemRow.setAttribute("OrderLinesId", "3030");
itemRow.setAttribute("StatusTypesId", "125");
itemRow.setAttribute("Quantity", "111");
itemRow.setAttribute("BundlesId", "139");
itemsV.insertRow(itemRow);
test.am.getTransaction().commit();
test.am.remove();
All I really want to do is insert a new record into the OrderLines table. From what I've read this seems to be an issue because of the associations. Any help would be greatly appreciated.
Thanks,
Brad Gibson
TUSCIt doesn't look like you're using DBSequence domain for the OrderLinesId attribute. If you are then you do not need to fill in the sequence as you've done in the create method.
Getting back to create issue, You may want to set the 'order' id (foreign key) values before calling super and then call the getOrder() (or getXXX where XXX is the order accessor in this entity) method to verify if the order of the given ID exists/found in the cache.
By the way, are you also using a similar create() in order with DBSequence as the type for the pK and you force a sequence value on top of it via setAttribute?
Yes, this is the create method inside CrpOrderLinesImpl.java
protected void create(AttributeList attributeList) {
super.create(attributeList);
SequenceImpl s = new SequenceImpl("CRP_ORDER_LINES_ID_SEQ", getDBTransaction());
setAttribute("OrderLinesId",s.getSequenceNumber());
Thanks,
Brad -
How to create new row in Adf uix table
hi,
I am using Jdev 10.1.2 , Can any body tell me how to insert new row in table ?
ThanxHi,
try creating a createInsert action.
Regards,
Koen Verhulst -
Hi,
I have to insert a new row in a database. How can I set the id?
its value returns me it this query: SELECT xxril.evento_id_seq.nextval from dual
The code is:
row[id]= getEventiView1().createRow();
row[id].setAttribute("ID", ????? );
try{
row[id].setAttribute("Scarto", "1");
row[id].setAttribute("Reintegro", "2");
row[id].setAttribute("QtaProdotta", "3");
}catch(oracle.jbo.JboException e)
System.out.println(" Errore nella Registrazione dell'evento");
getEventiView1().insertRow(row[id]);
getTransaction().commit();
Thanksuser445503:
If you need to set a default value dynamically, such as from a sequence, you can override the create() method of your entity, and use oracle.jbo.server.SequenceImpl to access your sequence.
(in your entity class)
protected void create() {
super.create();
SequenceImpl seq = new SequenceImpl("YOUR_SEQ", getDBTransaction());
setId(seq.getSequenceNumber());
Or, you could add a database trigger.
Hope it helps,
-Anthony
Maybe you are looking for
-
hi to all, i tried to do above type sequence which similar circket over sequence , i tried to do but increament and start with are allowing only integer value.. if anny one know the answer please share with us .... thnaks in advance ....
-
Restricting a Ratio with a filter on a dynamic value.
In a Report built with the query designer. I display: Row Custumer Category Material ListPrice SalesPrice 1 K1 C1 M1 5 4 2 K2 C1 M2 6 5
-
Issue Search Help Exit for Material Group
Dear Expertsl, I developed a search help exit for material group for the search helps both H_T023 and H_2023_MEPO to restrict certain material groups from the actual display as follows 1) I developed custom table to hold the Invalid material groups
-
Acrhitecture of network load balancing solution
i'm working on a setup that will transition our existing data center setup to a network load balancing solution. i'm far from understanding what components to use and how to approach the problem so any help would be very welcome. here is what we curr
-
Iphoto will not open my videos
TO OPEN A VIDEO FROM IPHOTO, I MUST NOW RIGHT CLICK, SELECT FILE INFO USE THAT LIST OF FILES TO OPEN THE VIDEO, WHY