Window Support Software

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Wednesday, 16 November 2011

Creating a report from Oracle WebCenter Analytics db using SQL Reporting Services

Posted on 11:13 by Unknown
Recently we had a request to view some information about users that had viewed particular documents from our KD.  Unfortunately Analytics doesn't have the capability of displaying more than the user name values in it's user reports so we had to look elsewhere.  Creating a SQL query to determine which users had viewed particular documents involved five tables but was slightly tedious to constantly run.  Instead I took a few hours and learned how to generate reports using SQL's Reporting Services tool.  This isn't super hard, but I figured I'd share what I learned in case anyone else out there runs into this type of issue.

Here are the steps to generating the report within MS SQL's Reporting Services (I used both 2005 and 2008 and didn't notice a difference between the two)
  1. Open "SQL Server Business Intelligence Development Studio" (aka Visual Studio)
  2. Click "File>New>Project"
  3. Select the project type called "Business Intelligence Report", and use the "Report Server Project Wizard" template
  4. Name the project something intuitive and go on to the next screen
  5. Select the data source
    1. Once you have named your source click the Edit button to connect to the database
    2. Add your server name and select the particular database that you need to connect to. Then be sure to test the connection to make sure it works.
  6. The next screen will prompt you for the query that your report will be built from.  In this case I've already built out the query and it can be pasted into place.  This query identifies who has looked at a particular document from the KD and displays a few user profile fields along with the document name.
  7. At this point you can take a look at the Query Builder in case you want a little assistance or to see what else you can play with.  Having two columns with the same name caused an issue when I did my report development on SQL 2005 so I chose to use an alias which solved the issue.
  8. For the report type I selected Matrix
  9. Placing the DOC_NAME field into the Page section allows the report to create a new tab for each of the documents that I want to generate this report for.
  10. Choose your style
  11. Choose your deployment location
  12. Complete the Wizard steps
  13. The report we generated will display like this within the Visual Studio editor that we are working in (sorry I had to scrub the data since it wasn't just employee information)

  14. The next step is to right click on the report and select deploy and then you are all set and can go to a web browser and pull it up at this URL: http://yourserver/Reports
    1. I ran into a security issue with connecting to our database server from off the server.  Turns out the data connector was going through as an anonymous user when I was going through the website. To rectify the issue I modified the data source to use "Credentials stored securely in the report server" instead of using Windows authentication.
    2. Log files are here in case you have issues: C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles
Now that the easy part is out of the way, if you really care about doing this to track document views in Analytics you'll need to consider the best course of action given it's use of dynamic tables based on year/month and how the current months table is stored.

In order to use dynamic table names in a SQL query you'll need to use a different form of SQL known as dynamic SQL. Unfortunately dynamic SQL isn't supported in SQL Reporting Service, but you can get around that by creating a stored procedure and setting that as the data set from your report!

Yes, it is getting complicated:)

The dynamic SQL command that I'm using is:
Declare @tblName Varchar(4000)
Declare @SQL Varchar(5000)

Set @tblName =
'ASFACT_DOCUMENTVIEWS_'
+ CONVERT(VARCHAR,DATEPART(yyyy,GETDATE()))
+ '_'
+ CONVERT(VARCHAR, RIGHT('0' + RTRIM(MONTH(GETDATE())-1), 2));

SET @SQL = 'SELECT     t2.OCCURRED, t2.ID, t2.USERID, t3.NAME, t2.DOCUMENTID, t1.NAME AS DOC_NAME, t4.PROPERTYID, t5.NAME AS PROP_NAME, t4.VALUE
FROM         ' + @Tblname + ' AS t2 INNER JOIN
                      ASDIM_USERS AS t3 ON t3.ID = t2.USERID INNER JOIN
                      ASDIM_USERPROPERTYVALUES AS t4 ON t4.USERID = t3.ID INNER JOIN
                      ASDIM_KDDOCUMENTS AS t1 ON t1.ID = t2.DOCUMENTID INNER JOIN
                      ASDIM_USERPROPERTIES AS t5 ON t4.PROPERTYID = t5.PROPERTYID
WHERE        (t2.DOCUMENTID IN (33449, 36241, 36566))
            AND (t4.PROPERTYID IN (26, 156, 157, 158, 159, 325, 160, 162))
            AND (OCCURRED>CONVERT(VARCHAR,MONTH(GETDATE())-1) + ''/15/2011'')
ORDER BY t2.DOCUMENTID, t2.OCCURRED';
Exec(@SQL)


Technically the order by command isn't needed because sorting is done from within the report itself, but it helps to debug the data you are expecting in your report!

I've skipped a lot of steps that I did to get this all working (because most people probably wouldn't care about the small details) but if you have any questions feel free to ask in the comments and I'll try to help you out.

