CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 13 of 13

Thread: MSChart

  1. #1
    Join Date
    Jul 1999
    Posts
    58

    MSChart

    i want to bind MSChart to a recordset fields call Quantity(Y axis) and Year(X axis).....

    how should i specify the datasrc, datafield, dataMember and dataFormatAs?????


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: MSChart

    I just created a table in SQLserver like this:
    create table lahtest3( year int, quantity int)
    go
    insert into lahtest3 values( 1984, 5)
    insert into lahtest3 values( 1985, 6)
    insert into lahtest3 values( 1986, 4)

    then I added a data environment to my vb 6 project
    and added a command that is based on the following sql statement
    select convert(varchar(10),year), quantity from lahtest3
    It is important that the year is a character field! Otherwise the mschart control tries to be smart and interprets it in a way that creates crazy graphs.

    Then I simply set Datasource to dataenvironment1 and Datamember to Command1.
    And, without writing a single line of code I got a "nice" chart.



  3. #3
    Join Date
    Jul 1999
    Posts
    58

    Re: MSChart

    hai lothar...

    thanks for the solution.. but when i tried it out at visual interdev, it keeps telling me that putting either dataEnviroment1 or connection1 or command1 or recordset1 as datasource is 'invalid property value'... do u have any idea about it?


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: MSChart

    Thanks for telling us, that you do that in an HTML page using interdev. Of course you cannot use the dataenvironment in an HTML page.


  5. #5
    Join Date
    Jul 1999
    Posts
    58

    Re: MSChart

    but in interdev, u can add dataenvironment too as what u did in visual basic... adding a data connection and data command is the same way we can do in visual basic...

    sorry for the confusion just now...


  6. #6
    Join Date
    May 1999
    Posts
    3,332

    Re: MSChart

    >but in interdev, u can add dataenvironment too as what u did in visual basic

    sure, that may work in server-side ASP processing, but I doubt that it will work in client-side HTMLpages.


  7. #7
    Join Date
    Jul 1999
    Posts
    58

    Re: MSChart

    ic.. then do u have any other suggestion???

    oh ya, about the ADO problem that i post past few days, do u have any further idea about my doubt?

    thanks again


  8. #8
    Join Date
    May 1999
    Posts
    3,332

    Re: MSChart

    1 suggestion: in your ASP (if you use one) you could create client-side JScript code for manipulating the ms chart properties.
    may be there is an ActiveX Control that can be bound to an RDS object.
    >oh ya, about the ADO problem that i post past few days, do u have any further idea about my doubt?
    I don't remember.


  9. #9
    Join Date
    Jul 1999
    Posts
    58

    Re: MSChart

    ic.. thanks...

    can u please check again.. there is a question call "ADO in ASP" posted by anonymous at 22/8....


  10. #10
    Join Date
    May 1999
    Posts
    3,332

    Re: MSChart

    >can u please check again.. there is a question call "ADO in ASP" posted by anonymous at 22/8....
    I think, I've answered that one. You need to create an application in IIS. If Interdev doesn't do it for you, do it manually.
    Or: don't use application vars if you use them only for connection strings. Use in include file instead. That's how I do it in my apps.


  11. #11
    Join Date
    Jul 1999
    Posts
    58

    Re: MSChart

    ic.. thanks for all


  12. #12
    Join Date
    Oct 1999
    Posts
    1

    Re: MSChart

    I have a problem

    How do i call a sub procedure using RDS .. i know using ADo to call a sub procedure from oracle .. i am stuck to call a sub procedure using RDS .. pls reply .. it is urgent ..U can reply mr directly to [email protected]
    or [email protected]

    Positive answer expected and appritiated..
    Vinod


  13. #13
    Guest

    Re: MSChart

    Sorry .. I want to know that Can I use MSChart in VC ++;
    if yes .. how ?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured