Business Objects and Microsoft Access??

Hallo!

I have following problem:

I want to export data from two different universes out of Business Objects to Microsoft Access.I tried to export my Data to a dbase file first, but it doesn’t work: BO always tells me that a field is ‘too long’ or something. Can you tell me how to export the Data into a DBase file perfectly or is there a direct way to bring Data from Business Objects into an Access-Table?
It also didn’t work with Excel, as there are too many data sets in my< universes!

Any help fur proceeding would be very appreciated!

Thank you
Migra


Migrator (BOB member since 2004-10-05)

The easiest way that I have found is to export to a text file and then use Access to import said text file.

Regards,
Mark

I tried also this possibility, but then the columns did not stay as they were in BO but got moved and therefore the first column contains now data fom the last column of the row above! All the ata sets are mixed up then…

How can I prevent this problem?

Thank you
Migra


Migrator (BOB member since 2004-10-05)

Is there any reason for using BusinessObjects as the intermediary?
Could you not extract the data directly from the sources?

Another option (that I have not explored) could be to save a report as html and then import the html document into Access.

Though I have not really tried doing that, VBS might be able to do that. From inside MS Access, you may be able to access BO FC using VBA. Then open the report with VBA and access the table programatically.

How to reference a column in VBA has a sample that does something similar.


Set repReport = ActiveReport
    For y = 1 To repReport.GeneralSectionStructure.Body.Count
        Set itmParts = repReport.GeneralSectionStructure.Body.Item(y)
        Select Case itmParts.Type
            Case boTable
                Set itmTable = repReport.GeneralSectionStructure.Body.Item(y)
                Set itmTableData = itmTable.Pivot
                Set itmData = itmTableData.Body(1)
                For z = 1 To UBound(itmData.Values(BoAllValues))
                     'You would be moving through all of the values here   
                Next z
                Set itmTableData = Nothing
                Set itmTable = Nothing
        End Select
    Next y

Other then that, I remember some posts in past that had VBA code for accessing cells in a BO report.

HTH


shamit (BOB member since 2004-07-01)

VBS => VBA, that was a typo :?


shamit (BOB member since 2004-07-01)

@Mark:

I tried your suggestion with the html file, unfortunately everytime i want to improt the (huge) html file in Access, access stops dpoing anything…

And yes, the BO step is neccessary :frowning:

@shamit:

so the procedure is I open Access, open BO and then…? do I have to start a new query, then start the VBA editor and then paste your code in it?

Sorry I am pretty new o VBA and BO…

Thaks for your help!


Migrator (BOB member since 2004-10-05)

Why can’t you link the tables you need into Access, then create a query to get the info you need?


cparsons :us: (BOB member since 2004-02-20)

it is not that easyto me, I have no clue how to create a query in Access which fetches Data from BO.
Or did you mean something else?


Migrator (BOB member since 2004-10-05)

There would be no need for BO. Link the tables that have the information you need and then create your query in Access to create your table.


cparsons :us: (BOB member since 2004-02-20)

It does sound like you need to point an access query at whatever database your BO universes are referencing and cut out the middle man. It maybe that in access you need to go via [get external data] and then [link tables]. I’m no Access expert I’m afraid but that’s the way we do it for our Sybase tables.


JohnH :uk: (BOB member since 2003-08-19)

Possible reason:
The name of one of the columns might be too long or contain special characters.

Now the real question is:
Why do you need the data in MS Access in the first place?
As already has been pointed out Business Objects Reporter is no ETL tool (Extract Transform Load tool such as Informatica or Data Integrator).


Andreas :de: (BOB member since 2002-06-20)

  1. As others pointed out, you can bypass BO and talk directly to DB. To do that

  i. You need to connect to DB from your Desktop. You will need to configure proper ODBC drivers and DSN for that. Your DBA should be able to help you out in that. 

 ii. Then in excel, create a new mdb file. Then goto File->Get ext data->Link tables. Follow the GUI for getting the tables in your DSN that points to this DB.

 iii. Now you should select ALL tables that you will need.

 iv. Design the report in BO and note the SQL that is generated by BO. Copy that SQL. @ results in prompts in Access as well. Though you will need to tweak the SQL sometimes.

  v. Run SQL in Access, you should see the result. 

  1. For VBA , Excel. I think you should have a look at VBA help in MS Office. And then BO docs on VBA related to BO Full Client.

  2. BO 6.x.x and Access (at least 2003 version, not sure about others) support XML. You can save a report as XML, and them import that XML in Access.


shamit (BOB member since 2004-07-01)

The middle with BO is needed because people who administer the original Database are afraid if we link the tables directly to Access we could change the original Database!

@Andreas We need the Data in Access because users should type in data sets easier via Access… the whole handling would be a lot of better with Access…


Migrator (BOB member since 2004-10-05)

In that case, I would suggest that you try XML export from BO and XML import in Access. Let me know if you face any prob.

Otherwise, do you have BO Full client installed on the System where you plan to perform BO->Access conversion?


shamit (BOB member since 2004-07-01)

That would be hard as I have no XML experiences… :cry:

Yes only ten pesons or something need that and they have full client!


Migrator (BOB member since 2004-10-05)

You will need to create this macro in Access to create an instance of BO.


Private Sub CommandButton1_Click()

    Set BOApp = New busobj.Application
    BOApp.LoginAs "user", "pwd", "FALSE"
    Set BOApp.Visible = True
    MsgBox "BO is available now"
    BOApp.Quit

End Sub

You might want to look at VBA help inside Access / MS office if you are not sure about how to create and use this code in Access.


shamit (BOB member since 2004-07-01)

Thanks for the code!

I just tried it, but access says following:
Fault at compilation:
user-defined type not defined!

(sorry for the bad translation!)

and following is marked:‘New busobj.Application’

what did I do wrong?


Migrator (BOB member since 2004-10-05)

You need to reference BO controles in the document before using this code.

While you are editing this code, you will be inside VBA editor, from there, go to Tools->References and select both BO options. You need FC intstalled before this will work.

And this code will just create BO and kill it. You will need to add code for reading data. That code has been mentioned earlier.


shamit (BOB member since 2004-07-01)

Ahh thanks, no it is way clearer :slight_smile:

And in this code, which things do I have to personalize?

I mean, do I have to write ‘Mydocname.rep’ there where stands ‘ActiveReport’ in this code?

And sorry for that dumb question, but…what do you mean by FC? :oops:


Migrator (BOB member since 2004-10-05)