Question about SQL command to display chart based on particular login?


https://www.nevron.com/Forum/Topic4033.aspx
Print Topic | Close Window

By Rubab Sayeed - 14 Years Ago

Hi, I need some assistance with a particular SQL command. I am essentially trying to display a chart with info, which would be based upon the user logging in to the database.

 

For example, I have the following command:

SELECT billable,SUM(ytdhrs) AS ytd,SUM(ptdhrs) AS ptd FROM rpthoursworked WHERE ttk=[login] GROUP BY billable

^This basically is returning everybody's information who is logged onto Sharepoint. 

 

However, I would like the command to represent information based upon individual logins.  For example, if I log in, the chart would display only MY information which it would pull from the database as opposed to everybody elses.

Im sorry if it sounds confusing, please let me know if I should offer additional information. Thanks a lot

By Nevron Support - 14 Years Ago

Hi Rubab,

 

Your requirement needs some additional logic to be implemented. The main function of the chart web part is to have the ability to get data from different data source types. You need different data depending on the login user. Nevron Chart web part can get data from a custom web part. You can implement your logic in this custom web part.

 

When creating custom web part, all you need to follow is to implement IWebPartTable interface. You can read more here - http://social.msdn.microsoft.com/Forums/en/MSWinWebChart/thread/0b8ef404-65b6-4a1f-907b-e0e78d3fa9a3

 

So, your logic need to be in the custom web part. The chart only present the data which you are providing. If you are not familiar with developping web parts in SharePoint we can help you with our Custom Development Services. To receive a quote for the custom development, you can contact: Nevron Consulting.