Business Data Catalog.
Recently, I had to evaluate and implement the Business Data Catalog(in Sharepoint). I found it to be very useful. The following article by Sahil was very useful during my learning phase.
Getting Started with Business Data Catalog.
The BDC Editor tool available with MOSS SDK was useful in getting me started, but later, I edited the Application Definition XML file manually. This proved to be easier than the editor for me.
Monday, June 30, 2008
Tuesday, April 08, 2008
Friday, March 07, 2008


HOW TO DEPLOY A WEBPART THAT HOSTS A WEB USER CONTROL TO SHAREPOINT
There are a couple of different ways to create the web part and deploy it to Sharepoint, but here is how I did it. In my case, I developed locally on my machine( I did copy the Sharepoint dlls locally for reference). The deployment server was on a virtual machine where I had MOSS setup.
1. Create the Web User Control(with code behind) in Visual Studio.
2. Sign the Assembly so that it has a strong name
3. Create the web part (either Sharepoint Webpart or ASPNET Webpart) in Visual Studio. Another good article for reference
4. Sign the Assembly.
5. Go to the Sharepoint Deployment Server.
6. Copy both the above strong named Assemblies(user control and webpart assemblies) to GAC on the Sharepoint server
7. Modify security settings of Sharepoint site by changing the Trust to Full in Web.Config of the Sharepoint Site like this..
trust level="Full" originUrl="" />8. Add Safe Control Entries to the DLLs added to GAC in Web.Config of the Sharepoint Site similar to this..
SafeControl Assembly="SmartParticles, Version=1.0.0.0, Culture=neutral,( I used Reflector to get the strong name)
PublicKeyToken=70d581d0b6a14330" Namespace="WebParticle" TypeName="*"
Safe="True" />
9. Add an Assembly element to the assemblies section of Sharepoint site’s web.config file..similar to this.
assemblies><
add assembly="SmartParticles, Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=70d581d0b6a14330"
/>
10. Create a Folder usercontrols under the Sharepoint site ex: wss/VirtualDirectories/80/usercontrols. Make sure this is not an application in IIS, as otherwise, it will fail.
11. Copy the ascx file(web user control file) and the other css files, xslt files and images(used by the user control) to this usercontrols folder. Make sure that when you access these other files from inside your user control code, they are referenced as “/usercontrols/*.gif” and so on.
How to populate the Web Part Gallery with the added Webpart.
The user needs to be the administrator of the site in order to do this.
Open the main Sharepoint site and go to Site Actions->Site Settings->Modify All Site Settings and click Webparts under Galleries.
Click New..this will by using Reflection populate the new webpart from the safe controls list in web.config.
Select the new web part and click “Populate Gallery” to place it in the gallery.
The webpart is now availableto populate on any of the Webpart pages inside Sharepoint.
See the webpart from my Test Sharepoint Site below:
Tuesday, February 12, 2008
Designing Reports with Reporting Services
The following blog has a good post on how to setup Reporting Services Add-in
http://blogs.threewill.com/implementingsharepoint/Lists/Categories/Category.aspx?Name=Reporting
The following blog has a good post on how to setup Reporting Services Add-in
http://blogs.threewill.com/implementingsharepoint/Lists/Categories/Category.aspx?Name=Reporting
Issue 1:
As I was working with designing reports, I had a scenario where I had to have a parameter with a dropdown of all the Locations that a user has access to. This is stored in SQL Server in my case. I was not sure how to do it. I knew I had to create a dataset that returns the locations and pass in the logged user. I did do that, but instead of passing User!UserID, I created another Report parameter called UserID and set that to User!UserID and passed this ReportParameter as the Dataset’s Query Parameter.
When I tried to do it like that, I ran in to an error. I searched for it and found the solution to the problem in the blog entry below. I had the Dataset Report Parameter declared above the UserID parameter. Fixing it as below, made the error go away.
Declare Parameter Y before X as below.
Go to the Layout tab
Select the Report object in the properties window
Go to the ReportParameters property and edit
Move Y above X using the arrows
http://blogs.infosupport.com/raimondb/archive/2006/08/09/sqlrepparamerror.aspx
Issue 2:
I had a need to conditionally sum the underlying data and display it in the group footer.
I followed the following advice from a forum and it worked.
Ex:=Sum(iif(Fields!Status.value = "Value a", Cdbl(Fields!Payment.Value), 0.0))
http://www.tek-tips.com/viewthread.cfm?qid=1072925&page=3
Issue 3:
I was trying to solve a problem by using an aggregate function and display it in the footer by using another aggregate function. It won’t work in Reporting Services as you cannot embed aggregate functions within each other, nor can you use a calculated field as an expression in an aggregation function.
I even considered using the technique below, but did not help.
http://www.codeprof.com/dev-archive/211/19-82-2111320.shtm
I finally solved my problem by using a Report Parameter instead.
Subscribe to:
Posts (Atom)