Change report chart type ad runtime.

Discussion in 'ASP .Net Web Controls' started by Arturo Buonanni, Jul 27, 2006.

  1. Hello,

    I'd like to show users of my web application some charts allowing them
    to chose the chart type at run-time.
    I'm building the rdlc report source at run-time starting from a
    template and working in memory.
    Users can select wich rows and columns from a table to display in the
    chart. They can also chose che chart type (Bar, line, pie etc.)

    Now the code works fine the first time it's run. Then the report
    viewer keeps showing the chart with the same chart type and columns
    data. Only rows change accordingly to the user selection.

    I'm using the following code to initialize the reportviewer:

    Dim str As System.IO.MemoryStream = New MemoryStream
    rptDoc.Save(str) //->that's the xml doc being saved to a memory stream
    str.Position = 0
    repView.LocalReport.ReportPath = String.Empty 'Just in case...
    repView.LocalReport.LoadReportDefinition(str)
    repView.LocalReport.DataSources.Clear() 'Just in case again...
    repView.LocalReport.DataSources.Add(New _
    ReportDataSource("DataSet1_01E01000", dt2))
    repView.LocalReport.Refresh()

    Any suggestion?

    Thank you all.
    Arturo Buonanni, Jul 27, 2006
    #1
    1. Advertising

  2. Arturo Buonanni

    marich3lle Guest

    Hi,
    Did you figure it out? I'm trying to figure out how to allow users to select the columns to report on as well and need some ideas on how to implement this. Thanks.
    marich3lle, Aug 10, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. michael
    Replies:
    0
    Views:
    3,695
    michael
    Jun 9, 2004
  2. RSH

    Change control type at runtime

    RSH, Jan 11, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    606
  3. gnewsgroup
    Replies:
    4
    Views:
    3,005
    Kevin Spencer
    Feb 6, 2008
  4. JimC
    Replies:
    0
    Views:
    334
  5. Tarek
    Replies:
    6
    Views:
    311
    Chris Hohmann
    Nov 19, 2004
Loading...

Share This Page