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. Visual Basic
  4. Crystal Reports Custom Parameter Passing

Crystal Reports Custom Parameter Passing

Scheduled Pinned Locked Moved Visual Basic
comtutorialquestion
9 Posts 3 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.
  • J Offline
    J Offline
    JC KaNNaN
    wrote on last edited by
    #1

    hi, how to add two different parameter field(two diff table) in crystal report?

    Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

    K A 2 Replies Last reply
    0
    • J JC KaNNaN

      hi, how to add two different parameter field(two diff table) in crystal report?

      Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

      K Offline
      K Offline
      Kschuler
      wrote on last edited by
      #2

      Are you asking how to pass in a parameter into a crystal report (in the .vb code)? If so, it would be something like this: ReportDocument1.SetParameterValue("MyParmName", "MyParmValue") Or are you asking how to setup the parameter in the crystal report document itself (the .rpt file)? If so, in the field explorer right click on parameter fields and then click new. Give your parm a name and data type. Or are you asking how to input more than one table? A table isn't a parameter. If you want more than one table you have to put the tables into a DataSet object and pass the DataSet object in as the DataSource. Hope this helps.

      J 1 Reply Last reply
      0
      • J JC KaNNaN

        hi, how to add two different parameter field(two diff table) in crystal report?

        Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

        A Offline
        A Offline
        Aiman Farouk Mohamed
        wrote on last edited by
        #3

        Mr. Kannan: your question is not clear . Do you want to add these parameters in the report from the crystal report designer or what? if so, you can do this using field explorer in the left part of the report you will find field explorer and inside it parameter fields right click on it and click new for adding new parameter. Regards Aiman Farouk

        1 Reply Last reply
        0
        • K Kschuler

          Are you asking how to pass in a parameter into a crystal report (in the .vb code)? If so, it would be something like this: ReportDocument1.SetParameterValue("MyParmName", "MyParmValue") Or are you asking how to setup the parameter in the crystal report document itself (the .rpt file)? If so, in the field explorer right click on parameter fields and then click new. Give your parm a name and data type. Or are you asking how to input more than one table? A table isn't a parameter. If you want more than one table you have to put the tables into a DataSet object and pass the DataSet object in as the DataSource. Hope this helps.

          J Offline
          J Offline
          JC KaNNaN
          wrote on last edited by
          #4

          ya im asking about 3rd one...

          Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

          K 1 Reply Last reply
          0
          • J JC KaNNaN

            ya im asking about 3rd one...

            Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

            K Offline
            K Offline
            Kschuler
            wrote on last edited by
            #5

            Do you still have a question or have you figured it out? The basic format is something like this:

            Dim dtTable1 as New DataTable
            Dim dtTable2 as New DataTable

            'This code declares a dataset and adds the tables:
            Dim ds as New DataSet
            ds.Tables.Add(dtTable1)
            ds.Tables.Add(dtTable2)

            'This code attaches the dataset to the crystal report:
            reportDocument1.SetDataSource(ds)

            J 1 Reply Last reply
            0
            • K Kschuler

              Do you still have a question or have you figured it out? The basic format is something like this:

              Dim dtTable1 as New DataTable
              Dim dtTable2 as New DataTable

              'This code declares a dataset and adds the tables:
              Dim ds as New DataSet
              ds.Tables.Add(dtTable1)
              ds.Tables.Add(dtTable2)

              'This code attaches the dataset to the crystal report:
              reportDocument1.SetDataSource(ds)

              J Offline
              J Offline
              JC KaNNaN
              wrote on last edited by
              #6

              sorry im new in crystal report.. plz write step by step...

              Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

              K 1 Reply Last reply
              0
              • J JC KaNNaN

                sorry im new in crystal report.. plz write step by step...

                Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

                K Offline
                K Offline
                Kschuler
                wrote on last edited by
                #7

                I'm not sure how much more step by step I can get than what I wrote before. Why don't you try reading some articles on the subject to get familiar with the concepts and then play with it a bit. Here are a few articles I found on CP that might help you: How to use Crystal Report in your project?[^] Generate a Crystal Reports report without a database[^] Crystal Report Basics and Integration with DataSet[^] Hope this helps.

                J 1 Reply Last reply
                0
                • K Kschuler

                  I'm not sure how much more step by step I can get than what I wrote before. Why don't you try reading some articles on the subject to get familiar with the concepts and then play with it a bit. Here are a few articles I found on CP that might help you: How to use Crystal Report in your project?[^] Generate a Crystal Reports report without a database[^] Crystal Report Basics and Integration with DataSet[^] Hope this helps.

                  J Offline
                  J Offline
                  JC KaNNaN
                  wrote on last edited by
                  #8

                  hi, i know what u said.. but i need solution for only using morethan one tables in crystal report.. and how to pass two different parameter field(ie. two diff table) in crystal report.. still now i didnt get anything... very urgent.. plz

                  Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

                  K 1 Reply Last reply
                  0
                  • J JC KaNNaN

                    hi, i know what u said.. but i need solution for only using morethan one tables in crystal report.. and how to pass two different parameter field(ie. two diff table) in crystal report.. still now i didnt get anything... very urgent.. plz

                    Yours, KaNNaN ----------------------------------------------------------------- "Success is When Ur Signature Becomes An Autograph" Mail To : foreverkans@gmail.com

                    K Offline
                    K Offline
                    Kschuler
                    wrote on last edited by
                    #9

                    What I gave you earlier IS the solution for passing more than one table: In order to pass in two tables, you need to use a DataSet object. This is how you declare one named ds: Dim ds as New DataSet Then you have to add your tables to it. If your tables are called dtTable1 and dtTable2, this is how you would add them to the DataSet ds.Tables.Add(dtTable1) ds.Tables.Add(dtTable2) Then you pass the DataSet into the reportDocument object, like this: reportDocument1.SetDataSource(ds) If this code isn't working for you, you're going to have to give me more information about why it isn't working and what error messages you are getting.

                    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