Crystal Report generating data from incorrect data source

In dealing with a recent post about an upgrade to Crystal XI R2 mixing badly with an old VS 2003 project ( Update to CR XI R2 and service pack 4 issues with VS 2003 ), I've been attempting a few things to get past the issues with missing parameters and so on.  I found that I actually was using a parameter in the report I was trying to run, so I assigned the proper value to said parameter, ran the report, and lo and behold all was well.  The data was coming back correctly, no errors, everything seemed fine.<br><br>
Then I checked the results against the production environment of this application, hosted on a remote server, and was disappointed to find that the reports were now coming back blank.  After some deeper investigation, it turned out that the data it was retrieving was coming from my development server and not the production server like it had in the past.  As far as I can tell, it is completely ignoring the dataset that I'm assigning to the report object (which is filling with the correct data) and just running the query built into the report, which is connected via ODBC to my development server database.  I have no idea what this is going to do when the application is run from the production environment itself, as in, my customers running the application from their desktops, and I have no way of testing this.<br><br>
I will fully admit that the report may be poorly designed, because then and surely enough now I'm no crystal expert, but as I said in my previous thread, this all worked fine until I upgraded to XI R2 for another project.  Essentially what I want is for the report to accept the dataset and display ONLY that data, and not run a query against the ODBC connection.  Is there some way to force this behavior?  Here's a sample of my code, if it helps:<br><br>
ReportDocument myReport = new ReportDocument();<br>
DataSet myData = new DataSet();<br>
MySqlDataAdapter myAdapter;<br>
myAdapter = new MySqlDataAdapter();<br><br>
file_name = ApplicationMain.file_path"
Files
Invoice_"invoice_number+".pdf";<br>
MySqlCommand cmd = generate_command(invoice_number, false);<br><br>
myAdapter.SelectCommand = cmd;<br>
myAdapter.Fill(myData,"X");<br><br>
myReport.Load(ApplicationMain.file_path+"
Files
Invoice.rpt");<br><br>
myReport.SetParameterValue("requ_id",this.ID);<br>
myReport.SetDataSource(myData);<br>
myReport.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, file_name);<br><br>
It's all relatively simple, create a dataset, load the report, assign the dataset to the report, export to a PDF. 
I've tried to reassign the report's connection to the currently connected database (code snippet below) but every time I end up getting a logon failed error message, even when I know for sure the login data is correct, and even when I'm just connecting to my local development server.<br><br>
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();<br>
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();<br>
ConnectionInfo crConnectionInfo = new ConnectionInfo();<br>
crConnectionInfo.ServerName = ApplicationMain.com_host;<br>
crConnectionInfo.DatabaseName = ApplicationMain.com_database;<br>
crConnectionInfo.UserID = ApplicationMain.com_username;<br>
crConnectionInfo.Password = ApplicationMain.com_password;<br><br>
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in myReport.Database.Tables)<br>
{<br>
     crtableLogoninfo = CrTable.LogOnInfo;<br>
     crtableLogoninfo.ConnectionInfo = crConnectionInfo;<br>
     CrTable.ApplyLogOnInfo(crtableLogoninfo);<br>
}<br><br>
I ran that after loading the report, but received a failed login error every time.  Any suggestions on how to proceed with this?  I'm at a loss because up until now I've never had a problem like this with a crystal report, they always just took the datasets I gave them without ever running anything else.

After attempting quite a few of the proposed solutions, nothing seemed to be working.  Due to the limited usage and number of reports in my application, I decided to try recreating them from scratch (there are only 3 and 2 are nearly identical) using only the crystal 9 integrated designer in VS2003.  My initial testing has been successful, even using the same base query that the failing reports were using.
Dropping everything and recreating all of ones reports is not the greatest solution, but at worst it's a few hours of tweaking, as opposed to days of frustration messing around trying to get the "corrupted" reports to work again.  Thank you again for your assistance.

