Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Chart Refresh Problem

Chart Refresh Problem

Scheduled Pinned Locked Moved ASP.NET
questioncsharpcssasp-netdatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hyland Computer Systems
    wrote on last edited by
    #1

    Dear sirs: I have a simple ASP.NET WebForm; on it are: a combo-box (for months) and a submit button, an SqlDataSource (for chart data), a GridViewControl (interface between sql data source and chart control) and a chart control. When I select a month from the combo box and hit a button, the proper data is displayed in the chart control. However, when I select another month from the combo box the same data is again displayed. I made sure to wipe out the double-array that holds the data by instantiating a new instance of it in the constructor of the class in which it resides. Here's what's interesting: if I click on the browser's "back" button and then the "forward" button; and then hit the "submit" button, the grid displays the proper data for the new month in the drop down combo box. What is happening? What can I do to make sure the data from the sqldatasource/gridview is synched with the filter-select variable in the combo box? Thanks in advance, Rob Hyland

    M 1 Reply Last reply
    0
    • H Hyland Computer Systems

      Dear sirs: I have a simple ASP.NET WebForm; on it are: a combo-box (for months) and a submit button, an SqlDataSource (for chart data), a GridViewControl (interface between sql data source and chart control) and a chart control. When I select a month from the combo box and hit a button, the proper data is displayed in the chart control. However, when I select another month from the combo box the same data is again displayed. I made sure to wipe out the double-array that holds the data by instantiating a new instance of it in the constructor of the class in which it resides. Here's what's interesting: if I click on the browser's "back" button and then the "forward" button; and then hit the "submit" button, the grid displays the proper data for the new month in the drop down combo box. What is happening? What can I do to make sure the data from the sqldatasource/gridview is synched with the filter-select variable in the combo box? Thanks in advance, Rob Hyland

      M Offline
      M Offline
      Michael Sync
      wrote on last edited by
      #2

      I think that i faced that kind of problems once. It could be two reasons. 1. You put the databinding function in wrong place. 2. You may need to add some unique keys for getting the latest result. This is the reason probably for you. When I was using SQL Reporting Service in ASP.NET project, I faced the same problem that I was not able to get the latest data for my report even I passed the correct parameter. Then, the solution was that I add the unique key (eg: timestamp) as paramenter to my report. Whenever I generate the report, i used to pass this timestamp value as a paramenter to report. Then, i got the latest result.. You may read for the problem and solution that I said above in this link. http://michaelsync.net/2007/05/13/tipstricks-aspnet-with-sql-reporting-services/

      Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

      H 1 Reply Last reply
      0
      • M Michael Sync

        I think that i faced that kind of problems once. It could be two reasons. 1. You put the databinding function in wrong place. 2. You may need to add some unique keys for getting the latest result. This is the reason probably for you. When I was using SQL Reporting Service in ASP.NET project, I faced the same problem that I was not able to get the latest data for my report even I passed the correct parameter. Then, the solution was that I add the unique key (eg: timestamp) as paramenter to my report. Whenever I generate the report, i used to pass this timestamp value as a paramenter to report. Then, i got the latest result.. You may read for the problem and solution that I said above in this link. http://michaelsync.net/2007/05/13/tipstricks-aspnet-with-sql-reporting-services/

        Thanks and Regards, Michael Sync ( Blog: http://michaelsync.net)

        H Offline
        H Offline
        Hyland Computer Systems
        wrote on last edited by
        #3

        Michael: Thanks for the quick response. If I understand you correctly, what you are implying that I should do is something like the following. Let's say that a portion of my SelectCommand of the SqlDataSource looks like so (this is Oracle P-SQL): "..... where EXTRACT( MONTH from mh.historydatetime) = :MONTH_ID" Now, the bind-variable comes from the SelectedIndex of the drop down combo box. What you are saying to do, in essence is something like the following: "..... where EXTRACT( MONTH from mh.historydatetime) = :MONTH_ID AND :TIMESTAMP_INFO = :SUBMIT_TIME" That sounds quite difficult. For one: how do I put the timestamp info into a variable? Secondly, what is the logic behind this? As long as a different month is selected from the drop down, it should use the new data, right? Regards, Rob

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups