Creating the GUI Buttons on Tu0131tle Bar of the Reports

Hi,
How can i create the buttons on title bar of my report as CL_GOS_MANAGER?
the CL_GOS_MANAGER interface is creating a button on title bar of a report to open gos manager popup window.
i want to do same as this method. i want to create my button.
Can somebody help me pls?
Thanks.

Thank you for your reply,
i've created a gui button on title bar with this code at INITIALIZATION;
DATA: lo_container TYPE REF TO cl_gui_gos_container,
        lo_dialogbox TYPE REF TO cl_gui_dialogbox_container,
        lo_toolbar TYPE REF TO cl_gui_toolbar.
  DATA: lo_menu TYPE REF TO cl_ctmenu.
  DATA lt_event TYPE cntl_simple_events.
  DATA ls_event TYPE cntl_simple_event.
  DATA lp_style TYPE i.
  DATA lp_icon TYPE iconname.
  DATA lp_butn_type TYPE tb_btype.
  DATA lp_url(30).
  DATA lp_quick TYPE iconquick.
  DATA lp_nobut TYPE c.
  GET PARAMETER ID 'SGOSNOBUT' FIELD lp_nobut.
  CHECK lp_nobut IS INITIAL.
  lp_style = cl_gui_control=>ws_visible.
*  IF CL_GOS_STARTER->go_container IS INITIAL.
    CREATE OBJECT lo_container
      EXPORTING
        width             = 58
        no_autodef_progid_dynnr = 'X'
      EXCEPTIONS
        OTHERS            = 5
    CHECK sy-subrc = 0.
    CREATE OBJECT lo_toolbar
      EXPORTING parent = lo_container.
    CALL FUNCTION 'ICON_CREATE'
      EXPORTING
        name       = 'ICON_PDF'
        add_stdinf = space
      IMPORTING
        RESULT     = lp_icon
      EXCEPTIONS
        OTHERS     = 0.
*    IF gp_frontend = 'ITS'.
** insert menubutton
*      lp_butn_type = 2.
*    ELSE.
** insert menubutton with default
*      lp_butn_type = 1.
*    ENDIF.
    lp_quick = text-001.
    CALL METHOD lo_toolbar->add_button
      EXPORTING
        fcode     = '%MY_BUTTON'
        icon      = lp_icon
        butn_type = lp_butn_type
        quickinfo = lp_quick.
* register events as system events.
    CLEAR lt_event.
    ls_event-eventid = cl_gui_toolbar=>m_id_function_selected.
    ls_event-appl_event = space.
    APPEND ls_event TO lt_event.
    ls_event-eventid = cl_gui_toolbar=>m_id_dropdown_clicked.
    ls_event-appl_event = space.
    APPEND ls_event TO lt_event.
    CALL METHOD lo_toolbar->set_registered_events
      EXPORTING
        events = lt_event.
*    SET HANDLER on_function_selected FOR lo_toolbar.
*  ELSE.
*    CALL METHOD show.
*  ENDIF.
*  SET HANDLER on_dropdown_clicked  FOR lo_toolbar.
  call method cl_gui_cfw=>flush.
but i didn't find where button clicked is falling.
Thanks again.

Similar Messages

  • Problems in creating the report to find top 5 long running Queries

    Hi,
    I am trying to create a report which should give the result for top 5 long runnings queries for the givin multiprovider or all the multi providers.
    I am creating the report on 0TCT_MC01 statistics cube. But it is displaying the result for all queries with all executed times. But i want only top 5. If i include the condition to put top 5, same query is getting if it takes long time.
    how can i achieve this.
    Regards,
    Vishnu

    one more - the 0TCT_MC01  also contains the virtual cube of ST03N type entries not yet loaded to yoru cube
    When was the last time you loaded stats into the base cubes?
    If it was some time ago - then load the cube thus the virtual cube will take less time to retrieve the data
    Or even better - on include infoprovider = 0TCT_C01 inside your query

  • How to inactive the push button on tool bar of alv report

    hi masters,
    i m working on the ALV interactive report, in this report i have to do 2 different operation on 2 screen.
    eg.- on first screen i have the push button for 'data' and on second screen i will have the push button for 'upload'.
    in this i don't want to give the 'upload' button on first screen and same i don't want to give the 'data' button on 2nd screen.
    i tried with using the 2 different gui status and 2 different PF-STATUS but its not working.
    anyone can tell me how i can deactivate the 'upload' button on first screen and how i can do same for 'get' buttton on 2nd screen.
    regards,
    vicky

    HI Vicky ,
                      if u want an interactive ALV report , there are lot of forums already having the solution for that , but let me give u the solution anyway.
    In the function module "REUSE_ALV_GRID_DISPLAY" , import parameters
         I_CALLBACK_PF_STATUS_SET          = 'FLIGHT'
         I_CALLBACK_USER_COMMAND           = 'BUTTON_CLICK'
    has to be supplied to this function module . The PF status is where u hav created the two buttons , that PF status has to be given here .If the user clicks on the button then it is handled by the form routines . Inside the sub-routine based on the button the user has selected u could perform the action.
    FORM FLIGHT    USING RT_EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'FLIGHT' EXCLUDING RT_EXTAB.
    ENDFORM.
    Here the "Flight" is the PF_status .
    FORM BUTTON_CLICK USING UCOMM type SY-UCOMM
                           SELFIELD type SLIS_SELFIELD.
      CASE UCOMM.
        WHEN 'BUTTON!' .
    write ur code for button 1.
      WHEN "BUTTON"
      *Write ur code for button2 .
    end case.
    endform.
    for any queries reply back.
    regards

  • How to create the report in given format???

    Hi there,
    My table view gets the report in this format.
    Unit -----Report-----Sum
    u1----------A---------s1
    u1----------B---------s2
    u2----------A---------s3
    u2----------B---------s4
    U3----------A---------s5
    U3----------B---------s6
    I need report in the format:
    Unit------Report A------Report B-----Percent
    U1----------s1----------------s2-------------(s1/s2)*100 %
    U2----------s3----------------s4-------------(s3/s4)*100 %
    U3----------s5----------------s6-------------(s5/s6)*100 %
    I need conditional formating in percentage column where column cell turns green for > 98% and red for <= 98%.
    I used pivot table and used new calculated item to create percent column but I'm not able to do conditional formating there and append % sign.
    Is there any other method where I can create logical column in RPD side.
    Please advice

    hi,
    Here is the way to achieve the conditional formatting in pivot table i didn't tried out this :-)...
    http://itnewscast.com/middleware/obiee-pivot-conditional-format-grand-total-part-2
    thanks,
    saichand

  • How to create the Report Server tnsnames entry

    Hi
    I'm trying to integrate Oracle Forms with Oracle Reports and the document says that I have to know the tnsnames.ora entry for the report server. In other versions it was created automatically but in 11g there is no configuration. How do I configure this?
    Regards,
    Néstor Boscán

    In 11g in the opmn.xml the environment variable TNS_ADMIN is set for the reports servers; in addition to the "normal" location under $ORACLE_HOME/network/admin you have to add a tnsnames.ora in $INSTANCE_HOME/config if memory serves (just take a look in the opmn.xml for the exact location)
    cheers

  • Creating the report in answers

    Hi
    I have one requirement that is I need to create one report. For this I am having two tables they are
    1. Area(DIM)
    2. Survey(Fact)
    using these two tables i need a report the report should be like
    in area table I am having
    Area
    PN
    CT
    SN
    FGN
    Survey
    P
    D
    PA
    S
    when I pull the columns from area and survey the report should be
    PN CT SN FGN P D PA S SCORE
    i 10 25 12 47 (P/S)-(D/S)
    a ii 23 12 20 55 (P/S)-(D/S)
    a total (((P/S)-(D/S))S)/S
    1
    b i 12 12 32 56 (P/S)-(D/S)
    ii 22 12 32 66 (P/S)-(D/S)
    b total (((P/S)-(D/S))S)/S
    A 1 total
    a i 11 23 12 46 (P/S)-(D/S)
    2 ii 10 25 12 47 (P/S)-(D/S)
    a total (((P/S)-(D/S))S)/S
    b i 12 12 32 56 (P/S)-(D/S)
    ii 22 12 32 66 (P/S)-(D/S)
    b total (((P/S)-(D/S))S)/S
    c i 12 12 32 56 (P/S)-(D/S)
    ii 22 12 32 66 (P/S)-(D/S)
    c total (((P/S)-(D/S))S)/S
    2 total
    Atotal
    To calculate 1 total = (a total * 25) + (b total * 70)
    2 total = (a total * 25) + (b total * 70) + (c total * 5)
    to find out A total = (a total * 25) + (b total * 70) + (c total * 5)
    Same way PN.B B total = (a total * 20) + (b total * 65) + (c total * 15)
    and PN.C C total = (a total * 30) + (b total * 65) + (c total * 5)
    in survey table S column value is nothing but P+D+PA
    is it possible to create in a single report

    Did you try it? What problem came up? Any? You don't expect us to build this report for you and give you the answer so you don't have to, do you?
    Don't ask homework questions. Try it. Then ask specific questions about a piece that you didn't get. Tell us what error message you got, how you debugged it, etc. so we don't give you suggestions that you already tried. But don't ask us to do it for you.

  • How to create new nav buttons in nav bar

    I am trying to design a new site in iWeb. I want to add a row of navigation buttons to go to 8 different pages. All I have in the first page is a button called "welcome" and I cannot add anymore. It won't even let me select rollover colors or anything in that area.
    I only have a single page so far. If I add new pages does it automatically create new buttons in the nav bar, and how can I name them?
    Mike

    I cannot add anymore
    Yes you can. *New Page* from the file menu. Or *Add page* at the bottom left of the window.
    If I add new pages does it automatically create new buttons in the nav bar,
    Yes. (They're actually not buttons but textlinks)
    and how can I name them?
    By typing the characters of the pagename in the Sidebar on the left.
    Tutorials : http://www.apple.com/findouthow/web/
    Also note the word HELP in the menu bar at the top of the screen.

  • Creating the report in BI Publisher with SQL SERVER 2008

    Dear Team,
    I want to create report on BI Publisher....i am able to create report with the help of oracle database ...but i dont'nt know how to create DATA MODEL in sql server 2008 ...
    plz tell me the wright way....
    Thanks,
    Him..

    Hi Jin Chen,
    Thank you for your response. I have disabled all the Symantec End Point Protection Service, but problem persists..
    Further, I have checked through the ULS Log in SharePoint, there is more error reported there:
    11/03/2010 15:19:48.44 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   Database                      
    6f8g Unexpected
    Unexpected query execution failure, error code 282. Additional error information from SQL Server is included below. "The 'proc_GetTpWebMetaDataAndListMetaData' procedure attempted to return a status of NULL, which is not allowed. A status of 0 will be
    returned instead." Query text (if available): "{?=call proc_GetTpWebMetaDataAndListMetaData(?,'F77D6A37-F8D2-492C-911C-923C8A135DEB',?,NULL,1,?,?,6187)}"
    11/03/2010 15:19:51.46 ReportingServicesService.exe (0x3510)  
    0x4064
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    11/03/2010 15:19:51.69 ReportingServicesService.exe (0x3510)  
    0x1EEC
    Windows SharePoint Services   General                      
    8e2s Medium  
    Unknown SPRequest error occurred. More information: 0x80020009
    Do you have any idea based on the error above?

  • Creating buttons on title bar using alv

    hi all good morning,
    can any one help me in making a button on title bar of ALV report. Till now i have used only one function of ALV i,e REUSE_ALV_GRID_DISPLAY. it is showing proper out put but i want to make some action using my own button on the final ALV result displayed like save change etc.

    Hi,
    How to add button to ALV toolbar using REUSE_ALV_LIST_DISPLAY?
    In the program which calls ALV using REUSE_ALV_LIST_DISPLAY,
    I have to add a new button.
    I saw the demo program BCALV_GRID_08, which is written using ABAP-Controls.
    In that example, the button is added using TOOLBAR event of cl_gui_alv_grid.
    Could you help me to implement the same logic using REUSE_ALV_LIST_DISPLAY parameters.
    you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
    Execute this transaction to get to next screen. select status using checkbox. click on GUI Status --> Copy.
    Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
    Then you can edit the new status to add or delete buttons. This will also bring in the standard SAP ALV functionality such as sorting/subtotaling etc...
    When you call 'REUSE_ALV_GRID_DISPLAY' make sure you pass it the new status name.
    an example of one of mine:
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = 'ZSDBOLST_REPORT'
    i_callback_pf_status_set = 'STANDARD' <----
    i_callback_user_command = 'USER_COMMAND'
    i_structure_name = 'I_BOLACT'
    i_grid_title = 'BOL Action Report'(031)
    is_layout = gs_layout
    it_fieldcat = gt_fieldcat[]
    i_save = 'A'
    is_variant = v_variant
    TABLES
    t_outtab = i_bolact
    EXCEPTIONS
    program_error = 1
    others = 2.
    I just tried the same procedure ,but my entire application toolbar disappeared and a lock icon appears next to the application toolbar in my copied pf-status.
    Could you advice what might have gone wrong ?
    As identified with the FM's help you can do the following.
    1). Using SE80 (I think) you can copy a GUI status from one program to another. It mentions which one in the FM's help.
    2). Create a form named like so:
    Code:
    Form Set_pf_status
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZSTANDARD'.
    ENDFORM. "Set_pf_status
    In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called '%DELETE'.
    3). Create the following report:
    Code:
    Form User_command
    Notes: Called by FM REUSE_ALV_GRID_DISPLAY
    Detects whether the icon/button for
    'Return Tag Deletion' has been pressed. If it has then
    detect whether any rows have been highlighted and then
    set the delete flag.
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    DATA: li_count TYPE I.
    IF r_ucomm EQ '%DELETE'.
    LOOP AT %g00 WHERE mark EQ 'X'.
    ADD 1 TO li_count.
    ENDLOOP.
    IF li_count GT 0.
    gc_delete_flag = 'X'.
    r_ucomm = '&F03'. "Back arraow
    ELSE.
    MESSAGE W000 WITH 'Please highlight the rows to be deleted!'.
    ENDIF.
    ENDIF.
    ENDFORM. "User_command
    As I've added an extra button to indicate which records should be deleted I need to identify a form to be called to process when this button is chosen.
    Then when you call the ALV function you to specify the following extra details:
    Code:
    call function 'REUSE_ALV_GRID_DISPLAY'
    exporting i_callback_program = gc_repid
    I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
    i_grid_title = lc_grid_title
    is_layout = lc_layout
    it_fieldcat = gt_fieldcat
    it_sort = sort
    i_save = l_save
    is_reprep_id = l_bbs_id
    is_variant = l_variant
    tables t_outtab = %g00
    exceptions program_error = 1
    others = 2.
    The parameters in capitals are the extra ones that need to be added.
    Regards,
    Satish

  • BI Publisher 10g. How to leave only one button Export, in the report?

    Good day!
    I'm working with Oracle BI Publisher 10g.
    Tell me please how to solve the following problem!
    I already have created the report, and when you view it, you can choose the format of its presentation, for example (pdf, html, ...).
    You can also see these buttons : View, Analyzer, Export, ...
    How can I make the report links panel of the report show only "Export" button?
    I also know that when you click the Edit button and selecting a report, you can remove the checkmark from the following properties:
    1)     Show controls
    2)     Disable access to the client from Analyzer for Excel.
    Then we will see in the first case that the entire selection panel has disappeared, while in the latter case, the off button Analyzer for Excel (in the presentation layer).
    And if you choose to layouts-> template, you can specify output formats, for example (pdf, html, ...).
    Thank you for your attention.
    Alex.
    Edited by: 816497 on 29.11.2010 7:59
    Edited by: 816497 on 29.11.2010 7:59

    I guess, you are looking for option in BIP enterprise itself, so
    making the user as different roles , you can suppress it.
    go thru this, to understand the roles and behaviour.
    http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12188/T421739T475591.htm#4455931
    if you going to view the report outside of this interface, e can see alternative solutions.

  • To visualize the report created using Discoverer Plus in Web

    Hi,
    I had created the report usingOracleBI Discoverer Plus Version 10.1.2.45.46c & able to visualize the report in OracleBI Discoverer Viewer Version 10.1.2.45.46c.
    URL fo accessing the report is as:
    http://machinename1:7777/discoverer/viewer
    If i try to connect to from another machine (machine2) as
    http://machinename1:7777/discoverer/viewer
    i'm unable to connect & i get the error page can not be displayed.
    Is it necessary to have the URL only with domain name as
    http://machinename.domainname:portno/discoverer/viewer
    I had already installed OWB, Oracle BI etc. If i had to create a domain then i have install all these & need to work from scratch.
    Is there any way to access the report across the internet or web.
    Plz do provide a solution for this issue.
    Thx in Advance

    Hi,
    Check the Discoverer OBEs at:
    http://www.oracle.com/technology/obe/obe_bi/discoverer/discoverer_1012/index.html
    The lesson titled 'Creating a Business Intelligence Dashboard Using Discoverer Portlets' should answer your question.

  • Assigning a T-code to the report created under transaction code (SQVI)

    Dear Gurus,
    I have joined three tables in t-code SQVI and created the report after assigning the required fields in list or selected views.
    Now I want to assign this report to a particular T-code, so that any user can access the same report without creating it in SQVI again.
    Kindly let me know how can I assign the T-code to this Report.
    Thanks,
    Abhishek

    Follow the following steps:
    1. Make a transaction with parameters transaction from se93 .
    2. Put START_REPORT in the transaction
    3. Check the skip intial screen checkbox
    4. in the table control in the end of screen put these values
    D_SREPOVARI-REPORTTYPE = AQ
    D_SREPOVARI-REPORT = <USER GROUP in WHICH THE QUERY IS CREATED> G
    (G stands for GLOBAL AREA:)(Entered after a space)(G should come after 9 chanracters(8 char for user group,one space and then G)
    D_SREPOVARI-EXTDREPORT = <QUERY NAME>
    Thanks & regards
    J Prakash

  • How to print the report directly without previewing (report viewer) using c# windows application

    Hi,
    Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
    can fill this problem.
    To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
    csCashInvoiceCal csCashCal; --Crystal report name .rpt
    dsCsReceipt dsCs; --created dataset
    DataTable u;
    DataRow s;
    private System.Drawing.Printing.PrintDocument printDocument1;
    private System.Windows.Forms.PrintDialog printDialog1;
    ParameterValues paramValue;
    ParameterDiscreteValue discreteValue;
    ParameterFieldDefinition fieldDefinition;
    private void btnPrint_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt2();
    print2();
    csCashCal.Close();
    this.Cursor = Cursors.Default;
    private void loadReceipt2()
    dsCs = new dsCsReceipt(); --created dataset
    u = dsCs.Tables.Add("DtCsReceipt");
    u.Columns.Add("Qty", Type.GetType("System.String"));
    u.Columns.Add("UOM", Type.GetType("System.String"));
    u.Columns.Add("Description", Type.GetType("System.String"));
    u.Columns.Add("UnitPrice", Type.GetType("System.String"));
    u.Columns.Add("Discount", Type.GetType("System.String"));
    u.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
    s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    s["Discount"] = "";
    s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    u.Rows.Add(s);
    catch (Exception) { }
    csCashCal = new csCashInvoiceCal();
    csCashCal.SetDataSource(dsCs.Tables[1]);
    //csCashCal.Refresh();
    loadParameter2();
    private void loadParameter2()
    ParameterFieldDefinitions paramFieldDefinitions;
    paramValue = new ParameterValues();
    discreteValue = new ParameterDiscreteValue();
    paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
    discreteValue.Value = date;
    fieldDefinition = paramFieldDefinitions["Date"];
    commonParam();
    discreteValue.Value = txtcsno.Text;
    fieldDefinition = paramFieldDefinitions["InvoiceNo"];
    commonParam();
    discreteValue.Value = txtNameTo.Text;
    fieldDefinition = paramFieldDefinitions["CustomerName"];
    commonParam();
    discreteValue.Value = txtAdd.Text;
    fieldDefinition = paramFieldDefinitions["CustomerAddress"];
    commonParam();
    ------other parameters----
    private void commonParam()
    paramValue.Clear();
    paramValue.Add(discreteValue);
    fieldDefinition.ApplyCurrentValues(paramValue);
    private void print2()
    using (printDocument1 = new System.Drawing.Printing.PrintDocument())
    using (this.printDialog1 = new PrintDialog())
    //this.printDialog1.UseEXDialog = true;
    this.printDialog1.Document = this.printDocument1;
    DialogResult dr = this.printDialog1.ShowDialog();
    if (dr == DialogResult.OK)
    int nCopy = this.printDocument1.PrinterSettings.Copies;
    int sPage = this.printDocument1.PrinterSettings.FromPage;
    int ePage = this.printDocument1.PrinterSettings.ToPage;
    string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
    try
    csCashCal.PrintOptions.PrinterName = PrinterName;
    csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
    printcount++;
    //saveCountPrint();
    catch (Exception err)
    MessageBox.Show(err.ToString());
    This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
    But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
    with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
    So here is my code so far which I don't know what's next:
    private void button2_Click(object sender, EventArgs e)
    this.Cursor = Cursors.WaitCursor;
    loadReceipt3();
    //print3();
    this.Cursor = Cursors.Default;
    ReportParameter[] parameter = new ReportParameter[11];
    private void loadParameter3()
    parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
    parameter[1] = new ReportParameter("Date", date);
    parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
    parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
    parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
    parameter[5] = new ReportParameter("Agent", agent);
    parameter[6] = new ReportParameter("Discount", "Discount: ");
    parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
    parameter[8] = new ReportParameter("TotalSales", rdtotal);
    parameter[9] = new ReportParameter("Tax", rdtax);
    parameter[10] = new ReportParameter("TotalAmount", rdnet);
    private void loadReceipt3()
    DataSet dsrs = new DataSet();
    DataTable dtrs = new DataTable();
    DataRow drs;
    dtrs.Columns.Add("Qty", Type.GetType("System.String"));
    dtrs.Columns.Add("UOM", Type.GetType("System.String"));
    dtrs.Columns.Add("Description", Type.GetType("System.String"));
    dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
    dtrs.Columns.Add("Discount", Type.GetType("System.String"));
    dtrs.Columns.Add("Amount", Type.GetType("System.String"));
    try
    for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
    drs = dtrs.NewRow();
    drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
    drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
    drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
    drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
    if (discount != 0)
    drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
    else
    drs["Discount"] = "";
    drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
    dtrs.Rows.Add(s);
    catch (Exception) { }
    int addtlRow = 7;
    if (addtlRow > (count - 1))
    addtlRow = addtlRow - (count - 1);
    for (int i = 0; i < addtlRow; i++)
    dtrs.Rows.Add();
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    localreport.Refresh();
    //what's next....
    So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
    Anyway I'm using VS 2010 with sql server 2012 express.
    You're help will be greatly appreciated.
    Thank you,
    Hardz

    After some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
    with my code above and helps solve my question.
    Here's the continuation of the code above:
    private void loadReceipt3()
    loadParameter3();
    LocalReport localreport = new LocalReport();
    localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
    localreport.SetParameters(parameter);
    localreport.DataSources.Clear();
    localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
    Export(localreport);
    print4();
    private IList<Stream> m_streams;
    private int m_currentPageIndex;
    private void Export(LocalReport report)
    string deviceInfo =
    @"<DeviceInfo>
    <OutputFormat>EMF</OutputFormat>
    <PageWidth>8.5in</PageWidth>
    <PageHeight>11in</PageHeight>
    <MarginTop>0.25in</MarginTop>
    <MarginLeft>0.25in</MarginLeft>
    <MarginRight>0.25in</MarginRight>
    <MarginBottom>0.25in</MarginBottom>
    </DeviceInfo>";
    Warning[] warnings;
    m_streams = new List<Stream>();
    report.Render("Image", deviceInfo, CreateStream,
    out warnings);
    foreach (Stream stream in m_streams)
    stream.Position = 0;
    private void print4()
    if (m_streams == null || m_streams.Count == 0)
    throw new Exception("Error: no stream to print.");
    PrintDocument printDoc = new PrintDocument();
    PrintDialog printDlg = new PrintDialog();
    printDlg.Document = printDoc;
    DialogResult dr = printDlg.ShowDialog();
    if (dr == DialogResult.OK)
    if (!printDoc.PrinterSettings.IsValid)
    throw new Exception("Error: cannot find the default printer.");
    else
    printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
    m_currentPageIndex = 0;
    printDoc.Print();
    Dispose();
    public void Dispose()
    if (m_streams != null)
    foreach (Stream stream in m_streams)
    stream.Close();
    m_streams = null;
    private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
    Stream stream = new FileStream(name + "." + fileNameExtension,
    FileMode.Create);
    m_streams.Add(stream);
    return stream;
    private void PrintPage(object sender, PrintPageEventArgs ev)
    Metafile pageImage = new
    Metafile(m_streams[m_currentPageIndex]);
    // Adjust rectangular area with printer margins.
    Rectangle adjustedRect = new Rectangle(
    ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
    ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
    ev.PageBounds.Width,
    ev.PageBounds.Height);
    // Draw a white background for the report
    ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
    // Draw the report content
    ev.Graphics.DrawImage(pageImage, adjustedRect);
    // Prepare for the next page. Make sure we haven't hit the end.
    m_currentPageIndex++;
    ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
    Thank you very much for this wonderful tutorial. :)

  • Help me about the Report Category !!

    In a ABAP report program's "Attributes", we can set the Logical database (eg. in HR, it's PNP) , and then, we can select the "HR report category", for the report screen category setting.  After we set the Master Data(infotypes), we will get the report with several pushbuttons in the first line, like “Further Selections” "Sort order" ...
    So, my question is if I want to add some items into the "Sort Order" selection screen, how to do that ?
    Thanks a lot
    Tom

    Hi Tom,
    You can create the report category from SE38-> Attributes and then give the LDB name as PNP.
    Now click on the HR report category button and proceed creating the new report category by clicking the create button.
    The report category name should start with 0* or 7*.
    Hope this helps you,
    Regards,
    Subbu.

  • Where should I move the report for my form to be able to see it

    I need to run a report from my 9i form. I'm suing run report object.
    I'm repeatedly running into the error FRM-41219 cannot find report - Invalid ID
    where should i copy my rep file under 9ids for my form to be able to see it.
    Thanks

    Frank
    REP-0503 "You did not specify the name of a rep
    I created the report object in my object navigator, selected the report filename and in my when button pressed I have the following
    DECLARE
         REPID REPORT_OBJECT;
         V_REP VARCHAR2(100);
         REP_STATUS VARCHAR2(20);
    BEGIN
         REPID := FIND_REPORT_OBJECT('REPORT125');
    V_REP := RUN_REPORT_OBJECT(REPID);
    END;
    This gives me the following error
    REP-0503 "You did not specify the name of a report".
    Now I change the execution mode to runtime, and communication mode to asynchronous and I dont get the error, but the report does not come up either.
    Please Help

