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. General Programming
  3. C#
  4. Crystal Report Problem with multiple DataTables (It is urgent)

Crystal Report Problem with multiple DataTables (It is urgent)

Scheduled Pinned Locked Moved C#
helpdatabase
1 Posts 1 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.
  • S Offline
    S Offline
    sharad Pyakurel
    wrote on last edited by
    #1

    Hi, I have CrystalActiveXReportViewerLib11_5.dll for my application. I have used a typed Dataset. In this DataSet there are two DataTables DataTable1 and DataTable2. DataTable1 is used for main report and DataTable2 is for SubReport. When i set DataSource for both DataTable i got a problem. For only one dataTable it is ok. Any help for this problem is appreciated. It is urgent. My code is like this: DataTable dtt1 = LoadDataTable(); DataTable dtt2 = LoadFriendDataTable(); CRAXDDRT.Application crxApp = new CRAXDDRT.Application(); CRAXDDRT.Report crxReport = new CRAXDDRT.Report(); crxReport = crxApp.OpenReport(Application.StartupPath+"\\rptHouseLandTaxLetter.rpt",null); crxReport.Database.Tables[1].SetDataSource(dtt1, null); //crxReport.Database.Tables[2].SetDataSource(dtt2, null); //error occurred here this.crViewer.ReportSource = crReport; this.crViewer.ViewReport(); private DataTable LoadDataTable() { CrystalReportTest1.DataSet1.DataTable1DataTable dtReport = new DataSet1.DataTable1DataTable(); foreach (DataRow dr in dt.Rows) { dtReport.Rows.Add(dr.ItemArray); } return dtReport; } private DataTable LoadFriendDataTable() { CrystalReportTest1.DataSet1.DataTable2DataTable frienddt = new DataSet1.DataTable2DataTable(); foreach (DataRow dr in dt.Rows) { frienddt.Rows.Add(dr.ItemArray); } return frienddt; }

    modified on Wednesday, June 10, 2009 12:59 AM

    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