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. Dynamic Crystal Reports

Dynamic Crystal Reports

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadminhelptutorial
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.
  • S Offline
    S Offline
    SatishKrishnaExcel
    wrote on last edited by
    #1

    Hi Techs, I searched the whole day for this. I didn't get any help from anyone nor there is anything in net. I can find so many queries on this but nobody has replied. This is a perfect requirement of industry. I don't have any of how to carry about this. Here is my Question =================== I wanted to create Crystal report dynamically(preferably Crosstab) and add Columns(Fields) at run time to report from code behind. I am using CrystalReportViewer to show the Report. Backend is Ms-Sql Server 2000. Any method to add columns to Report & display. Any kind of Sample is appreciated. Sample Code Plz Thanks in advance Satish Krishna M satishkrishna

    A 1 Reply Last reply
    0
    • S SatishKrishnaExcel

      Hi Techs, I searched the whole day for this. I didn't get any help from anyone nor there is anything in net. I can find so many queries on this but nobody has replied. This is a perfect requirement of industry. I don't have any of how to carry about this. Here is my Question =================== I wanted to create Crystal report dynamically(preferably Crosstab) and add Columns(Fields) at run time to report from code behind. I am using CrystalReportViewer to show the Report. Backend is Ms-Sql Server 2000. Any method to add columns to Report & display. Any kind of Sample is appreciated. Sample Code Plz Thanks in advance Satish Krishna M satishkrishna

      A Offline
      A Offline
      Arvind B
      wrote on last edited by
      #2

      >design report in report expert >give a name to u r report e.g. rptMain wtite code like this dim rDoc as new rptMain() '--now build a data table / data reader object '--i guess u r familiar with that '--the datatable must return same columns as defined in report at design time '--**this way u can bypass logininfo of sql server** Dim tb as datatable = myMethodOfPopulatingIt() rDoc.SetDataSource(tb) '--bind to cr viewer myCrViewer.ReportSource = rDoc hope this helps

      S 1 Reply Last reply
      0
      • A Arvind B

        >design report in report expert >give a name to u r report e.g. rptMain wtite code like this dim rDoc as new rptMain() '--now build a data table / data reader object '--i guess u r familiar with that '--the datatable must return same columns as defined in report at design time '--**this way u can bypass logininfo of sql server** Dim tb as datatable = myMethodOfPopulatingIt() rDoc.SetDataSource(tb) '--bind to cr viewer myCrViewer.ReportSource = rDoc hope this helps

        S Offline
        S Offline
        SatishKrishnaExcel
        wrote on last edited by
        #3

        Hi arv, Thanks for reply. But what I am looking out for is somewhat different. I wanted to add new columns to reports at runtime. Let's say there are no columns added to reports at design time. At runtime I wanted to add few columns(say 3 Columns) at first execution. May be in the second execution I wanted 5 Columns. This way it may keep varying every time. Is there anyway that we can do it. Hope my requirement is clear. satishkrishna

        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