LO not starting & Macro

asked 2019-06-29 17:43:25 +0200

jodybingo gravatar image

updated 2019-06-29 23:09:02 +0200

Hello, I was on LO 6.2.4.2 on W7. Yesterday I installed Mysql and last night windows did an update. This morning, LO will not launch. If I delete the user profile I get the splash screen then it shuts down (soffice.exe shows briefly in the task manager). I uninstalled and re-installed to no avail. So I tried LOP version 6.1.6 and it launches fine but a new issue has surfaced with a macro (which I know nothing about). The macro is on a standalone form and launches reports in my database (hdsqldb embedded). The macro...

Sub PrintReport(oEvent)
Rem Get name of Control
   sControlName = oEvent.source.Model.Name

Rem Check for button pushed
   If sControlName = "btn6" Then
       ReportName = "Resto_Report"
   EndIf
   If sControlName = "btn7" Then
       ReportName = "Event_Invoice" 
   EndIf
      If sControlName = "btn8" Then
       ReportName = "Birthday_Email"
   EndIf
   If sControlName = "btn9" Then
       ReportName = "Corp_Order_Form" 
   EndIf
      If sControlName = "btn10" Then
       ReportName = "Theme_Email"
   EndIf
   If sControlName = "btn11" Then
       ReportName = "Party_Order_Form" 
   EndIf
      If sControlName = "btn12" Then
       ReportName = "Party_Order_FormToday" 
   EndIf
Rem add more If Statements as needed or even better a CASE statement.
   oContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") 
Rem set registered DB name here 
   oFont = oContext.getRegisteredObject("Reservations") '<====================
   dbForms = oFont.DatabaseDocument.ReportDocuments 
   oAConnection = oFont.getConnection("","") 
   Dim pProp(1) As New com.sun.star.beans.PropertyValue 
   pProp(0).Name = "ActiveConnection" 
   pProp(0).Value = oAConnection 
   pProp(1).Name = "OpenMode" 
   pProp(1).Value = "open" 
   oForm = dbForms.loadComponentFromURL(ReportName, "_blank", 0, pProp()) 
End Sub

When running this macro the error shows up in the line

oFont = oContext.getRegisteredObject("Reservations")

Who can help? And if anyone can suggest a fix for LO 6.2.4.2 not launching that would help plenty too!

Thanks

**UPDATE I tried a few more times uninstalling and reinstalling 6.4.2 and it finally launches. My db now opens in Writer instead of Base. I made a backup of my db before doing anything and it opens in Base so I am using that one. The only remaining issue I have appears to be a known bug, standalone forms do not save to the db unless the DB is open.

edit retag flag offensive close merge delete

Comments

@jodybingo,

The standalone issue is a known bug. see tdf#112458

See comment #8 for possible workaround.

Ratslinger gravatar imageRatslinger ( 2019-06-29 18:32:12 +0200 )edit

I saw that post. My earlier problem of LO not launching has returned. Gonna try taking everything out and putting it back in again :(

jodybingo gravatar imagejodybingo ( 2019-06-29 21:39:46 +0200 )edit