Tuesday, March 23, 2010

Sharepoint Speaker NetPonto.org comunity

The Last saturday "27/03/2010" was invite to speak to a Portuguese comunity about .net and of cours my topic was Sharepoint :P
http://www.netponto.org/reunioes/8a-reuniao-presencial-da-comunidade-netponto/

I like to congrat the leader of the comunity "Caio Proiete" for this event and invite me to speak, with other 2 MVP on the same day "Paulo Morgado e Caio Proiete".

The Portuguese Sharpoint Comunity http://www.sharepointpt.org/ thanks for this oportunity. :)


The next will be on Porto "Portugal" the next saturday "27/03/2010", the speaker will be chosen by Pool from all the Speakers made by the comunity, will be there and hope see you there to speak.

The conference will be at my old University :)
Universidade Portucalense (Porto)
R. Dr. António Bernardino de Almeida, 541, sala 201 (segundo piso)
4200-072 Porto

Monday, March 15, 2010

Business Objects XI R2 List Treeview Reports With Sharepoint

Hello everyone

For some reason, people start to ask me for Business Objects and integration With Sharepoint.

Some time ago, have to makes webpart and Develomp page to integrate with Business Object Reports
here the document i use to help develomp and use the Business Object API on the project "BUSINESS OBJECTS WEBSERVICES INTEGRATION":


//Method to make the connection to Business Objects and filter result in this case "categories, documents and folder"

Credential val = new Credential();
Session boSession = new Session(boConnection);
SessionInfo boSI = boSession.Login(boCredential );
Token = boSI.DefaultToken;
String[] strBOCatURL = boSession.GetAssociatedServicesURL("BICatalog");
boCatalog = BICatalog.GetInstance(boSession, strBOCatURL[0]);
SortType[] mySort = new SortType[1];
mySort[0] = SortType.NAMEASC;
string[] bicatalogObjectType = new string[3];
bicatalogObjectType[0] = "categories";
bicatalogObjectType[1] = "documents";
bicatalogObjectType[2] = "folders";
if (!Page.IsPostBack)
{
try{
if (boCatalog != null)
{
RecursivePopulateFolders(boCatalog.GetCatalog("", 0, mySort, bicatalogObjectType, null, null, InstanceRetrievalType.WITHOUTINSTANCE), this.TreeCtrl.Nodes);
//RecursivePopulateCategory(boCatalog.GetCategoryList("", 0, mySort, null, null), this.TreeCtrl.Nodes);
}
else
{
Response.Write("No items found catalog.");
}
}
catch (Exception ex)
{
Response.Write("Error occured:
" + ex.ToString());
}
}


// This Recursive Method Populate Folders from Business Object Reports with a url that will open the Business Report we want to see.
private void RecursivePopulateFolders( BICatalogObject[] catalogObjects, TreeNodeCollection nodes)
{
foreach (BICatalogObject catalogObject in catalogObjects)
{
if (catalogObject is Document)
{
Document doc = catalogObject as Document;
StringBuilder pathBuilder =new StringBuilder();
pathBuilder.Append(ConfigurationManager.AppSettings["REPORT_NAV_URL"].ToString());
pathBuilder.Append("&iDocID=" + doc.UID);
pathBuilder.Append("&sType=" + doc.FileType);
pathBuilder.Append("&sWindow=Same");
pathBuilder.Append("&sRefresh=" + ConfigurationManager.AppSettings["REPORT_REFRESH"].ToString());
pathBuilder.Append("&token=" + Token);
nodes.Add(this.CreateNode(doc.Name,pathBuilder.ToString(),doc.ObjectType, doc.Description,doc.UID.ToString()));
}
else
{
nodes.Add(this.CreateNode(catalogObject.Name, string.Empty,
catalogObject.ObjectType,
catalogObject.Description,
catalogObject.UID.ToString()));
}
}
}

Here the final result
PS: This image came from the Document:
"BUSINESS OBJECTS WEBSERVICES INTEGRATION":

Here some reference

static InstanceRetrievalTypeALL Return all documents
static InstanceRetrievalTypeINSTANCEONLY Return only documents containing a document instance
static InstanceRetrievalTypeWITHOUTINSTANCE Return only documents without a document instance

Here a .Aspx Example project you can use to integrate your with sharepoint:
You will need to download the .NET Consumer Library to use on the project.


Hope this help. :)