index | search | no replies | posting guidelines | help | login | register |
Index » Products » ASP Report Wizard v2 |
| |||||||
Oct 28 2005, 5:36 AM |
| ||||||
ansareo from: Barcelona | Hello, I have a created Report that only display a graphic inserted in ASP page. I need to change the default graphic properties from report like .Spacing .ShowVlines .MaxBaxHeight etc. Is it possible? I f not, Can you send me a clear example using SimpleGraph API that read values from ACCESS database creating two or more stacked bar graph? Thanks in advanced | ||||||
Oct 28 2005, 7:30 AM |
| ||||||
whichman from: Laurel, MD | <% 'declare variables Dim objGraph Dim i, aData aData = GetData("SELECT TOP 10 ProductName, UnitPrice FROM Products" ) ' Create an instance of SimpleGraph Set objGraph = Server .CreateObject("AspWebSolution.SimpleGraph" ) With objGraph 'Add some data For i=0 To UBound (aData, 2 ) Call .AddRowData(aData(0 , i), aData(1 , i)) Next 'Add some variables .XScaleValues = "Products" .xALign = "center" .yLabel = "Price" .Title = "Most Expensive Products" 'You can chage the colors if you want '.Colors = "green, red, yellow, blue, orange, fuchsia" End With 'Draw your graph objGraph.Draw Set objGraph = Nothing Function GetData(strSQL) Dim objConn, objRS, strConn strConn = "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE= " strConn = strConn & "C:\Program Files\Microsoft Visual Studio\VB98\nwind.mdb;" Set objConn = Server .CreateObject("ADODB.Connection" ) objConn.Open strConn Set objRS = objConn.Execute(strSQL) If Not objRS.EOF Then GetData = objRS.GetRows objRS.Close End If Set objRS = Nothing objConn.Close Set objConn = Nothing End Function %> ------------------------- Master of the Game | ||||||
Pages: (1) [1] |