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. Database & SysAdmin
  3. Database
  4. How to add Dynamic Colunms in a report

How to add Dynamic Colunms in a report

Scheduled Pinned Locked Moved Database
tutorialcsharpvisual-studiosales
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.
  • B Offline
    B Offline
    Bonginkoci
    wrote on last edited by
    #1

    I am new in visual studio and i want to know if it is possible to make some colunms on a report to be dynamic so as to allow a user input for a example i have created this report called: Sales Report this is how my Sales Report looks likes. SalesCountry CurrentMonthSales PriorMonthSales Australia 592.809 619.855 England 270.132 546.596 China 186.928 154.576 As seen above in this report, i want to make CurrentMonthSales,PriorMonthSales colunms dynamic so to allow user input because these fields changes dynamically according to user's criteria.A user may want to view current monthsales of December instead of November.

    S 1 Reply Last reply
    0
    • B Bonginkoci

      I am new in visual studio and i want to know if it is possible to make some colunms on a report to be dynamic so as to allow a user input for a example i have created this report called: Sales Report this is how my Sales Report looks likes. SalesCountry CurrentMonthSales PriorMonthSales Australia 592.809 619.855 England 270.132 546.596 China 186.928 154.576 As seen above in this report, i want to make CurrentMonthSales,PriorMonthSales colunms dynamic so to allow user input because these fields changes dynamically according to user's criteria.A user may want to view current monthsales of December instead of November.

      S Offline
      S Offline
      SilimSayo
      wrote on last edited by
      #2

      I don't think you need dynamic columns. From your descriptions, the columns are fixed i.e. they are SalesCountry, CurrentMonthSales, and PriorMonthsSales. What you need is a dynamic report i.e. data is provided to the report depending on some input criteria. Assuming you are using SQL Server as the database, you need to create a stored procedure that takes a parameter for the current period, then it returns data to your report using those 3 columns. So, the data is dynamic but the columns are fixed. Since you don't specify what report engine or database you're using, I can't be more specific.

      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