UPDATE:  After consulting with Oracle support I'm no longer using the dynamic tables, nor the dynamic SQL. Instead I'm going directly against the ASVFACT_DOCUMENTVIEWS table which makes this a little easier.
    Read More
    Posted in Oracle WebCenter Analytics, Oracle WebCenter Interaction, SQL Server Reporting Services | No comments
    Newer Posts Older Posts Home
    Subscribe to: Comments (Atom)

    Popular Posts

    • Deleting AutoComplete Entries In Outlook
      Your Outlook is not just a mere email client; it is a very efficient personal manager tool. MS Outlook can help you take notes, make journal...
    • Interact Intranet: Automate the Extraction of Binary Profile Pictures for use in Active Directory
      Active Directory can be used as a central repository for the storage of profile pictures.  This source can then feed email, CRM, intranets, ...
    • How to Set Password on Your Windows XP
      Windows XP is the most popular operating system in the world. It has got a number of unique features, which make it a favourite to all. It w...
    • Configure Windows Live Or Hotmail Account In Your IPhone
      IPhone lets you configure your email accounts in it, and now, if you have a Hotmail account, we will give you tips on how to configure that ...
    • Steps To Set Up The Email Filter In Outlook
      As we all know, Microsoft Outlook contains some of the most advanced and novel features which help users to remember and organize their impo...
    • Walk-through of domain configuration for Oracle WebCenter 11g: on Windows Server 2008 x64 & MS SQL 2008
      In my previous post I covered the third step of the "simple" installation topology, Install other Fusion Middleware products , and...
    • How To Tackle The Buffer Overflow Situation
      Normally a program runs on a sufficient amount of memory. However, when the program consumes more memory than required, a phenomenon called ...
    • Oracle WebCenter Interaction: Using multiple logins and URLs to access your portal
      When we purchased Plumtree licenses way back in the day we had visions of using the software to run our intranet and as an extranet for smal...
    • Walk-through of post install tasks for Oracle WebCenter: on Windows Server 2008 x64 & MS SQL 2008
      In my previous post I covered the fourth step of the "simple" installation topology, Configure domain for WebCenter , and will now...
    • Excel Tips & Tricks
      I enjoy spreadsheets and working with numbers.  A lot of this joy comes from the satisfaction of being able to keep track of many different ...

    Categories

    • 64bit
    • access a help link
    • Active Directory
    • AD
    • Adaptive Layouts
    • Administrator account
    • Antimalware programs
    • binary
    • collaboration
    • content management
    • content migration
    • CSS
    • Data Connection
    • Data execution prevention
    • Ease your work
    • Eclipse
    • Email accounts
    • Email in Outlook
    • End process
    • Excel
    • hosting
    • iCalendar
    • ics
    • IIS
    • install
    • Interact-Intranet
    • Intranet
    • Jive Express
    • Jive SBS
    • Jive Software
    • Knowledge Directory
    • Liferay
    • Liferay Developer Studio
    • Linux
    • Local Computer Policy
    • login
    • Microsoft chat
    • Microsoft Help
    • Microsoft support
    • Microsoft tech support
    • Microsoft word application
    • Minimum hardware requirements
    • Mozilla Firefox web browser
    • MS SQL 2008
    • New Mail Notification
    • Oracle
    • Oracle ECM
    • Oracle Enterprise Content Management
    • Oracle OpenWorld
    • Oracle WebCenter
    • Oracle WebCenter Analytics
    • Oracle WebCenter Analytics 10.3.0.1
    • Oracle WebCenter Interaction
    • Oracle WebCenter Suite
    • Outlook 2007
    • Outlook Express Address Book
    • Outlook Repair
    • Outlook repair utility
    • Outlook settings
    • Outlook support
    • Outlook tech support
    • Password protection
    • Plumtree
    • portals
    • Programs and Features
    • Publisher
    • RCU
    • redirect
    • Remove AVG toolbar
    • Remove malwares
    • Screen Scraping
    • Search
    • set password
    • SharePoint
    • SQL
    • SQL Server Reporting Services
    • Studio
    • Task manager
    • try Windows 8
    • Underline feature
    • vanity URL
    • Vista problems
    • WCI
    • WebCenter Interaction
    • WebCenter Suite
    • WebLogic Server
    • Windows 7 Support
    • Windows 8 Support
    • Windows 8 transfer
    • Windows Blue
    • Windows Easy Transfer tool
    • Windows live chat support
    • Windows Live Photo Gallery
    • Windows Online Support
    • Windows Server 2008
    • Windows support
    • Windows Vista help
    • Windows XP support
    • WLS
    • Xbox 360 controller

    Blog Archive

    • ►  2013 (33)
      • ►  December (1)
      • ►  November (1)
      • ►  October (8)
      • ►  August (2)
      • ►  July (4)
      • ►  June (4)
      • ►  May (3)
      • ►  April (2)
      • ►  March (2)
      • ►  February (1)
      • ►  January (5)
    • ►  2012 (32)
      • ►  December (4)
      • ►  November (5)
      • ►  October (2)
      • ►  September (7)
      • ►  August (1)
      • ►  July (1)
      • ►  June (8)
      • ►  May (2)
      • ►  April (1)
      • ►  March (1)
    • ▼  2011 (30)
      • ▼  November (3)
        • Creating a report from Oracle WebCenter Analytics ...
        • 30 Second CSS Tweak to Improve the Look of Studio ...
        • My notes from the recent KM World: SharePoint Symp...
      • ►  October (2)
      • ►  September (2)
      • ►  August (4)
      • ►  July (3)
      • ►  June (5)
      • ►  May (4)
      • ►  April (2)
      • ►  March (3)
      • ►  January (2)
    • ►  2010 (8)
      • ►  December (2)
      • ►  November (1)
      • ►  October (5)
    Powered by Blogger.

    About Me

    Unknown
    View my complete profile