Similar Messages

  • Regarding combining data from 2 data sources

    Hi All,
    I want to represent data from two data sources. Orders (2lis_11_vaitm) and billing (2lis_13_vditm). We have in common Plant, Material customer etc. I want the query to be executed based on Billing date. However, when I am executing the report based on billing date, I am getting all orders as 0 and I am only getting Inv qty and value. The reason for this is there is no billing date in 2lis_11_vaitm. So, how to merge these two data sources??
    Regards
    Jay

    Hi,
    Refer the lnik:
    http://help.sap.com/saphelp_nw04/helpdata/en/67/7e4b3eaf72561ee10000000a114084/frameset.htm
    With rgds,
    Anil Kumar Sharma .P

  • Collecting data from two R3 source systems

    Dear All,
    Scenario:
    We are in the process of implementing SAP BI 7.0 in our organisation.
    We have a single BI server (7.01) collecting data from two source
    systems from two different divisions within the group.
    The first system is of Company 1 where we have IS u2013 MILL (ECC 6.0).
    BI has been implemented and running successfully in this unit. Now we
    have started implementing BI in the second unit u2018Company 2u2019
    where the industry specific solution IS u2013 AFS (ECC 6.0) is the source
    system.
    We are activating BI Standard Content for AFS. When we try to upload
    master data, we face a problem.
    The master data (0Division, 0Mat_Grp_3, etc.) is already loaded with
    IS Mill data (data from the first source system). Now when the data is
    loaded from IS AFS (second source system), wherever, the same key
    exists in the info object, we notice that the existing data is
    overwritten by the freshly loaded data, thus causing loss of existing
    data.
    A typical example is as follows:
    BW Data u2013 Source system 1 u2013 (Before upload of data from source system
    2):
    0Division
    99         EN          Stock Transfer Out
    AFS Data (Source system 2) -
    0Division 
    99         EN             STO
    BW Data u2013 Source system 1 u2013 (After upload of data from source system 2):
    After uploading the master data from AFS, the Values areu2026
    0Division
    99        EN            STO
    The original data is lost.
    Similar problem is noticed with other master data as well.
    Please suggest the right methodology for upload of master data when
    data to BW is sourced from two systems. How to retain the data in the
    same Infoobject but at the same time maintain distinction between the
    data from the two systems.
    We donu2019t find any specific mention of such scenarios in the standard
    documentation.
    Will such a problem recur when we upload transactional data?
    Regards,
    Aslam Khan

    Hi Aslam,
                Please use some compounding attribute for your master data object like Sourcesystem ID.  While loading the master data from different source systems... you should have two different flows to fill the same master data object.  In each flow you can specify the Source system ID as constant value ... eg SS1 (Source system 1)  and SS2(Source system 2) in each of the data flows.   This should solve your issue without overwriting your master data
    Thanks
    Kishore

  • How to compute data from different data sources?

    All we are doing with data is from one single datasoure, which could be from oracle or sql server or a excel table, the issue is how could we combine these data from different data source with SQL?
    Example: i need some data from Sale Table in Excel and some data from Custumer Table in oracle, how could SQL complete this mission? Solutions are welcomed and appreciated.
    消息编辑者为:Datathinker from Raqsoft

    Hi,
    This forum is dedicated to SQL Developer Data Modeler product.
    You might search for solution in general questions forum.

  • Differentiating Master Data from two different source systems

    Friends,
    i have used standard InfoObjects that provide master data for two InfoCubes which take data from two different source systems. Now the some of the master data is identical in both the source systems (example: 10 stands for "Industrial" in one whereas 10 stands for "Agricultural" in the other). What do i do so that the system(BW) differentiates the two.
    Thanks in advance for all the help.
    Mike

    I tried to include the 0SOURSYSTEM in the compounding of this InfoObject (for master data) but it gives me a list of other objects that use this InfoObject as a reference characteristic and also says that this InfoObject is used in a ODS and data needs to be emptied in the ODS before activating  this InfoObject.  Please let me know if there is any way out of it.
    Thanks
    Mike

  • Delete All Indexed data in Oracle SES or Indexed data from a particular source (UCM,Discussion Forum)

    Hi ,
    We have configured Oracle SES 11.2.2.2 with Oracle Webcenter 11.1.1.8 and UCM .
    We are able to index all the data successfully.
    For some test cases , i would like to delete all the indexed data / indexed data from a particular source from backend and run crawlers again .
    Is there any SP exists that can do the job or any table that i can purge to achieve this?
    Thanks
    Regards,
    Sid

    Hi Sripathy,
    From webcenter we had crawled everything including the user profiles which are appearing in the search results , we would like to get rid of that indexed data and would re index data with params as /rsscrawl?excludedServiceIds=oracle.webcenter.peopleconnections.profile,oracle.webcenter.community,oracle.webcenter.list
    We will try your suggestion for recrawling the whole source for our first requirement .
    -Sid

  • Powerpivot Error on Refresh -- "We couldn't get data from the data model..."

    I'm using Excel 2013 and Windows 8.1.  I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
    "We couldn't get data from the Data Model.  Here's the error message we got:
    The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
    Any idea how I can fix this problem?  I haven't changed anything related to that particular attribute.  All the data is contained in separate sheets in the workbook, so there are no external sources of data.
    Thanks.
    Jean

    Thanks for all the suggestions.
    I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query.  (I've had this same error before, and I believe I applied the hotfix at that time.)
    I think this problem started after I updated a number of the date filters in the pivot tables.  I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
    the pivot tables.
    As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine.  I can also refresh this pivot table.
    Then I tried adding a pivot table which went against several tables in the data model (including the table in question).  The pivot table seemed to return that data properly.  However, when I tried to refresh it, I got the same error message ("we
    couldn't get data from the data model..."). 
    Dany also suggested running the queries one at a time to see which one is in error.  Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
    mentioned in the error message).  Pivot Tables without that particular table seem to refresh OK.  Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
    Any other suggestions?  I'd be happy to send a copy of the spreadsheet.
    Thanks for all the help.
    Jean

  • 2 month old date from current date in red color only

    Hi all,
    How can I Highlight 2 month old date from current date in red color only at report level with using Alertr.
    Example:-
    Date
    3/27/2014
    4/3/2014
    3/5/2014
    4/1/2014
    3/31/2014
    5/24/2013
    2/10/2014
    4/11/2014
    12/11/2013
    9/25/2013
    1/30/2014
    2/18/2014
    2/24/2014
    1/6/2014
    3/3/2014
    Thanks
    Sam

    Hello Sam,
    are you using Universe for your report..if Yes..pls try below option.
    Create two objects in the universe
    Object1 syntax: current date() (Note:this object you can create at webi level)
    Object 2 syntax:addmonths(sysdate;-2)
    Now create a alert in webi report by using below conditions
    Day is less than Object1
    and
    Day is greater than Object2
    Please try this and let me know if any issues.
    Regards,
    Naveen D

  • Error while fetching data from Logical data base

    Hi All,
    I need to fetch the data from Logical data base DDF.First when i am trying demo code
    REPORT demo_program_read_tables_2.
    NODES: spfli, sflight.
    GET spfli FIELDS carrid connid cityfrom cityto.
      WRITE: / spfli-carrid,
               spfli-connid,
               spfli-cityfrom,
               spfli-cityto.
    GET sflight FIELDS fldate.
      WRITE: / sflight-fldate.
    I am getting error like ""spfli is not a node of the logical data base __S""
    Should i declare anything esle?
    Madhu

    REPORT demo_logical_database.
    DATA wa_spfli TYPE spfli.
    SELECT-OPTIONS s_carr FOR wa_spfli-carrid.
    DATA: callback TYPE TABLE OF ldbcb,
          callback_wa LIKE LINE OF callback.
    DATA: seltab TYPE TABLE OF rsparams,
          seltab_wa LIKE LINE OF seltab.
    callback_wa-ldbnode     = 'SPFLI'.
    callback_wa-get         = 'X'.
    callback_wa-get_late    = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SPFLI'.
    APPEND callback_wa TO callback.
    CLEAR callback_wa.
    callback_wa-ldbnode     = 'SFLIGHT'.
    callback_wa-get         = 'X'.
    callback_wa-cb_prog     = sy-repid.
    callback_wa-cb_form     = 'CALLBACK_SFLIGHT'.
    APPEND callback_wa TO callback.
    seltab_wa-kind = 'S'.
    seltab_wa-selname = 'CARRID'.
    LOOP AT s_carr.
      MOVE-CORRESPONDING s_carr TO seltab_wa.
      APPEND seltab_wa TO seltab.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
         EXPORTING
              ldbname                     = 'F1S'
              variant                     = ' '
         TABLES
              callback                    = callback
              selections                  = seltab
         EXCEPTIONS
              ldb_not_reentrant           = 1
              ldb_incorrect               = 2
              ldb_already_running         = 3
              ldb_error                   = 4
              ldb_selections_error        = 5
              ldb_selections_not_accepted = 6
              variant_not_existent        = 7
              variant_obsolete            = 8
              variant_error               = 9
              free_selections_error       = 10
              callback_no_event           = 11
              callback_node_duplicate     = 12
              OTHERS                      = 13.
    IF sy-subrc <> 0.
      WRITE: 'Exception with SY-SUBRC', sy-subrc.
    ENDIF.
    FORM callback_spfli USING name  TYPE ldbn-ldbnode
                              wa    TYPE spfli
                              evt   TYPE c
                              check TYPE c.
      CASE evt.
        WHEN 'G'.
          WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
          ULINE.
        WHEN 'L'.
          ULINE.
      ENDCASE.
    ENDFORM.
    FORM callback_sflight USING name  TYPE ldbn-ldbnode
                                wa    TYPE sflight
                                evt   TYPE c
                                check TYPE c.
      WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.
    ENDFORM.

  • Translation date from document date instead of posting date

    I have a requirement to set automatically Translation date from Document Date instead of Posting Date as usual in SAP.
    My company code hasnu2019t got neither 2nd local currency nor 3rd local currency.
    As usual, when posting transactions in foreign currency, translation date is derived from posting date.
    I would like to know if is possible to set that translation date would be derived from document date. As I said before, because of the company code only has one currency defined, is not possible to change it in OB22.
    Thanks a lot

    Has anyone ever tried to change the Translation date on the FI documents generated by F.05 (FBB1). I am having this requirement at one of the clients I am working on. I need to substitute the document date in the translation date field. I tried using substitution through GGB1 (OBBH) and also I tried using the BADI - FI_TRANS_DATE_DER, but none of the two options work.
    Is there any other option to do it or did anyone had any success in doing this????
    Appreciate all the responses.
    thanks in advance.

  • How to view "date from" and "date to"

    Hi,
    I have loaded EMP data. In the mapping "date from" and "date to" are visible. But these fields are not seen when I display the EMP data.Can someone please tell me how to view these fields?
    Thanks,
    Williams

    I got your question . Please find my understandings .
    In the transformation Please check weather routine or formula is written which is stopping the dats
    to be updated to the target .
    I mean data is there in the source but if its not updating to target it seems some rules have been set up in the transformation . Please check .
    Assign marks is the best way to appreciate help

  • Featching Data From The Data Base Using DI API in Matrix

    Hi
       All of u i am shahid i faced a problem when i retrive
       the selected data from the data base using matrix plz.
       Healp me!.
       Thanks
       Mohd Shahid.
       SAP Techinical Consultent
      Option Strict Off
    Option Explicit On
    Friend Class UseMatrix
        '// This parameter will use us to manipulate the
        '// SAP Business One Application
        Private WithEvents SBO_Application As SAPbouiCOM.Application
        Private oForm As SAPbouiCOM.Form
        Private oMatrix As SAPbouiCOM.Matrix
        Private oColumns As SAPbouiCOM.Columns
        Private oColumn As SAPbouiCOM.Column
        '// declareing a DB data source for all the Data binded columns
        Private oDBDataSource As SAPbouiCOM.DBDataSource
        '// declaring a User data source for the "Remarks" Column
        Private oUserDataSource As SAPbouiCOM.UserDataSource
        ' This Function is called automatically when an instance
        ' of the class is created.
        ' Indise this function
        Public Sub New()
            MyBase.New()
            '// set SBO_Application with an initialized application object
            SetApplication()
            '// Create the UI
            CreateFormWithMatrix()
            '// Add Data Sources to the Form
            AddDataSourceToForm()
            '// Bind the Form's items with the desired data source
            BindDataToForm()
            '// Load date to matrix
            GetDataFromDataSource()
            '// Make the form visible
            oForm.Visible = True
        End Sub
        Private Sub SetApplication()
            '// Use an SboGuiApi object to establish connection
            '// with the SAP Business One application and return an
            '// initialized appliction object
            Dim SboGuiApi As SAPbouiCOM.SboGuiApi
            Dim sConnectionString As String
            SboGuiApi = New SAPbouiCOM.SboGuiApi
            '// by following the steps specified above, the following
            '// statment should be suficient for either development or run mode
            sConnectionString = Environment.GetCommandLineArgs.GetValue(1)
            '// connect to a running SBO Application
            Try ' If there's no active application the connection will fail
                SboGuiApi.Connect(sConnectionString)
            Catch ' Connection failed
                System.Windows.Forms.MessageBox.Show("No SAP Business One Application was found")
                End
            End Try
            '// get an initialized application object
            SBO_Application = SboGuiApi.GetApplication()
            'SBO_Application.MessageBox("Hello World")
        End Sub
        Private Sub SBO_Application_AppEvent(ByVal EventType As SAPbouiCOM.BoAppEventTypes) Handles SBO_Application.AppEvent
            Select Case EventType
                Case SAPbouiCOM.BoAppEventTypes.aet_ShutDown
                    SBO_Application.MessageBox("A Shut Down Event has been caught" & _
                        Environment.NewLine() & "Terminating 'Add Menu Item' Add On...")
                    '// terminating the Add On
                    System.Windows.Forms.Application.Exit()
            End Select
        End Sub
        Private Sub CreateFormWithMatrix()
            '// Don't Forget:
            '// it is much more efficient to load a form from xml.
            '// use code only to create your form.
            '// once you have created it save it as XML.
            '// see "WorkingWithXML" sample project
            '// we will use the following object to add items to our form
            Dim oItem As SAPbouiCOM.Item
            '// we will use the following objects to set
            '// the specific values of every item
            '// we add.
            '// this is the best way to do so
            Dim oButton As SAPbouiCOM.Button
            Dim oStaticText As SAPbouiCOM.StaticText
            Dim oEditText As SAPbouiCOM.EditText
            '// The following object is needed to create our form
            Dim creationPackage
            creationPackage = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            creationPackage.UniqueID = "UidFrmMatrix14"
            creationPackage.FormType = "TypeFrmMatrix14"
            '// Add our form to the SBO application
            oForm = SBO_Application.Forms.AddEx(creationPackage)
            '// Set the form properties
            oForm.Title = "Quality Check"
            oForm.Left = 336
            oForm.ClientWidth = 620
            oForm.Top = 44
            oForm.ClientHeight = 200
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = 170
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Ok"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = 170
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
            '// Adding a Text Edit item
            'oItem = oForm.Items.Add("txtPhone", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            ' oItem.Left = 265
            'oItem.Width = 163
            'oItem.Top = 172
            'oItem.Height = 14
            '// Adding an Add Phone prefix column button
            ' oItem = oForm.Items.Add("BtnPhone", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            ' oItem.Left = 160
            ' oItem.Width = 100
            ' oItem.Top = 170
            ' oItem.Height = 19
            ' oButton = oItem.Specific
            ' oButton.Caption = "Add Phone prefix"
            '// Add the matrix to the form
            AddMatrixToForm()
        End Sub
        Private Sub AddMatrixToForm()
            '// we will use the following object to add items to our form
            Dim oItem As SAPbouiCOM.Item
            '// we will use the following object to set a linked button
            Dim oLink As SAPbouiCOM.LinkedButton
            '// Adding a Matrix item
            oItem = oForm.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
            oItem.Left = 5
            oItem.Width = 500
            oItem.Top = 5
            oItem.Height = 150
            oMatrix = oItem.Specific
            oColumns = oMatrix.Columns
            '// Adding Culomn items to the matrix
            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "#"
            oColumn.Width = 30
            oColumn.Editable = False
            '// Add a column for Item Code
            oColumn = oColumns.Add("DSItemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
            oColumn.TitleObject.Caption = "Item Code"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Link the column to the ITEM master data system form
            oLink = oColumn.ExtendedObject
            oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
            oColumn = oColumns.Add("DSItemName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Item Name"
            oColumn.Width = 80
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            oColumn = oColumns.Add("DSWhs", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Ware House"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            oColumn = oColumns.Add("DSQuantity", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Quantity"
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for Combo Box
            oColumn = oColumns.Add("DSQuality", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX)
            oColumn.TitleObject.Caption = "Quality"
            ' oColumn.ValidValues.Add("OK", "")
            'oColumn.ValidValues.Add("NOT OK", "")
            oColumn.Width = 40
            oColumn.Editable = True
            oColumn = oColumns.Add("DSReport", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oColumn.TitleObject.Caption = "Remarks"
            ' oColumn.ValidValues.Add("OK", "")
            'oColumn.ValidValues.Add("NOT OK", "")
            oColumn.Width = 40
            oColumn.Editable = True
            '// Add a column for BP Card Phone
            ' oColumn = oColumns.Add("DSPhoneInt", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            ' oColumn.TitleObject.Caption = "Int. Phone"
            'oColumn.Width = 40
            'oColumn.Editable = True
        End Sub
        Public Sub AddDataSourceToForm()
            '// every item must be binded to a Data Source
            '// prior of binding the data we must add Data sources to the form
            '// Add user data sources to the "International Phone" column in the matrix
            ' oUserDataSource = oForm.DataSources.UserDataSources.Add("IntPhone", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 20)
            '// Add DB data sources for the DB bound columns in the matrix
            oDBDataSource = oForm.DataSources.DBDataSources.Add("OITW")
        End Sub
        Public Sub BindDataToForm()
            '// getting the matrix column by the UID
            oColumn = oColumns.Item("DSItemCode")
            'oColumn.DataBind.SetBound(True, "", "DSCardCode")
            oColumn.DataBind.SetBound(True, "OITW", "ItemCode")
            'oColumn = oColumns.Item("DSItemName")
            'oColumn.DataBind.SetBound(True, "OITW", "ItemName")
            oColumn = oColumns.Item("DSWhs")
            oColumn.DataBind.SetBound(True, "OITW", "WhsCode")
            oColumn = oColumns.Item("DSQuantity")
            oColumn.DataBind.SetBound(True, "OITW", "U_QCStock")
            '// to Data Bind an item with a user Data source
            '// the table name value should be an empty string
            ' oColumn = oColumns.Item("DSPhoneInt")
            'oColumn.DataBind.SetBound(True, "", "IntPhone")
        End Sub
        Public Sub GetDataFromDataSource()
            '// Ready Matrix to populate data
            oMatrix.Clear()
            oMatrix.AutoResizeColumns()
            '// Querying the DB Data source
            oDBDataSource.Query()
            '// setting the user data source data
            'oUserDataSource.Value = "Phone with prefix"
            oMatrix.LoadFromDataSource()
        End Sub
        Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            If (pVal.FormUid = "UidFrmMatrix") Then
                If ((pVal.itemUID = "BtnPhone") And _
                    (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) And _
                    (pVal.Before_Action = False)) Then
                    AddPrefix()
                End If
                If ((pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD) And _
                    (pVal.Before_Action = False)) Then
                    SBO_Application.MessageBox("Form Unloaded, Addon will terminate")
                    System.Windows.Forms.Application.Exit()
                End If
            End If
        End Sub
        Public Sub AddPrefix()
            Dim i As Integer
            Dim PhoneExtCol As SAPbouiCOM.Column
            Dim newPhone As String
            Dim oItem As SAPbouiCOM.Item
            Dim oEditTxt As SAPbouiCOM.EditText
            '// Get the prefix edit text item
            oItem = oForm.Items.Item("txtPhone")
            oEditTxt = oItem.Specific
            '// Flush user input into datasources
            oMatrix.FlushToDataSource()
            '// Get the DBdatasource we base the matrix on
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OCRD")
            '// Iterate all the records and add a prefix to the phone
            For i = 0 To oDBDataSource.Size - 1
                newPhone = oDBDataSource.GetValue("phone1", i)
                newPhone = newPhone.Trim(" ")
                oDBDataSource.SetValue("phone1", i, oEditTxt.String + newPhone)
            Next
            '// Load data back to
            oMatrix.LoadFromDataSource()
        End Sub
    End Class

    Hi Shahid,
    I am not sure what your question is. The code you pasted looks like the MatrixAndDataSources example that comes with the SDK. What are you trying to do?
    Thanks,
    Adele

  • Data from two data providers

    In a report i want to fetch teh data from 2 data Providers. which condetion wil satisfy to link the 2 data providers.
    ex: Q1 have columns A,B,C
    Q2 has a X,Y,Z columns.
    requirement is like i want to get all the columns from those 2 tables in report level..like A,B,C,X,Y,Z in a single report.
    Regards
    Sunil

    Hi,
    As venu and karthik said you must a have a atleast one common dimension (same date type for both dimensions) two link two data providers to get a single report.
    For ur requirement check whether any one dimesions exists in both data providers. If so then goto Data Manager -> expand 1st DP ->select the common dimension -> right pane (at bottom) you will get link to button -> click and select the common dimension in 2nd DP.
    Repeat the above process for all the common dimensions and then drag and drop all the required objects to create a single report.
    Cheers,
    Suresh ALuri.

  • Exception thrown while trying to acquire data from Profile Data Control

    I created a new WebCenter Portal Application (with JDeveloper 11.1.1.4).
    Then tried to acquire data from Profile Data Control through getProfile().WCUserProfile to create a read-only form with profile data.
    After deploying (to internal WLS) and running I got a popup saying:
    *Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.1.2.v20101104-r8475): org.eclipse.persistence.exceptions.ValidationException Exception*
    Description: Cannot acquire data source [java:comp/env/jdbc/WebCenterDS].
    Internal Exception: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'jdbc.webcenter.CustomPortalDS' didn't find subcontext 'webcenter'. Resolved 'jdbc'; remaining name 'webcenter/CustomPortalDS']; Link Remaining Name: 'jdbc/webcenter/CustomPortalDS'
    The question is how can I create such a data source to acquire data needed?

    Hi, there's two ways, in both ways you need use the user <PRE>_WEBCENTER that RCU create.
    1 - You can go in your console and create de dataSource, as Yannick sad. You can use your production database if you want get some more real tests, or you can get some develope database and run RCU. You can copy the configuration from you WLS server that are installed webcenter to make this easy.
    2 - In develop mode you can just create a database connection name "WebCenter", just like sad here:
    http://download.oracle.com/docs/cd/E17904_01/webcenter.1111/e10148/jpsdg_people.htm#BABICGCH

  • I need to download data from Oracle data base into a Excel spread sheet

    I need to download data from Oracle data base into a Excel spread sheet.
    Any input will be appreciated.

    Goes something like this:
    1) create an ODBC connection (on NT/WIN: ODBC DATA SOURCES in the control panel, create a USER DSN.
    2) in EXCEL-menu: DATA->GET EXTERNAL DATA->CREATE NEW QUERY. In the wizzard you will see the DSN created in the previous step. Select that source.
    3) follow the wizzard.
    Hope this does any good...
    Regards,

Maybe you are looking for

  • HP Laserjet 1010 & Wireless printing via Airport USB - Not working in SL

    Hi There, After just upgrading to Snow Leopard on my MacBook I tried printing wirelessly to my HP Printer, but no luck! Printer: HP Laserjet 1010 Connected via: Airport with USB cable Snow Leopard recognises the printer and is fine to print when the

  • IMac G5 Screen Burn In??

    Hey Folks... I've had my iMac G5 20" for about 5 months now. It's used A LOT for my business; it's easily on 5-6 hours a day or more. Lately, I've noticed that whenever the screen is a solid color (blue or white), after-images/shadows of the desktop

  • Starting my photo organisation, currently in folders, iPhoto keep structure

    Currently all my pics are organised roughly in folders on my external disk. I want to start using iPhoto to organise,tag like I have done with my iTunes library. Currently there like this... 2008 > Sons party Xmas summer holiday etc etc I know I want

  • Infomation Broadcasting

    All, When I scheduled the information Boradcasting with option Distribution type as "send as e-mail" and output format as "Independent HTML file" I am getting e-mail with four files 1.0QUERY_TEMPLATE_BROADCASTING_00001.htm.HTM 2.BWReports_ie5.css.CSS

  • Gathering System Info

    I'm looking for a way to gather system information through java. I'd like to list memory stats, running process and the like. Through the Runtime class I can only gather memory info available to the JVM. Is there another class I haven't found yet, or