Maybe you are looking for

  • Adobe Reader XI 11.0.06 and IE10 enhanced protected mode. Downloaded PDF documents do not open

    I have Reader XI 11.0.06 installed with IE10. If I enable Enhanced Protected Mode via group policy, the plugin loads documents inside the browser window. However, if the site forces the browser to download the document, EPM blocks the Reader plugin.

  • Problem with Thread.sleep()

    hi all, I am trying Thread.sleep() method to introduce a delay. In the program i ask the user to specify the value to be entered in Thread.sleep() (to indicate the amount of delay desired by the user). but strangely, if a low value is entered, i get

  • Labwiew 8 won't start without internet connection

    I have Labview 8.0 installed on a NI PXI-1050 chasis with Windows XP and Service Pack 2 installed.  The problem is that Labview will not load up (it locks up at finishing initialization) if I do not have the chasis connected to the internet via ether

  • ISE - CSCty54756 - how do I reindex a ISE database? Need help please!

    Anybody know how to implement the workaround below? Indexes got corrupted in MNT DB CSCty54756 Symptom: The ISE Dashboard will not show up any activities and when checked in the mnt-collector.out log file from support bundle you will see indexing err

  • Can't backup: Photo Library size too big

    Hey gang, I've got about 20 pictures on my phone but it keeps saying that I've got 1.4GB of data in iPhoto when I go in to manage my backups. How can I get it to display the accurate photo information. My phone will NOT Back up and I don't have anywh