cancel
Showing results for 
Search instead for 
Did you mean: 

How to publish non-Crystal Report files in BO XI R2?

Former Member
0 Kudos

Development Environment: Visual Studio 2005, C#

I'm working on a project where I need to publish non-Crystal Report files - specifically Excel and Text files - to a specified folder in BusinessObjects XI R2. However, I'm having a very hard time finding any samples for how to do that. I know how to publish Crystal Report files, so I figure I'll need to instantiate a PluginManager object of the correct type, but I'm not sure how to load the file from there.

Can anyone provide some sample code or point me in the right direction so that I can figure this one out? Thanks!

-Dell

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I have around 60 pdf reports to be published every day to 10 different folders in BOXI. I want to automate this .

Can anyone provide some sample code or point me in the right direction so that I can figure this one out?

Thanx,

Tasneem

Former Member
0 Kudos

A code snippet for Text:

txtPath = @"C:\mytext.txt";

ceSession = (new SessionMgr()).Logon(username, password, cmsname, authtype);

InfoStore infoStore = new InfoStore(ceSession.GetService("InfoStore"));

int folderID = ((InfoObject) infoStore.Query("Select TOP 1 SI_ID From CI_INFOOBJECTS "

+ " Where SI_KIND='Folder' "

+ " And SI_NAME='" + folderName + "'")[1]).ID;

InfoObjects txts = infoStore.NewInfoObjectCollection();

Txt txt = (Txt) txts.AddEx("Txt");

txt.Title = "Test Text";

txt.Files.Add(txtPath);

txt.ParentID = folderID;

infoStore.Commit(txts);

Ted Ueda

Former Member
0 Kudos

Thanks Ted, I'll give that a try. Can I similar code for Excel, PDF, and Word files?

-Dell

- A computer only does what you told it to, not what you <em>thought</em> you told it to!

Former Member
0 Kudos

Similar, yes. You'd modify the SI_KIND name in the AddEx method invocation to specify the type.

Ted Ueda

Former Member
0 Kudos

Is there a Java equivalent for the AddEx method? I haven't been able to find it in the API Reference.