User selected records report

Hi experts,
I have a requiement to fulfill, I have a tabular (multiple record) form where i want the user to pick the selected record using check box (property database item--> No) and only selected records will be shown on the report upon pressing a button,
e.g employees table where user want to print only the selected employees data on the report.
All ideas will be very much appreciated, (as i am trying to make a for loop for this on the button)
(unfortunately i am using form 6i).
Regards

Hi guys,
sorry for adding new comment i know problem has been resolved. But i want to add something.
Problem can also bhi solved by creating the LEXICAL PARAMETER. So, in this solution no need to create table.
for example.
DECLARE
vParameter VARCHAR2(1024);
BEGIN
GO_BLOCK('BLOCK_NAME');
FIRST_RECORD;
vParameter:='AND report_field_name IN (';
LOOP
IF CHECK_BOX = 'Y' THEN
-- If the value in number
vParameter:=vParameter||:BLOCK.RECORD_ID||','; -- or any id you are using in form
-- If the value in characters
vParameter:=vParameter||'''||:BLOCK.RECORD_ID||'''','; -- or any id you are using in form
END IF;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
END LOOP;
vParameter:=SUBSTR(vParameter,1,LENGTH(vParameter)-1)||')';
END;
and pass this variable as parameter in report and use in report's query like this
report_query
&parameter_name
Regards,
Edited by: Ammad10786 on Mar 9, 2010 12:41 PM

