How to populate the data or details of only the present year and the previous year with respect to the given RATNG?

Hi All,
I have created a form with 5 blocks (namely ENQACMHDR, ENQACMDTL, ENQACEHDR, ENQACEDTL, ENQACSPEC), where i have 8 push buttons (namely ENTER_QUERY, EXEC_QUERY, CLEAR, FIRST, NEXT, PREVIOUS, LAST & EXIT).
This form is created just for viewing purpose only. So after I execute, all the blocks have been blocked against insert & update.
I query on 2 fields that is 'ENQNO' and 'RATNG' (Both the fields belong to the block ENQACMDTL).
When I click on 'EXEC_QUERY' directly, all the data of all the years populates.
But the user wanted the data to be populated from only the present year and the previous year.
So , on 'WHERE Clause' of the property_palette of 'ENQACMDTL' block , I put in the following condition:
SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
PROPERTY PALETTE (ENQACMDTL block)
WHERE Clause
SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR( ADD_MONTHS(SYSDATE,-12) , 'YYYY') OR SUBSTR(ENQACMDTL.ENQNO, 1,4)=TO_CHAR(SYSDATE, 'YYYY')
Now the data of only the present year and the previous year is being populated. Its ok with the field of 'ENQNO'.
The problem is when i query on field 'RATNG' . 'RATNG' is a Text_item with Number of Items displayed=5. (5 rows)
The following are 2 columns of a Table (Name=ENQACMDTL) in Database.
ENQNO
RATNG
2013900054
500KC2
2013900047
800KC4
2013520018
750KC6
2012900037
1000KC2
2012520109
500KC2
2012140019
750KC6
2011540036
500KC2
2011100030
1000KC2
2006100007
90KD8
2006750014
750KC6
2006900072
500KC2
The first 4 numbers of 'ENQNO' denotes the year. There are more than a lakhs of records.
So when i query on the field 'RATNG',
Example:For RATNG=500KC2;
I click on ENTER_QUERY, On the field of 'RATNG' , i put in the value 500KC2 and click on  EXEC_QUERY; Details with respect to 500KC2 is displayed as well as all the other unwanted RATNG like 750KC6, 1000KC2 (which belongs to the ENQNO of the present year and the previous year) also gets displayed.
I want details of only RATNG (500KC2) to be displayed, but only of the present year and the previous year, that is 2013900054, 2012520109 (ENQNO).
Other than 500KC2 RATNG, no other RATNG must be displayed.
The RATNG=500KC2 is also present for ENQNO=2011540036 , 2006900072. But I dont want these to be displayed.
I want only the data or details of the present year and the previous year to be displayed or populated with respect to the given RATNG.
Can You Help me or tell me what do i do for this?
Hope I'm clear with my question!!
If my question is not clear, let me know plz.
Thank You.
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
Oracle forms 6i.

On key-exeqry you have to program.  Delete all other trigger codings for checking your condition.
It dint work on key-exeqry.
I tried key-exeqry on form trigger, block (enqacmdtl) and also on field(:enqacmdtl.enqno) , but none of them worked.
It did not display the message.
I have a 'PUSH-BUTTON:EXEC_QUERY.
For EXEC_QUERY, Trigger : WHEN_BUTTON_PRESSED;
I added the following code:
if to_number(substr(:enqacmdtl.enqno,1,4))<to_number(to_char(add_months(sysdate,-12),'YYYY')) then
     message('The Rating is not present for the present year and the previous year');message(' ',no_acknowledge);
     raise form_trigger_failure;
else
     execute_query;
end if;
It is working fine and the message is being displayed.
But again I have a new problem and that is;
On the field :enqacmdtl.enqno, when i enter the '2013%' and press 'EXEC_QUERY', it works fine.
but when i enter '2006%' and press 'EXEC_QUERY', it shows the following error
FRM-50016: Legal characters are 0-9 - +E. It does not display the message also.
but when i enter the complete number, '2006580002', then it works fine , that is it displays the message (The Rating is not present for the present year and the previous year).
The problem is because of '%', only when i put in the restricted data (which does not satisfy where condition).
How do i solve this?
Thank You Priyasagi.

