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

Reports

Scheduled Pinned Locked Moved C#
csharpdatabasevisual-studiotutorialquestion
6 Posts 4 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
    Slick69
    wrote on last edited by
    #1

    Okay.. Here is my question! I want to generate reports using crystal report or any other reporting feature that works in visual studio 2005 (using C-sharp). now the trick is, i want the user to be able to define what they would like in their report(without them actually writing the sql behind the report). for example lets say they they wanted to see a list of people with names starting with "G" according to how much they earned.. it should be able to do this. the user should just select options on the "form" and a report be generated.. thanks. :-\

    A D 2 Replies Last reply
    0
    • S Slick69

      Okay.. Here is my question! I want to generate reports using crystal report or any other reporting feature that works in visual studio 2005 (using C-sharp). now the trick is, i want the user to be able to define what they would like in their report(without them actually writing the sql behind the report). for example lets say they they wanted to see a list of people with names starting with "G" according to how much they earned.. it should be able to do this. the user should just select options on the "form" and a report be generated.. thanks. :-\

      A Offline
      A Offline
      AhsanS
      wrote on last edited by
      #2

      For this you need to pass parameters to your store procedure based on the users choice. And then based on that build your crystal report.

      Ahsan Ullah Senior Software Engineer

      S 1 Reply Last reply
      0
      • A AhsanS

        For this you need to pass parameters to your store procedure based on the users choice. And then based on that build your crystal report.

        Ahsan Ullah Senior Software Engineer

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

        hey.. ive created reports before but ive never had to pass parameter in a report.. can more than one parameter be passed? if its not too much to ask for you could you please just explain to me how to do this. Thanks. (sent the exact msg to your email, wasnt sure if you'd get it or not)

        A 1 Reply Last reply
        0
        • S Slick69

          hey.. ive created reports before but ive never had to pass parameter in a report.. can more than one parameter be passed? if its not too much to ask for you could you please just explain to me how to do this. Thanks. (sent the exact msg to your email, wasnt sure if you'd get it or not)

          A Offline
          A Offline
          AhsanS
          wrote on last edited by
          #4

          I am not asking you to pass parameter to report. I am asking to pass parameter to your query or storeprocedure which gives you the selected records based on the parameters.

          Ahsan Ullah Senior Software Engineer

          M 1 Reply Last reply
          0
          • A AhsanS

            I am not asking you to pass parameter to report. I am asking to pass parameter to your query or storeprocedure which gives you the selected records based on the parameters.

            Ahsan Ullah Senior Software Engineer

            M Offline
            M Offline
            Muammar
            wrote on last edited by
            #5

            After defining and opening your connection and creating your data adapter.. yourCommand.CommandType = CommandType.StoredProcedure; yourCommand.CommandText = "YourStoredProcedureName(ParameterValue1,ParameterValue2)"; yourCommand.ExecuteNonQuery();


            All generalizations are wrong, including this one! (\ /) (O.o) (><)

            1 Reply Last reply
            0
            • S Slick69

              Okay.. Here is my question! I want to generate reports using crystal report or any other reporting feature that works in visual studio 2005 (using C-sharp). now the trick is, i want the user to be able to define what they would like in their report(without them actually writing the sql behind the report). for example lets say they they wanted to see a list of people with names starting with "G" according to how much they earned.. it should be able to do this. the user should just select options on the "form" and a report be generated.. thanks. :-\

              D Offline
              D Offline
              darkelv
              wrote on last edited by
              #6

              Do you mean, the users are able to really define what they like to see in the report, or, do you mean, the users have pre-defined options to choose how to filter the data?? For the first case, many developers has been asked the same thing, and the answer is no, the user, unless they know how to use the report generation tool such as Crystal Report or SQL Reporting Service, and know the system, they can't "freely" generate any report that they like. For second case, you can pass value by parameters and have the report filter by these parameters, or in Crystal Report case, you can add the selection criteria to SelectionFormula that is formed by the user interface.

              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