Similar Messages

  • User selected records

    Hi,
    I tried to select the user selected records from a table by useing check box, I am always getting the 2nd next record from the selected record. Suppose if user selcts record no 1 then I am getting record no 3 in to my itab. Can some one please guide me where I am doing wrong.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'CMEMO'.
          DATA: lv_cnt TYPE i.
          DESCRIBE TABLE gt_zprice LINES  lv_cnt.
         lv_cnt = lv_cnt + 2.
          DO lv_cnt TIMES.
            READ LINE sy-index FIELD VALUE chbox.
            IF sy-index > 0 AND chbox = 'X'.
              READ TABLE gt_zprice INTO gs_zprice INDEX sy-index.
              IF sy-subrc EQ 0.
                APPEND gs_zprice TO gt2_zprice.
                CLEAR gs_zprice.
              ENDIF.
            ENDIF.
          ENDDO.
    Thanks,
    Neelu.

    would be issue at HIDE Command.
    Use HIDE Command after write statement within loop.
    see the example code :
    *& Report  ZHK_INTER1
    REPORT  ZHK_INTER1 no standard page heading
                        message-id ztest_msg
                        line-size 130
                        line-count 50(4).
    tables: kna1.
    data: begin of i_kna1 occurs 0,
          kunnr like kna1-kunnr,
          name1 like kna1-name1,
          land1 like kna1-land1,
          end of i_kna1.
    select-options s_kunnr for kna1-kunnr.
    start-of-selection.
    select kunnr
           name1
           land1
           from kna1 into table i_kna1
           where kunnr in s_kunnr.
    loop at i_kna1.
    write:/ i_kna1-kunnr,25 i_kna1-name1.
    hide: i_kna1-name1."kunnr.
    endloop.
    end-of-selection.
    at line-selection.
    break sy-uname.
    case sy-ucomm.
    when 'PICK'.
    write:/ i_kna1-name1, 'list # =',sy-lsind.
    endcase.
    Thanks
    Seshu

  • Access Web Database - Select record and make report with all associated records

    Hey everyone,
    Right now I'm in the middle of trying to convert an Access client database to be web compatible and I'm running into some problems. For this question, I think I may need to explain a little bit about the database:
    The database I'm making is designed to store information about music rights for different songs. The users can input information about writers, producers, organizations, properties, businesses - which is stored all in different related tables. Then, when a
    user inputs a song, they choose which writers, produces, organizations, etc. are affiliated with that song. 
    What I'm trying to do is make a report where you can choose a writer from the list of all the writers and then produce a report with all of the songs by that writer. 
    I was able to do this in the Access client by making a report that, when opened would trigger (using the On Open event) a form to open where you would choose a writer from a combo box and then click a button. When the button was clicked, it would use the value
    in the combo box in a query, which would find all of the songs by that writer and then open up the report which would have the writer and all of their songs on it. 
    Because web reports don't have many event options and web queries are very limited, I have not found a way to make this report.
    Any help at all would be greatly appreciated!

    Hi,
    I found that you've cross post the quesion on our Answer forum, are you satisfiled the reply from there?
    http://answers.microsoft.com/en-us/office/forum/office_2010-access/web-database-select-record-and-make-report-with/04ce4e25-a964-4146-9a34-f9cb26bb0496
    Regards,
    George Zhao
    TechNet Community Support

  • How to make a report to display next 18 months of data with when user select a particular month from the filter in power pivot tabular model.

    Hi,
    i have a  dimension table  with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20)  and a fact  table with columns (month_key ,measure_types, Amount)
    My requirement is to create a power pivot report  in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
    , month name should be populated with months till june 2013 only .
    i tried creating calculated column"END DATE " in the fact table with  dax expression to calculate the 18th monh from the current month  as below 
    month_key END DATE
    201201       201306    
    201202       201307      
    and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using  excel 2010
    ..hence could not do any calculation on the report side also. please suggest .
    Thanks in advance                                                                                                                                               

    Do you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
    The first is trivial as driezl has suggested.
    The second will require a second calendar table.
    I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
    Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
    For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
    Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
    18 Month Measure:=
    CALCULATE( [Measure]
    , FILTER( DimDate
    , DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
    && DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
    Please review this example along with the workbook I have linked above.

  • How to develop this report/Query that selects records with MAX Value

    Hi,
    My requirment is to develop a report to show all emp whose policy is going to expire ith in the user selected date intreval...
    Emp_ID--App_Date-Policy_Strt_Date--Policy_End_Date--App_Status
    101.01.2007---BlankBlank--
    NEW   (New application for a Medical Insurance policy raised for employee)
    101.01.2007---01.02.200730.05.2007--
    COMPLETE (policy issued for emp with strt & end dates)
    115.05.2007---01.02.200730.05.2007--
    RENEWAL  (a application is raised to renew emp policy)
    115.05.2007---01.06.200731.12.2007--
    COMPLETE  (policy issued for emp with strt & end dates)
    115.12.2007---01.06.200731.12.2007--
    RENEWAL  (a application is raised to renew emp policy)
    115.12.2007---01.01.200831.05.2008--
    COMPLETE  (policy issued for emp with strt & end dates)
    115.05.2008---01.01.200831.05.2008--
    RENEWAL  (a application is raised to renew emp policy)
    115.05.2008---01.06.200831.05.2009--
    COMPLETE  (a application is raised to renew emp policy)
    So EMP 1 got valid policy untill 31.05.2009.
    When a user executes a query to show all employees whose policy expiry date intreval (01.05.2008 to 31.05.2008)
    it shouldn't show Emp 1 as he got  valid policy untill 31.05.2009  but currently it is showing Emp 1....
    How can i achieve this
    Thanks

    Hi
    Thanks for the update
    I created variable on Plc End end
    If user enter show all emps whose policy is expiring in MAY (01.05.2008---31.05.2008) it is displaying EMp 1 as well but emp 1 has a policy which expires in 2009
    Thanks

  • How to update records in a table based on user selection..

    Hi all,
    This time the above doubt is totally based on the logic of coding which I tried a lot but didn't get any solution. so atlast I come to sdn site.
    please help..
    The requirement is like that I have a table with 6 fields (1 primary key and other are nonkeys). If the user inputs some values in the fields on the screen, then a row will be added in the table. Upto this i have done well. but when the user want to change some value  in the existing row of the table my program unable to do so. Because I couldn't get any logic to do that as there are 5 nonkey fields, so if any one field is modified then the respective row should be selected first based on the user selection and then it should be updated.
    At this point I could not get any idea as it may take a lots of if conditions (I guess) to reach to that particular row.
    Please help..
    thanks ,
    sekhar

    Hi Sekhar,
    I am afraid, the whole design of your program is wrong, let me explain
    Let us say you have two rows(5 non key fields) that the user wants to update and the data in these five non key fields are identical and in your program you are getting a number(which is the key) using a number range object. So you will have two entries in the table for the same data.
    And on the update page when the user enters the non key fields, how will the program know(or for that matter any one of us) which record to pick, if you have two identical books and if asked for a book wouldn't you ask which one among these two do you want?
    Possible Solution: Identify a possible key maintaining the integrity of the data, that is a combination of the non key fields which will help you identify a unique row and make these fields as key fields in the table.
    A more costly solution(if you do not want to change the non key field keys to key fields) would be to, adding a check(using select statement) to see if the non key fields combination already exists in the Z table before inserting a record into the table.
    If yes, throw a message to the user and just update the values in the table, else insert the record.
    Another solution would be to, use the non key fields to generate a key(using some logic) and using this instead of the number range object.
    regards,
    Chen

  • Parameter weirdness: Report not using user selected parameter value

    I am writing my first report and cannot for the life of me figure out how to deal with this issue.
    When I call a report and pass the parameters in, it appears that the user cannot then change the parameter values and run the report again even though the parameters are displayed. When user hits run report, the values revert to what was passed in by original
    call.
    Scenario
    Report B has Parameter Period : Month, Quarter, Year displayed in a drop down list.
    Report A calls Report B and passes it the parameter: Quarter.
    Report B loads. User now changes parameter to Year via the drop down parameter list and hits Run Report.
    Instead of loading the report with user selected value (Year), it reverts back to the parameter it was called with, Quarter.
    I have tried changing the refresh option on the parameter to always, but no joy.
    The only way that seems to work is to put textboxes on the report to change the parameter.
    How can I stop this behaviour, and use the users new selection. 
    This should be really straight forward, and its driving me nuts that its not allowing the user to change the parameters
    Any help would be much appreciated.
    Thanks Jon

    Hi Jon,
    Did you use SSRS 2012? Based on my test, the issue is occurred in SSRS 2012 Business Intelligence Development Studio (BIDS). When we deploy the report to report server, it will disappear.
    In this situation, we can add another duplicate parameter to work around this issue. Please add two parameters in the report, and then hide one of the parameter. We can pass the parameter value to the hide parameter. If we want to select other values, we
    can change the visible parameter values.
    Alternatively, I recommend you that submit this suggestion at
    https://connect.microsoft.com/SQLServer/. If the suggestion mentioned by customers for many times, the product team may consider to add the feature in the next SQL Server version. Your feedback is valuable for us to improve our products and increase the
    level of service provided.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Execute a DML process after user selects a column link in a report

    APEX 3.2 / RDBMS 10GR2
    I have written a non IRR report that displays several rows of data. The first column of each row has a defined column link uniquely identifying the row. When a user selects one of the rows via the column link, a "hi fidelity" report is generated for that displayed row using a (RTF) report layout created in the shared components section of APEX.
    This is working well but I also need to execute a DML process after the user selects a row but prior to displaying the hi fidelity report using the selected column link value of the displayed row.
    As a URL is used to call hi fidelity report via the column link, it does not appear that the process section of the APEX page component is available to execute the DML prior to displaying the report.
    Any ideas on where to define the DML process?
    Thanks in advance.
    Barry D

    Hi Barry,
    Not knowing exactly what your URL calls, this is what I do for PL/SQL procedures that create HTML output:
    Create a blank page with no template and call the procedure inside a PL/SQL region with no template.
    Alternatively, if your URL opens in a new window:
    run some javascript for your link and pass a unique request through.
    The javascript needs to find the ApEx form, update it's target attribute and submit it with the unique request, then set the target back to blank.
    The form will submit into a new window.
    You can then have a process and branch allocated to this unique request to do what you want.
    Hope this helps
    Regards
    Michael

  • Display report directly to PDF instead of when user selects that

    Hi, We have a requirement where we want to export report directly to PDF when user runs a report. We have a Java application where parameter screen for Crystal reports is displayed. When user clicks process button after selecting parameter then a new ReportViewer window appears. Right now after running report user selects export option to export to PDF. They want to open report directly to PDF instead of opening report / selecting export option.
    We have Crystal reports saved in BOXI R2 SP3 on IIS.  We are using .NET SDK to do this.
    Thanks,

    You can export and stream directly using RAS.
    [Sample|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b09a5013-9e3b-2c10-41af-85f08f91c895;jsessionid=(J2EE3417700)ID0302179550DB10992550101163851332End]

  • Display Different reports depending on values in a User Selectable Dropdown

    Hello,
    I want to create a report which has a Drop-down and depending on the value selected from the drop-down, i want to display different reports.
    Say, a drop-down has 3 values, v1, v2 and v3. Now, if a user selects v1, he/she should see report r1. If v2 is selected, the user should see report r2. if v3 is selected from the drop-down, then report r3 should be visible. All the 3 reports have different structures (even different no. of columns). Also, v1, v2 and v3 are 3 different values belonging to a same picklist type field.
    Do you think this is possible? If yes, How ?
    Any sort of help will be highly appreciated. Thanks in advance.
    Regards,
    Ramil.

    The only way i could see this working would be to create a picklist on a object and then create your three reports placing them within the same folder and name the report something under 30 charters then place the same name in the picklist value and create a weblink to the report which at selection of the report will run either report.

  • Select in (select ...) (select main report based on child records)

    I have a Crystal Report XI rel 2 report but I need to narrow the search of the main report based on records in the child table.<br /><br />I have 3-tables and one report w/ a subreport.<br />The tables are locations, crashes, and vehicles.  The main report has the tables locations and crashes and the subreport has vehicles (one crash has 1 to n vehicles)<br /><br />How do I select records in the main report based on the child (see below SQL stmt.)<br />SELECT locations.county, locations.state, crashes.numpeople, crashes.time FROM locations,crashes<br />WHERE crashes.cid IN (SELECT cid FROM vehicles WHERE vehicles.vehicletype = &#39;Trailer&#39;);<br />

    Hi,
    Â You can use common shared variables to share data between a sub report and the main report.
    What Kathryn has suggested is correct but you must make sure that the sub report is run first and then the main report is executed.
    Â Hope this helps
    Â Cheers
    Â Sam

  • How to create and process Iinteractive report with selected records in 4.1

    Hi,
    I want to have an Interactive report that will have in front of each row a checkbox that can be selected for batch processing. Is there a way to do so?
    If there is please include some method to process those records i.e. for each selected record create a new record on a different table and update the record itself as processed.
    thanks
    Edited by: yannisr on Jul 13, 2012 5:58 AM

    For this you need to consult APEX documentation for two things
    Create a checkboxes using APEX_ITEM API
    How to reference those checkboxes within an On Submit Process

  • Crystal Report Formula to select Record  of only MAX Value

    hi Everyone,
    i need a simple crystal report formula to select one department whose recived quantity Maximum.
    for example:
    itemcode    dscription      departmen   op       recived       issue        
      1                   a                ab               2              2              2         
      1                   a                bb              0             2              2          
      1                   a                bc               4             8              2         
      1                   a                cc              2              2              2
    i group by item  the item show just once but i want a formula to show one department who's recived quantity is maximum.i suppress the detail section.and just show the group footer/
    itemcode    dscription      departmen   op       recived       issue        
      1                   a                  bc                 8             14             8 

    Thanks
    Re: Crystal Report Formula to select Record  of only MAX Value
    Abhilash Kumar

  • Allow users to create reports based on their own selection of fields

    Is there a way to allow users to create reports based on their own selection of fields?
    And if there is a way, then how?
    In access we retrieve all demographic info on one screen and on another screen user can be able to choose specific fields from a list box to import data into file.

    Hi,
    This can be handled in various ways - but the principles are the same.
    You need to apply conditional displays to all of the columns that your user can select and base the display of a column on the value of a field on the page.
    You can have a series of Yes/No options - one for each field and base the display on the corresponding field being Yes. Or you can use checkboxes.
    However, if you wish to use a multiselect list (which is probably easier as you can dynamically generate the list of field names), you will need to have hidden fields that will store either Y/N or 1/0 (I use ones/zeros) and have the conditional displays watch these fields instead. Populating these hidden fields is a bit more tricky than just having fields on the page that the user can control, but is doable:
    1 - Create one hidden field for each field in the report that you want to show/hide. Put these fields in the same region as the select list in a region above the report
    2 - Set conditional display values to "Value of Item in Expression 1 = Expression 2" and use the appropriate hidden field for Expression 1 and in Expression 2 enter in 1
    3 - Create a page process that runs on submit, and create PL/SQL code something like:
    DECLARE
    lFields HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    vField VARCHAR2(1000);
    BEGIN
    :P31_SHOW_EMPNO := 0;
    :P31_SHOW_ENAME := 0;
    :P31_SHOW_JOB := 0;
    :P31_SHOW_MGR := 0;
    :P31_SHOW_HIREDATE := 0;
    :P31_SHOW_SAL := 0;
    :P31_SHOW_COMM := 0;
    :P31_SHOW_DEPTNO := 0;
    lFields := HTMLDB_UTIL.STRING_TO_TABLE(:P31_FIELDS);
    FOR i IN lFields.FIRST..lFields.LAST LOOP
    vField := lFields(i);
    IF vField = 'EMPNO' THEN
    :P31_SHOW_EMPNO := 1;
    ELSIF vField = 'ENAME' THEN
    :P31_SHOW_ENAME := 1;
    ELSIF vField = 'JOB' THEN
    :P31_SHOW_JOB := 1;
    ELSIF vField = 'MGR' THEN
    :P31_SHOW_MGR := 1;
    ELSIF vField = 'HIREDATE' THEN
    :P31_SHOW_HIREDATE := 1;
    ELSIF vField = 'SAL' THEN
    :P31_SHOW_SAL := 1;
    ELSIF vField = 'COMM' THEN
    :P31_SHOW_COMM := 1;
    ELSIF vField = 'DEPTNO' THEN
    :P31_SHOW_DEPTNO := 1;
    END IF;
    END LOOP;
    END;
    4 - Finally, add a button that generates the report - this just needs to submit the page and branch back to the same page
    I've used the standard EMP table for this example and my hidden fields are P31_SHOW_fieldname. The code resets the hidden fields to 0, checks if the user has selected the field from the list (P31_FIELDS) and changes the hidden fields value to 1 for all those selected. When the page is re-rendered, the report hides the columns where the hidden field value is 0 and displays those where it is 1. The export option will then only export those fields that are displayed.
    You can see an example of this here:
    http://htmldb.oracle.com/pls/otn/f?p=33642:31
    Regards
    Andy

  • Restrict users to selected BAM reports

    Hi All,
    I need to know how I can restrict selected users to selected BAM reports?
    Thanks for your help in advance.

    With your administator user in BAM you have to go to the folder where you have your Reports (in the Active Studio), click on your folder, and add your user and the permissions that you want your user to have

Maybe you are looking for