Similar Messages

  • How to calculate Sales percentage difference between selected year and its previous year in a Matrix

    Hi,
    I'm trying to generate a report using matrix like this
                                                          Month
    Product     PreviousYearSalesAmount    SelectedYearSalesAmount      %SalesDifference
    I can populate year sales amount, but i cant calculate the percentage.
    Can Anyone help me please.
    Note: Month and Year are passed as parameters.
    Thank you.

    Hi Abhiram,
    As per my understanding you can show your fields in matrix.
    Only problem is to create the additional column which will have the  %SalesDifference value right?
    If yes,
    Just create one column as shown in below screen,
    It will create one column, Name the header of this newly created column as %SalesDifference
    In below this header , where you want to show the value for %SalesDifference as
    =sum(iif(Fields!year.Value=Parameters!year.Value,(Fields!SalesAmount.Value),-Fields!SalesAmount.Value))/Fields!SalesAmount.Value
    Set the property of the column in number as Percentage.
    run the report, you will see as below screen.
    For your reference I am attaching my RDL code, you can save as .rdl file and run the report (sample Data inside the report only)
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Matrix</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>14pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>SteelBlue</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <Height>0.37in</Height>
    <Width>5in</Width>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    <Tablix Name="Tablix1">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox16">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Product</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox16</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>LightBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox17">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox17</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1.79722in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1.76722in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="SalesAmount">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!SalesAmount.Value)</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>SalesAmount</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox76">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=sum(iif(Fields!year.Value=Parameters!year.Value,(Fields!SalesAmount.Value),-Fields!SalesAmount.Value))/Fields!SalesAmount.Value</Value>
    <Style>
    <Format>0.00%</Format>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox76</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="month">
    <GroupExpressions>
    <GroupExpression>=Fields!month.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!month.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="month1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=MonthName(Fields!month.Value)</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>month1</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>LightBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <Group Name="year">
    <GroupExpressions>
    <GroupExpression>=Fields!year.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!year.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="year">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!year.Value</Value>
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>year</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember />
    </TablixMembers>
    </TablixMember>
    </TablixMembers>
    </TablixMember>
    <TablixMember>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="Textbox61">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>%SalesDifference</Value>
    <Style>
    <FontStyle>Normal</FontStyle>
    <FontWeight>Bold</FontWeight>
    <TextDecoration>None</TextDecoration>
    <Color>#000000</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox61</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <BackgroundColor>LightBlue</BackgroundColor>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <TablixMembers>
    <TablixMember>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="Textbox62">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style>
    <FontWeight>Bold</FontWeight>
    </Style>
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox62</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="Product">
    <GroupExpressions>
    <GroupExpression>=Fields!Product.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!Product.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1.38889in</Size>
    <CellContents>
    <Textbox Name="Product1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!Product.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Product1</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet1</DataSetName>
    <Top>0.38in</Top>
    <Left>0.04667in</Left>
    <Height>0.75in</Height>
    <Width>4.95333in</Width>
    <ZIndex>1</ZIndex>
    <Style>
    <Border>
    <Style>None</Style>
    </Border>
    </Style>
    </Tablix>
    </ReportItems>
    <Height>1.20167in</Height>
    <Style />
    </Body>
    <Width>5.1in</Width>
    <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="DataSource1">
    <DataSourceReference>DataSource1</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>501ee6de-61fb-416f-9a92-011661d01cba</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>DataSource1</DataSourceName>
    <QueryParameters>
    <QueryParameter Name="@year">
    <Value>=Parameters!year.Value</Value>
    </QueryParameter>
    <QueryParameter Name="@Month">
    <Value>=Parameters!Month.Value</Value>
    </QueryParameter>
    </QueryParameters>
    <CommandText>select * from
    select 'apple' Product ,1 month ,2014 year,2000 SalesAmount
    union
    select 'apple' Product ,1 month,2015 year,3000 SalesAmount
    union
    select 'dell' Product ,1 month,2014 year,3000 SalesAmount
    union
    select 'dell' Product ,1 month,2015 year,2500 SalesAmount
    union
    select 'apple' Product ,2 month,2014 year,1500 SalesAmount
    union
    select 'apple' Product ,2 month,2015 year,3000 SalesAmount
    union
    select 'dell' Product ,2 month,2014 year,3000 SalesAmount
    union
    select 'dell' Product ,2 month,2015 year,5500 SalesAmount
    )t
    where year between @year-1 and @year
    and Month=@Month</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="Product">
    <DataField>Product</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="month">
    <DataField>month</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="year">
    <DataField>year</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    <Field Name="SalesAmount">
    <DataField>SalesAmount</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <ReportParameters>
    <ReportParameter Name="year">
    <DataType>String</DataType>
    <DefaultValue>
    <Values>
    <Value>2015</Value>
    </Values>
    </DefaultValue>
    <Prompt>year</Prompt>
    </ReportParameter>
    <ReportParameter Name="Month">
    <DataType>String</DataType>
    <DefaultValue>
    <Values>
    <Value>1</Value>
    </Values>
    </DefaultValue>
    <Prompt>Month</Prompt>
    </ReportParameter>
    </ReportParameters>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>ee1a8383-6595-42b1-94f2-c68d681c85d3</rd:ReportID>
    </Report>
    Thanks
    Prasad
    Mark this as Answer if it helps you to proceed on further.

  • I have just connected my new apple tv, in the main menu I see only two icons; "computers" and "settings".  Where do I find the icons for internet, movies etc. We do not live in the US..

    I have just connected my new apple TV and in the main menu see only two icons: computers and settings.  How do I access the rest of the icons (internet, movies etc...)  We do not live in the US.  The unit has full WiFi access with no problems, I can access ITunes on my laptop via home sharing no problem.

    Glad that this solved your problem but if you searh past threads there are a LOT of people with identical problems.
    Reading through the threads my take is
    There seems to be something awry with wifi chipset. Typical symptoms are initially being able to connect to connect to a Wifi network then the connection is dropped. Then you see just the 'computers' and 'settings' icons on screen
    Power off, reset and factory restore doesnt seem to solve it
    Occasionally its nearby antenna cables etc causing interference
    One report with convincing evidence it was the HDMI cable, swapping to anotehr cable fixed the problem
    Plugging in ethernet works, this is purely a wifi issue
    Sometimes plugging in ethernet temporararily wakes up the wifi
    Many people seem to have exchanged their units only for the same thing to happen to the new unit a few weeks later. Just wondering if its a fomponent fail or heat issue.

  • How to populate TableView data on the other screen TextField

    Hi guru’s
    I am having problem in populating data from a table in one screen to a Text Field in the other screen. I have two classes FirstClass containing a textbox and a button. On pressing a button a second window is opened containing a Table of values. As the user double clicks a row the value of the second column of the row should be inserted into the textbox of the FirstClass. Code of both the classes is attached. Thanking you in anticipation.
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class FirstClass extends Application {
    public static void main(String[] args) {
         launch(args);
    @Override
    public void start(final Stage primaryStage) {
         primaryStage.setTitle("First Class");
    GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
    final TextField userNameFld = new TextField();
    gridpane.add(userNameFld, 1, 1);
    Button btn = new Button();
    btn.setText("Show Table");
    gridpane.add(btn, 1, 3);
    btn.setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent event) {
         String a = TableClass.showDialog(primaryStage, true, "Table Window" );
         userNameFld.setText(a);
    StackPane root = new StackPane();
    Scene scene =new Scene(root, 300, 250);
    root.getChildren().addAll(gridpane);
    primaryStage.setScene(scene);
    primaryStage.show();
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Modality;
    import javafx.stage.Stage;
    public class TableClass extends Stage {
         private static TableClass dialog;
         private static String value = "";
         public static class Person {
    private final SimpleStringProperty firstName;
    private final SimpleStringProperty lastName;
    private Person(String fName, String lName) {
    this.firstName = new SimpleStringProperty(fName);
    this.lastName = new SimpleStringProperty(lName);
    public String getFirstName() {
    return firstName.get();
    public void setFirstName(String fName) {
    firstName.set(fName);
    public String getLastName() {
    return lastName.get();
    public void setLastName(String fName) {
    lastName.set(fName);
         private TableView<Person> table = new TableView<Person>();
         private final ObservableList<Person> data =
         FXCollections.observableArrayList(
         new Person("JACK", "BROWN"),
         new Person("JOHN", "VIANNEYS"),
         new Person("MICHAEL", "NELSON"),
         new Person("WILLIAM", " CAREY")
         public TableClass(Stage owner, boolean modality, String title) {
              super();
              initOwner(owner);
              Modality m = modality ? Modality.APPLICATION_MODAL : Modality.NONE;
              initModality(m);
              setOpacity(1);
              setTitle(title);
              StackPane root = new StackPane();
              Scene scene = new Scene(root, 750, 750);
              setScene(scene);
              GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
              TableColumn firstNameCol = new TableColumn("First Name");
         firstNameCol.setMinWidth(100);
         firstNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("firstName")
         TableColumn lastNameCol = new TableColumn("Last Name");
         lastNameCol.setMinWidth(200);
         lastNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("lastName")
         table.setItems(data);
         table.getColumns().addAll(firstNameCol, lastNameCol);
         table.setOnMouseClicked(new EventHandler<MouseEvent>() {
                   public void handle(MouseEvent me) {
                        if (me.getClickCount() >= 2) {
                   String srr = table.getItems().get(table.getSelectionModel().getSelectedIndex()).getLastName();
                   value = srr;
                   dialog.hide();
         gridpane.add(table, 1, 5,1,20 );
              root.getChildren().add(gridpane);
         public static String showDialog(Stage stg, Boolean a , String title){
              dialog = new TableClass( stg,a, title);
              dialog.show();
              return value;
    }

    Cross posted
    http://www.coderanch.com/t/582014/JavaFX/java/populate-TableView-data-other-screen
    http://stackoverflow.com/questions/10734649/how-to-populate-tableview-data-on-the-other-screen-textfield-in-javafx-2-0
    Moderator advice: Please read the announcement(s) at the top of the forum listings and the FAQ linked from every page. They are there for a purpose.
    Then edit your post and format the code correctly.
    db

  • I have a OSX version 10.7.5. On Safari mail I can no longer see the information that usually appears at the beginning of an incoming email, like the date, senders details etc. What do I do to be able to see this again?

    I have a OSX version 10.7.5. On Safari mail I can no longer see the information that usually appears at the beginning of an incoming email, like the date, senders details etc. What do I do to be able to see this again?

    No, I get my mail on my computer, not on a website. I used to be able to see the information but in sorting another issue I must have changed a setting or something. I have gone to View. Under Message Attributes most things are ticked but many of them are not bold print i.e. they are pale grey. I don't know how to activate them again.

  • This is related to UCS-D : How to populate inventory data into lovs

    This is related to UCS-D : How to populate inventory data into lovs 

    I think you need to update the database from the applet.
    Then refresh the page to sync with values in the database.
    --Prasanna                                                                                                                                                                                                                                                                       

  • Have made a rebbot from Time Machine, and now I lack a lot of pictures. Can see icons, but not enlarge them. Especially pictures where 2009 is included in the date is missing? When I set up my desktop, I can find some of the pictures. Where do They hide,

    Missing Pictures.
    Have made a rebbot from Time Machine, and now I lack a lot of pictures. Can see icons, but not enlarge them. Especially pictures where 2009 is included in the date is missing?
    When I set up my desktop, I can find some of the pictures. Where do They hide, and what shall I do.
    Have made back up, but unfortunately a little too late. What to do?
    MacBook Pro 15 "late 2008, Processor 2.53 Ghz Intel Core 2 Duo, Graphics NVIDIA GeForce 9400M 256 MB, Software Mac OS X 10.7.4 Lion (11E53).

    1. You did not get an error message telling you that your iPhoto library was getting full. You got a message telling you that your HD was getting full, right?
    OS X needs about 10 gigs of hard drive space for normal OS operations - things like virtual memory, temporary files and so on.
    Without this space your Mac will slow down as the OS hunts for space on the disk, files will be fragmented, also slowing things down, apps will crash and the risk of data corruption - that is damage to your files, photos, music - increases exponentially.
    Your first priority is to make more space on that HD. Nothing else can be done until you do.
    Purchase an external HD and move your Photos and Music to it. Both iPhoto and iTunes can run perfectly well with the Library on an external disk.
    Your Library has been damaged from being run on an overfull disk.
    How much free space on it now?

  • Iphone4 would not restore Error -50. I have tried to restore and it restored it to the point that it created after 5.0 was installed. How can I get it an older restore point from my backups and restore it on another computer? The phone has been wiped out.

    Iphone would not restore---- Error -50. I have tried to restore, and it restored it to the new point that it created after 5.0 was installed. How can I get it an older restore point from my backups and restore it on another computer? The phone has been wiped out. I can see earlier backups in my C:\Documents and Settings\user\Application Data\Apple Computer\MobileSync\Backup folder. There are four subfolders in this address. I need my contacts, photos, and messages back. I know this is a common error but I can not figure it out. I have ran the other troublshoot items in the error steps for 13 and 14 like apple says. Is there a way to call apple and get a step by step of how to restore from another restore point? Does anybody have a solution????

    It tells you to go to Error 13 and 14 if you receive error (-50).
    Here is what I have tried...
    Error 13 and 14: These errors are typically resolved by performing one or more of the steps listed below:
    Perform USB isolation troubleshooting, including trying a different USB port directly on the computer. See the advanced steps below for USB troubleshooting. I have moved it around to different ports.
    Put a USB 2.0 hub between the device and the computer. Didn't change anything.
    Try a different USB 30-pin dock-connector cable.
    Eliminate third-party security software conflicts. Removed all virus protection and firewall.
    There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your registry. Your default packet size being set incorrectly can cause this error. Contact the manufacturer of the software that installed the packet-size modification for assistance. Or, follow this article by Microsoft: How to reset Internet Protocol (TCP/IP) to reset the packet size back to the default for Windows.Used the Microsoft fix it.
    Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online. Doesn't matter.
    Try to restore from another known-good computer and network. I do not know how to do this or how to find the correct/full/complete restore point. There should be more information for this.

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so
    many hours.

    How big is the table on server B? Is that possible to bring the all data into a server A and merge the data locally?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every 4 hours.

    How do I merge data from table1 on server 1 to final table on server 2 with a stored procedure to execute every so many hours.

    Hello,
    If you had configure server2 as
    linked server on the server1, you can run the following statement inside stored proceduce to copy table data. And then create a job to the run stored proceduce every 4 hours.
    Insert Into Server2.Database2.dbo.Table2
    (Cols)
    Select Cols From Server1.Database1.dbo.Table1
    Or you can use the SQL Server Import and Export Wizard to export the data from server1 to server2, save the SSIS package created by the wizard on the SQL Server, create a job to run the SSIS package. 
    Reference:http://technet.microsoft.com/en-us/library/ms141209.aspx
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Metagen is skipped sometimes complaining because all output files are up-to-date with respect to the input files

    Hi,
    In one of my dll (VS2010), the process Skipping target "MetaGen" because all output files are up-to-date with respect to the input files.
    it is at  random.  I have checked the time stamps of the dll and metagen.write.1.tlog both having the time stamp on the failed build.  But all files in release folder did not have the same time.  They are one hour earlier than the dll
    and the  metagen.write.1.tlog.
    On the good build  it said the input file is is newer than output file ".\Release\\metagen.write.1.tlog" and allfiles in the release folder have same time stamp.
    Any clue to solve this ?
    Regards,

    Hi,
    Based on your post, I am not very clear about your issue. I feel your issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
     Could you please provide us more information so that we resolve your issue better?
    What type of project are you working with? C++ MFC project?
    How was the
    metagen.write.1.tlog file generated in your project?
    What error messages did you get?
    What is the 'input file'?
    If possible, please provide us a sample project to reproduce your issue.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    Hi
    Please take a look to this thread Re: Can I refresh the browser rather than open a new tab?

  • HT201210 i have update and  restore my wife iphone to 7.0.4  and i lost all the data what to do now? all contacts and kids photos goooone , we have the same apple ID and when i tried to restore from i cloude , i restored my contacts not her???!!!!!

    i have update and  restore my wife iphone to 7.0.4  and i lost all the data what to do now? all contacts and kids photos goooone , we have the same apple ID and when i tried to restore from i cloude , i restored my contacts not her???!!!!!

    Looks like you restored your backup file to her phone. If you didn't back up your wife's phone first, then the data is gone, sorry.

  • TS4425 How do you agree to the latest iCloud Terms of Service if you don't have an iOS device only a Mac computer and an Apple TV with an iCloud account?

    How do you agree to the latest iCloud Terms of Service if you don't have an iOS device only a Mac computer and an Apple TV with an iCloud account?

    Part 2
    Thanks for the feedback Skhorchid.  Glad it worked for you too.
    A bit later I discovered that Photo Stream was not working on my Windows 7 PC either.  If I opened the iCloud control panel and put a check in the box to turn on Photo Stream, and then closed and reopened the control panel, the check mark was gone again.  Also, nothing happened when I clicked on the options button beside the Photo Stream check box.  I already had version 2 of the iCloud control panel so I could not upgrade further. 
    I ended up uninstalling the iCloud control panel, rebooting, downloading a fresh copy from Apple, and reinstalling it.  This worked and I now have photo stream working on my Windows 7 system as well.

  • I updated from windows xp to windows 7 and can not get into my itunes account.  I get the notice that I am only allowed 5 devices and this isn't a new device just an updated one.  How do I get to my itunes?

    I updated from windows xp to windows 7 and can not get into my itunes account.  I get the notice that I am only allowed 5 devices and this isn't a new device just an updated one.  How do I get to my itunes?

    Take a look at Apple's document for authorizations -> iTunes Store: About authorization and deauthorization.
    You can deauthorize all computers from iTunes. All you have to do is click iTunes Store, click your account name in the upper right corner of iTunes, then deauthorize all.

Maybe you are looking for