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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. report viewer problem

report viewer problem

Scheduled Pinned Locked Moved C#
csharpvisual-studiowinformshelpquestion
2 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.
  • A Offline
    A Offline
    ali kanju2
    wrote on last edited by
    #1

    i m programatically building a datatable and populating that datatable with data from a text file.nw i m assigning that datatable to report viewer but report viewer is not showing any data.here is my code if (counter != 0) { for (int j = 0; j < counter-1; j++) { fieldValues = file.ReadLine().Split(new char[] { '\t' }); DataRow dr = dt.NewRow(); for (int i = 0; i < fieldValues.Length; i++) { dr[i] = fieldValues[i].ToString(); } dt.Rows.Add(dr); } } reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local; this.reportViewer1.LocalReport.ReportPath="C:\\Documents and Settings\\amohiuddin\\My Documents\\Visual Studio 2008\\Projects\\sample reporting application\\sample reporting application\\Report1.rdlc"; this.reportViewer1.LocalReport.ReportEmbeddedResource = "sample reporting.Report1.rdlc"; this.reportViewer1.LocalReport.DataSources.Clear(); reportViewer1.DocumentMapCollapsed = true; this.reportViewer1.DataBindings.Clear(); this.reportViewer1.LocalReport.DataSources.Add(rds); this.reportViewer1.Show(); this.reportViewer1.RefreshReport(); } can someone tell me what i m missing?

    N 1 Reply Last reply
    0
    • A ali kanju2

      i m programatically building a datatable and populating that datatable with data from a text file.nw i m assigning that datatable to report viewer but report viewer is not showing any data.here is my code if (counter != 0) { for (int j = 0; j < counter-1; j++) { fieldValues = file.ReadLine().Split(new char[] { '\t' }); DataRow dr = dt.NewRow(); for (int i = 0; i < fieldValues.Length; i++) { dr[i] = fieldValues[i].ToString(); } dt.Rows.Add(dr); } } reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local; this.reportViewer1.LocalReport.ReportPath="C:\\Documents and Settings\\amohiuddin\\My Documents\\Visual Studio 2008\\Projects\\sample reporting application\\sample reporting application\\Report1.rdlc"; this.reportViewer1.LocalReport.ReportEmbeddedResource = "sample reporting.Report1.rdlc"; this.reportViewer1.LocalReport.DataSources.Clear(); reportViewer1.DocumentMapCollapsed = true; this.reportViewer1.DataBindings.Clear(); this.reportViewer1.LocalReport.DataSources.Add(rds); this.reportViewer1.Show(); this.reportViewer1.RefreshReport(); } can someone tell me what i m missing?

      N Offline
      N Offline
      NarendraSinghJTV
      wrote on last edited by
      #2

      Try without refreshing the report at last, may be this will help you

      Regards Narendra Singh (Jindal Tech Ventures)

      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