Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Can't open a .doc file generated by B.I.R.T with ActiveX(ActiveX can't open files generated by B.I.R.T)
Can't open a .doc file generated by B.I.R.T with ActiveX [message #1398805] Fri, 11 July 2014 16:18 Go to next message
Ayman JDAINI is currently offline Ayman JDAINIFriend
Messages: 2
Registered: July 2014
Junior Member
Hello Wolrd Very Happy

I'm using activeX to open some doc files in a remote machine.
I'm able to open any normal doc file created by MS.Office, but i can't open doc files that are generated by BIRT.
Do you have any idea why ?

Thanks
Best regards
Re: Can't open a .doc file generated by B.I.R.T with ActiveX [message #1401869 is a reply to message #1398805] Wed, 16 July 2014 07:33 Go to previous messageGo to next message
Henning von Bargen is currently offline Henning von BargenFriend
Messages: 23
Registered: May 2011
Junior Member
Just a wild guess: Maybe you are hitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=428173 : Output file not closed with separate RunTask and RenderTask
Re: Can't open a .doc file generated by B.I.R.T with ActiveX [message #1401870 is a reply to message #1398805] Wed, 16 July 2014 07:33 Go to previous messageGo to next message
Henning von Bargen is currently offline Henning von BargenFriend
Messages: 23
Registered: May 2011
Junior Member
Just a wild guess: Maybe you are hitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=428173 : Output file not closed with separate RunTask and RenderTask
Re: Can't open a .doc file generated by B.I.R.T with ActiveX [message #1401871 is a reply to message #1398805] Wed, 16 July 2014 07:33 Go to previous messageGo to next message
Henning von Bargen is currently offline Henning von BargenFriend
Messages: 23
Registered: May 2011
Junior Member
Just a wild guess: Maybe you are hitting bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=428173 : Output file not closed with separate RunTask and RenderTask
Re: Can't open a .doc file generated by B.I.R.T with ActiveX [message #1402704 is a reply to message #1398805] Thu, 17 July 2014 11:23 Go to previous message
Ayman JDAINI is currently offline Ayman JDAINIFriend
Messages: 2
Registered: July 2014
Junior Member
Hi,
Thanks for helping, I've found the problem using IE Debugger.
The problem came from openOffice who can't open documents generated by BIRT.

Here is a correct implementation of the mecanisme, all you need is to implements this fonction in your html page and then call it by giving the filePath :

<script type="text/javascript">
															
function myFunctionWord(filePath) {
    try {
	var myApp = new ActiveXObject('Word.Application'); 
	myApp.Documents.Open(filePath);							
	myApp.Visible = true;
    } catch (e) {   
	function createStructArray(ServiceManager, structName) {
	var classSize;
	var newStruct = new Array();
	classSize = ServiceManager.forName(structName);
	classSize.createObject(newStruct);
	return newStruct;
	}
	var objServiceManager = new ActiveXObject('com.sun.star.ServiceManager');
	var objCoreReflection = objServiceManager.createInstance('com.sun.star.reflection.CoreReflection');
	var objDesktop 	= objServiceManager.createInstance('com.sun.star.frame.Desktop');
	var args 	= createStructArray(objCoreReflection,'com.sun.star.beans.PropertyValue');
	var objDocument = objDesktop.loadComponentFromURL(filePath, '_Blank', 0, args);
    }
}	
									
</script>



P.S : the filePath must be like this : file://remoteAdresse/Path/fileName.doc
Example : [u]file://15.46.44.147/myProject/BIRT_HOME/fileName.doc[/u]

[Updated on: Thu, 17 July 2014 11:25]

Report message to a moderator

Previous Topic:createFactoryObject returning NULL
Next Topic:report parameters
Goto Forum:
  


Current Time: Thu Mar 28 10:03:29 GMT 2024

Powered by FUDForum. Page generated in 0.04694 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top