[Solved] Macro Error when Running Report

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Macro Error when Running Report

Postby TJM05 » Thu Jun 16, 2011 7:01 pm

I use the following macro to open reports from a main form:
Code: Select all   Expand viewCollapse view
Sub ContractorWONOTDONE
  Dim pProp(1) As New com.sun.star.beans.PropertyValue
   sURL = ConvertToURL("C:\Users\Public\databases\mydb\mydb.file.odb")
   oDoc = starDesktop.loadComponentFromURL(sURL,"_blank",0,Array())
   oReps = oDoc.getReportDocuments()
   oAConnection = oDoc.DataSource.getConnection("","")
   'set properties
   pProp(0).Name = "ActiveConnection"
   pProp(0).Value = oAConnection
   pProp(1).Name = "OpenMode"
   pProp(1).Value = "open"  'OR: openDesign
   'load the form: TargetFrameName and SearchFlags aren't used
   oReport = oReps.loadComponentFromURL("Work Orders- Contractor-Not Done","_blank",0,pProp())
End Sub


Everything works fine with this except: when I edit a report in the db, save my changes, and then try to run the report I get the following error:

Basic runtime error
An exception occurred
Type: com.sun.star.task.ErrorCodeIOException
Message:.

And from that point on things go loopy. I cannot open any report, even within the db, forms will not open in the db. When i close out of OOo and open it up again, everything will work except the report macros. The only way to get those to work again is to restart the computer. After that everything works beautifully again, that is, until I have to make a change to a report. I am running OOo as a front end client-server set up connected through JDBC (am I specifying that correctly?). Even though I have a work around, I would rather not have to restart the computer every time I make a change to report function of the db. :crazy: Any suggestions out there?

Thanks
TJM05
Last edited by TJM05 on Thu Dec 01, 2011 6:11 pm, edited 1 time in total.
Open Office 3.3/Windows 7
TJM05
 
Posts: 25
Joined: Tue May 10, 2011 10:58 pm

Re: Macro Error when Running Report

Postby TJM05 » Thu Dec 01, 2011 6:10 pm

Actually found the problem. When I close OO Base I then have to go into Task Manager and processes and close down oo base from in there. Then everything works fine. Simple case of a newbie not knowing left from right. :oops:
Open Office 3.3/Windows 7
TJM05
 
Posts: 25
Joined: Tue May 10, 2011 10:58 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 2 guests