Data selection and report generation

Hi,
I want to create a report with information about friends. I have a class like this:
public class friend(){
Date born;
Vector phones;
String name;
I have a collection of friends and I want generate a report with some of them. I want to select those friends that verify some restrictions like this:
- Friends with a born date in a range (ej: from 1960 to 1965)
- Friends with the same work phone
- etc.
My solutions is anything like this:
class FriendFilter(){
Friend from_friend;
Friend to_friend;
boolean filter_born=false; // To say if may be aplicated the filter
boolean filter_phone=false;
My question is if there are any pattern for this. Is this solution the best one?
Thank you in advance.

The filter class might look a little different. You need to pass the collection of Friend objects to the filter class. And then you can have the query methods that filter the Friend objects.
public class FriendFilter {
private Collection friends;
FriendFilter(Collection f) {
this.friends = f;
public Collection sortByBirthYear(int beginYear, int endYear) {
public Collection sortByPhoneNumber(int phoneNum) {
}

Similar Messages

  • DB link problem between active Data Guard and report application database

    My database version in 11.2.0.2.0 and OS is Oracle Solaris 10 9/10.
    I am facing a problem in my Active data guard Database for reporting purpose. Active Data guard information is as below.
    SQL> select name, database_role, open_mode from v$database;
    NAME DATABASE_ROLE OPEN_MODE
    ORCL PHYSICAL STANDBY READ ONLY WITH APPLY
    Problem detail is below
    I have created a db link (Name: DATADB_LINK) between active data guard and report application database for reporting purpose.
    SQL> create database link DATADB_LINK connect to HR identified by hr using 'DRFUNPD';
    Database link created.
    But when I run a query using db link from my report application database I got this below error.
    ORA-01555: snapshot too old: rollback segment number 10 with name "_SYSSMU10_4261549777$" too small
    ORA-02063: preceding line from DATADB_LINK
    Then I check Active Data Guard database alart log file and get below error
    ORA-01555 caused by SQL statement below (SQL ID: 11yj3pucjguc8, Query Duration=1 sec, SCN: 0x0000.07c708c3):SELECT "A2"."BUSINESS_TRANSACTION_REFERENCE","A2"."BUSINESS_TRANSACTION_CODE",MAX(CASE "A1"."TRANS_DATA_KEY" WHEN 'feature' THEN "A1"."TRANS_DATA_VALUE" END ),MAX(CASE "A1"."TRANS_DATA_KEY" WHEN 'otherFeature' THEN "A1"."TRANS_DATA_VALUE" END )
    But the interesting point if I run the report query directly in Active Data Guard database, I never got error.
    So is it a problem of DB link between active Data Guard and other database?

    Fazlul Kabir Mahfuz wrote:
    My database version in 11.2.0.2.0 and OS is Oracle Solaris 10 9/10.
    I am facing a problem in my Active data guard Database for reporting purpose. Active Data guard information is as below.
    SQL> select name, database_role, open_mode from v$database;
    NAME DATABASE_ROLE OPEN_MODE
    ORCL PHYSICAL STANDBY READ ONLY WITH APPLY
    Problem detail is below
    I have created a db link (Name: DATADB_LINK) between active data guard and report application database for reporting purpose.
    SQL> create database link DATADB_LINK connect to HR identified by hr using 'DRFUNPD';
    Database link created.
    But when I run a query using db link from my report application database I got this below error.
    ORA-01555: snapshot too old: rollback segment number 10 with name "_SYSSMU10_4261549777$" too small
    ORA-02063: preceding line from DATADB_LINK
    Then I check Active Data Guard database alart log file and get below error
    ORA-01555 caused by SQL statement below (SQL ID: 11yj3pucjguc8, Query Duration=1 sec, SCN: 0x0000.07c708c3):SELECT "A2"."BUSINESS_TRANSACTION_REFERENCE","A2"."BUSINESS_TRANSACTION_CODE",MAX(CASE "A1"."TRANS_DATA_KEY" WHEN 'feature' THEN "A1"."TRANS_DATA_VALUE" END ),MAX(CASE "A1"."TRANS_DATA_KEY" WHEN 'otherFeature' THEN "A1"."TRANS_DATA_VALUE" END )
    But the interesting point if I run the report query directly in Active Data Guard database, I never got error.
    So is it a problem of DB link between active Data Guard and other database?
    Check this note which is applicable for your environment
    *ORA-01555 on Active Data Guard Standby Database [ID 1273808.1]*
    also
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8908307196113

  • Hi All, difference btwen data selection and person selection period in ldb

    Hi All, difference btwen data selection and person selection period in ldb -pnp
    If possible provide with an example .Its Urgent pls.

    Hi,
    Difference:--
    Data Selection Period
    The data selection period enables you to specify the period in which employee data records are read. Only records which overlap with the specified period by at least one day are selected. To define an interval, enter the start date in the left column and the end date in the right column
    Person Selection Period
    When you enter a person selection period, the system selects only those employees who are members of the enterprise on at least one day in the specified period. These are persons with a valid Organizational Assignment (0001) record. Entries in the standard selection options fields limit the personnel numbers that are selected. You can specify an interval by entering the start and end dates in the left and right columns respectively.
    Selection criteria in PNP are just used to determine the pernrs which meet them. For these pernrs then all wanted data is selected. This data then is not checked against this criterias.
    An Example:
    Pernr 4711 has benn assigned to costcenter 10 from 01.01.2004 until 31.12.2004. On 01.01.2005 costcenter changes to 20.
    If you now select all employees with costcenter 10 and list their costcenters, you will get both costcenters 10 and 20.
    Most reports which use PNP have to sets of date-ranges:
    - Person selection period that controls selection of pernr.
    - Other period that controls selection of data.
    If you set person selection period in above example to 01.01.2004 and other period to 01.01.2005 and select costcenter 10 you will in fact get employee 4711 with costcenter 20 shown.
    Same effect with org-unit or any other selection criteria.
    Regards
    Vasu

  • Data selection and Person selection

    Hi all,
    What is the difference between 'Data selection' and 'Person selection' in PNP screen.(PNP logical database)
    I searched so many . But couldn't find appropriate one. Still confusing.
    Can any one explain me with example?
    must use both at a time or any one selection is enough?
    Which situation use 'Data selection' and which situation use  'Person selection' ?
    Thanks in advance.

    thanks for all reply.
    I have one pernr 700098
    Hiring date : 01.01.2008 - 16.08.2008
    firing date : 17.08.2008 - 31.12.9999
    I developed a customized report using PNP LDB.
    If , I entered 01.01.2008 - 31.12.2008 in 'Data selection'
                  3 in employee status( active)
    or
    I entered 01.01.2008 - 31.12.2008 in 'Person selection'
                  3 in employee status( active)
    If , I entered 01.01.2008 - 31.12.2008 in 'Data selection'
                  0 in employee status( active)
    or
    I entered 01.01.2008 - 31.12.2008 in 'Person selection'
                  0 in employee status( active).
    In above all cases picking the same record. what is the use of PNP screen?
    after 'GET PERNR' pernr structure get the value of latest record from infotype P0000.ie firing record. Because it doesn't bother the status.
    For below case picking the proper one.
    If , I entered 01.01.2008 - 16.08.2008 in 'Data selection'
                  3 in employee status( active)
    or
    I entered 01.01.2008 - 16.08.2008 in 'Person selection'
                  3 in employee status( active)
    If , I entered 17.08.2008 - 31.12.2008in 'Data selection'
                  0 in employee status( active)
    or
    I entered 17.08.2008 - 31.12.2008 in 'Person selection'
                  0 in employee status( active).
    Plz any one clear me.
    Thanks.

  • Copy data models and reports from BW 3.1 to NW 2004s

    Hi experts,
    Our client has two BW servers: BW 3.1 and BI 7. BW 3.1 contains lots of data models and reports. And the BI 7 server is newly installed.
    Now we want to copy these data models and reports from BW 3.1 to the new BI 7 server. Are there any solutions for this?
    Thank you very much in advance.

    Hi Frank,
    Sounds like a cross version transport is needed.
    This is a solution we have used to do what you want to do:-
    Create and release a transport as per normal.
    Copy and transport the files from the source system (BW 3.1) e.g /usr/sap/trans/data & /usr/sap/trans/cofiles to the same folders on the target system.
    Basis help is needed here.
    From here onwards using stms_import should help you in the normal manner.
    Works a treat.
    Have transported the following all correctly appearing as 3.x data models in NW2004s.
    DSO objects.
    Cubes
    Transfer/Update rules
    Reports.
    Cheers,
    Pom

  • Error 10 when building an application in LV8 and Report generation toolkit 1.1.1

    I am trying to build an application using LV8.0.1 and Report generation toolkit 1.1.1 and i get this error.
    Error 10 occurred at ABAPI Dist Copy Non-VI Files.vi -> ABAPI Dist Build LLB Image.vi -> ABAPI Copy Files and Apply Settings.vi -> EBEP_Invoke_Build_Engine.vi -> EBUIP_Build_Invoke.vi -> EBUIP_Build_Invoke.vi.ProxyCaller
    Any ideas?
    Scientia est potentia!

    Did you attempt to add the _wordsub.llb and _excelsub.llb files to the application as support files?  I believe in LabVIEW 8.0 instead of adding the entire LLBs you should just add the _Word Dynamic VIs.vi and _Excel Dynamic VIs.vi as dynamic VIs.  I think I've seen a similar post on the discussion forums in the past that recommended this.
    If this suggestion doesn't help, please reply, and attach a simple VI and .lvproj file demonstrating the problem so I can investigate further.
    Good luck,
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • MCTS 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012

    I am searching for training kit for Exam 70-466 (Implementing Data Models and Reports with Microsoft SQL Server 2012) but I think is not published yet. I was expecting its release in Jan or Feb 2014. Would any one can tell me its release date or any place
    where I can find this book.
    Thanks
     

    Hi Azhar lqbal Gondal,
    According to your description, since the issue regards training and certification,
     I suggest you post the question in the Learning forums at
    http://social.technet.microsoft.com/Forums/en-US/home?category=learning. It is appropriate and more experts will assist you. If you have a specific technical question about Microsoft SQL Server,
     you can visit and post your question on  the SQL Server Forum.
    There is some detail about Exam 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012, you can review the following articles.
    Exam content can be found here:
    http://www.microsoft.com/learning/en-us/exam-70-466.aspx
    http://borntolearn.mslearn.net/certification/database/w/wiki/525.466-implementing-data-models-and-reports-with-microsoft-sql-server-2012.aspx#fbid=Mn-t6aRhs-H
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Date selection and search help component in jsp

    Hi all:
        In sap portal jsp development enviorment, is it possible to easily program the date selection and search help ( just look like search help in webdynpro ) ?

    Hello Jianhong,
    the easiest way to set a value help is using HTMLB component in your JSP.
    To do it, use next code:
    <hbj:inputField
               id="DateInputField"
               type="date"
               showHelp="TRUE"
               ... other attributes
    />
    Before using HTMLB components in your JSP, don't forget to add this line to your page:
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    regards.
    mz

  • File Dialog and Report Generation Toolkit

    Hi,
    I designed a VI for an electrometer calibration and it works quite well The only problem I have is the following:
    I used the Report Generation Toolkit to put the measurement data in an Excel file. When I run the VI I'd like a window to pop up to define the location and name of the Excel report file. If these two things are done LabVIEW should create the specified Excel file and run the rest of the code.
    So i tried this with the "File Dialog" Vi and all the needed low-level File I/O VIs and it worked.
    But when i connect the "File Dialog" VI with the "New Report" VI of the Report Generation Toolkit I get an error message.
    Is there any solution to get this file dialog pop up window with the Report Generation VIs?
    thx for any help...!
    Message Edited by Flea on 12-15-2005 03:58 AM

    Wow, thanks for your fast and very helpful reply devchander!
    I already tried this and it works fine
    thx!

  • Excel data write using report generation vi's

    I can read data from an excel sheet but can not figure a way to write data to specific cells using the LabView report generation vi's.

    In the "Excel Easy Table" VI you can specify where you want a table to be placed by wiring a value to the 'Start (0,0)' input. If you want more control than that you will have to open the "Excel_Insert_Table" vi and modify it. It is located in the _exclsub.llb library. I highly recommend making a backup copy of this llb before modifying any VI's in it.
    Chris_Mitchell
    Product Development Engineer
    Certified LabVIEW Architect

  • No Word or Excel selection in report generation toolkit

    I've uninstalled/repaired the Report Generation Toolkit that I received with 8.2 Toolkit disks. I still don't have the selection of Word or Excel with the New Report.vi.  All I get is Standard Report or HTML. Some magic I'm missing?
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

    Check out my reply (#4) in this thread, where I link to the KnowledgeBase entry that discusses having a toolkit installed to multiple LabVIEW versions.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • I have a question about General Data Selection in Report Painter

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version = 1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January,2006,Period:07 to November,2007,Period:05.
    I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    Month          Period     Year
    January          07     2006     
    February     08     2006
    March          09     2006
    April          10     2006     
    May          11     2006                   
    June          12     2006
    July          01     2007
    Augost          02     2007
    September     03     2007     
    October          04     2007
    November     05     2007
    December      06     2007
    Right now, we are in November , 2006 (month=11) but according to the fiscal calendar we are in November, 2007 (month=5).
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 5, 2007 (July to November, 2007) having the screen cited above so that report painter adds the 2 ranges.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 5, 2007 and then to add the 2 reports in excel to form a report.
    Hed like something in my screen like this……
    Fiscal Year = 2006
    From period = 7
    To Period = 12
    Fiscal Year = 2007
    From period = 1
    To Period = 5
    And then report painter will add the 2 ranges.
    Many Thanks if you know anything that can help me, please let me know.

  • I have a question to ask you about General Data Selection in Report Painter

    Please help me out. Thi is the question....here it goes.
    In a Report in ReportPainter, I have in the General Data Selection the following selected characteristics. They are:
    Ledger = 0
    Record Type = 0
    Version =  1
    Fiscal Year = Z-ANOACT
    Period = (1CPERIV, 1CPERIB)
    So that we have the next screen in the Report’s execution.
    Fiscal Year : 2006
    From Period : 1
    To Period     : 12
    Note:
    *Z-ANOACT = Variable so that with a user-exit calculates the actual year. Right now is 2006.
    *1CPERIV = This From-Period Variable is referenced to CCSS Table and PERBL Field Name. Its default value is 1.
    *1CPERIB = This To-Period Variable is referenced to CCSS Table and PERBL Field Name.
    Its default value is 12. Rigth now, we are in the fiscal month 5 (November).
    Id like to filtrate information from January (2006) to September (2007). I mean I work with the fiscal calendar because the information to get from the table is saved due to this calendar.
    The Fiscal Calendar is from July to June:
    July = 1
    August = 2
    September = 3
    June = 12
    How I can accommodate my variables or what I am doing wrong so that I can select information from periods 7 to 12, 2006 ( January to June, 2006) and information from periods 1 to 3, 2007 (July to September, 2007) having the screen cited above and having the information selected added.
    I cannot do it with the criteria selection cited above because I only have a year and a range of periods and my end-user doesnt want to run my report twice:
    One run with periods 7 to 12, 2006 and
    Another run with periods 1 to 3, 2007
    Hed like something in my screen like this……
    Fiscal Year = 2006                                                
    From period = 7
    To Period     = 12
    Fiscal Year = 2007                                                
    From period = 1
    To Period     = 3
    And to get the report added.
    Many Thanks if you know anything that can help me, please let me know.

    ABDUL: I understand the ABAP Code but the information is saved in the table according to the fiscal calendar.
    Fiscal Calendar Number of the MonthYear
    January             7                    2006
    February            8                    2006
    March               9                    2006     
    April               10                    2006
    May                 11                    2006     
    June                12                    2006
    July                1                    2007
    Augost              2                    2007
    September           3                    2007
    October             4                    2007
    November            5                    2007     
    December            6                    2007
    Normally, We are in November 2006 (month=11, year 2006).
    However, fiscally; We are November 2007 (month=5, year=2007).
    Important Notes:
    •     The information is saved according to the fiscal calendar in the table.
    •     My end-user wants to filtrate the information from January to November . I mean
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    I understand you told me about the ABAP code, for example my characteristics in the general data selection are:
    Actual Year  : 2006
    From   Period: 7
    To       Period: 5   (I would have an error here because From-Period Variable is greater than To-Period Variable)
    According the ABAP code you told me, this would be:
    Actual Year  : 2006
    From   Period: 1
    To       Period: 11
    If I run the report with these last parameters you told me, report painter only would add information from year 2006 and fiscal months 1 to 11 (July to May except June).  We don’t want this, that we want is :
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    How can I do this?? My email is [email protected] or [email protected]
    Right now, the end-user runs the report twice and adds the information in excel. One run for :
    Actual Year  : 2006
    From   Period:      7
    To       Period:     12
    And other run with:
    Actual Year   :  2007
    From    Period:      1
    To        Period:       5
    But the question is how you can do it with only a run and in this way:
    Actual Year  : 2006               Actual Year   :  2007
    From   Period:      7     AND           From    Period:      1
    To       Period:     12               To        Period:       5
    Thanks if someone can help me!!

  • General data selection in report painter

    hi,
    i have created one report painter but now i need to add one more selection field using general data selection,
    i tried doing this but i am getting short dump.
    kindly help me out.

    hi poonam,
              u can add the field by selecting one of the radio buttons. i.e.,
    keyfigure with characteristics.
    predefined key figure
    formula
    Then u select the field which u want to add and provide options as per ur requirement right..
    i dont know why r u getting dump...
    i have just tried and it is working fine for me..
    Rgds.,
    subash

  • Exe build with database conn and report generation vi's?

    I tried to build an .exe and learned the hard way that there are many things needed to be included for this to work.  As is now my program is not working.
    I wanted to get a list of necessary steps to make a successful build.  Please correct me if I am wrong or missing anything:
    1.  For the report generation toolkit I must include a few support files (_exclsub.llb and _wordsub.llb)
    2.  For the database connectivity:  I must follow NI's User guide by implementing the toolset build script function?  Is there an easier way?
    If there are any simpler ways to get this working please let me know.
    Dev machine=vista LV2010 office 2007
    Target machine=XP office 2007
    Solved!
    Go to Solution.

    Thanks for the response,
    Yes I have the runtime installed.  I also got the program working correctly by doing the following:
    LV 8.6 and greater-->
    1.  added two folders to the project from the project explorer menu.
          a.  Utilities folder
          b.  LVClass folder
    2.  during the .exe build I had to:
          a.  add LVClass folder to always include in source file settings
          b.  browse in the Utilities folder to NIReportLLB folder and add that to always include as mentioned above (note:  if you add the whole utilities folder you will get a broken vi error when building it, even if you fix the vi it still didn't work properly for me so I just included the folder I needed for word/excel)
    took about a day to troubleshoot and fix but the program is working as expected.  Hope this helps someone else in the future.
    Bernie

Maybe you are looking for

  • Connect ipad air to tv

    how can i connect ipad air to tv

  • How can i get the name of a symbol and pass to a variable?

    Hello! Is posible to get the name of a symbol and pass to a variable?? Thanks Sonia

  • Calling setString() method in JDBC

    Hello, I have a java class which I used for database activities. I have a method called setStrValues(int position, String strValue)  { callablestmt.setString(position, strValue); }Now I need to generalize this method so that I can use setStrValues me

  • Error extracting webauth file

    Hi there - I'm having a problem downloading a simple webauth file to my 2106C. I turned debug on and this is what it show: TFTP receive complete... extracting webauth files. Thu Feb 21 07:52:51 2008: Still waiting! Status = 2 Thu Feb 21 07:52:54 2008

  • SVG Zoom and Pan in the Desktop Browser

    Blackberry 8530 Platform 4.2.0.324 Carrier Verizon When I view a SVG image in the browser I can not zoom or pan easily. I click zoom from the menu I change the zoom value with the Trackpad in the little blue window I click the Trackpad Nothing happen