Profile Picture

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

Posted By Rubab Sayeed 14 Years Ago

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

Author
Message
Rubab Sayeed
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 4, Visits: 1

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



Nevron Support
Posted 14 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)Supreme Being (4,329 reputation)

Group: Forum Members
Last Active: Last Year
Posts: 3,039, Visits: 3,746

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.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic