Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Creating a chart based on a query?
Mark Hanford
Posts: 131
 
Creating a chart based on a query?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 Jan 10 11:31 AM
Hello there,

I'm trying to use the Chart control to create a simple bar (or pie for that matter) chart from a query.

If my query is:

SELECT MyFieldName AS FieldNames, MyValueField AS FieldValues FROM MyTable

And the results looks like this:

SomeMetric 15
SomeOther 23
MetricThree 8

How do I put that on a chart so that there are three columns titled "SomeMetric", "SomeOther" and "MetricThree" with the values 15, 23 and 8 respectively?

I've tried putting FieldNames into the "Label Values field name" box, and "FieldValues" into the "Y Values field name" box, but then I just get one bar labelled "SomeMetric" with a value 15.


Here's a bit of the code-behind:

Dim objSLXDB, objRS, strSQL
Set objSLXDB = new SLX_DB
Set objRS = objSLXDB.GetNewRecordset
strSQL = "TYPE AS FieldNames, COUNT(ACCOUNTID) AS FieldValues FROM ACCOUNT GROUP BY TYPE"
objRS.Open strSQL, objSLXDB.Connection
chart1.RecordSet = objRS


Thanks,

Mark
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 4:19:25 AM