Visual Basic 6 Data Report Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Me

    Visual Basic 6 Data Report Question

    Hi all,

    I have an app in which I need to create a packing slip. I have designed in
    report designer. The data is pulled from a SQL database. My question is
    how can I put information from the data base into the Page Header?
    The way I have it setup right now the PageHeader contains the logo, title,
    address. All of which are fine. Then under that I need to put the ship to
    and bill to addresses, which are pulled from the data base. Then under that
    I need to have the column headings for item number, qty ordered, etc...
    These column headings are just labels. The packing slips are usually more
    than one page. Because I had to put data from the database above the
    headings I have had to put the headings into the detail section. That means
    they only print on page 1. I would like them to print on subsequent pages.
    The way I see this working I would need to have the page header somehow
    include the ship to and bill to information. Any idea's? Am I making
    sense?

    Thanks for any help you can provide.



  • Veign

    #2
    Re: Visual Basic 6 Data Report Question

    You have to use the Sections collection to get the header section and then
    the Controls collection to change the controls caption or text.

    like:
    drMyReport.Sect ions("Section4" ).Controls("lbl MyLabel").Capti on = "Hello
    World"

    Where:
    drMyReport is your Data Report
    Section4 is the section where the controls you want to change reside
    lblMyCaption is the name of the control you want to alter

    --
    Chris Hanscom - Microsoft MVP (VB)
    Veign, Columbia. 119 likes. A South Carolina development company whose primary focus is to leverage the power of machine learning to better understand your data. From image and object detection to...

    --

    "Me" <you@me.com> wrote in message news:QKGdne3AY_ 0viD_cRVn-iA@rogers.com.. .[color=blue]
    > Hi all,
    >
    > I have an app in which I need to create a packing slip. I have designed[/color]
    in[color=blue]
    > report designer. The data is pulled from a SQL database. My question is
    > how can I put information from the data base into the Page Header?
    > The way I have it setup right now the PageHeader contains the logo, title,
    > address. All of which are fine. Then under that I need to put the ship[/color]
    to[color=blue]
    > and bill to addresses, which are pulled from the data base. Then under[/color]
    that[color=blue]
    > I need to have the column headings for item number, qty ordered, etc...
    > These column headings are just labels. The packing slips are usually more
    > than one page. Because I had to put data from the database above the
    > headings I have had to put the headings into the detail section. That[/color]
    means[color=blue]
    > they only print on page 1. I would like them to print on subsequent[/color]
    pages.[color=blue]
    > The way I see this working I would need to have the page header somehow
    > include the ship to and bill to information. Any idea's? Am I making
    > sense?
    >
    > Thanks for any help you can provide.
    >
    >
    >[/color]


    Comment

    • Me

      #3
      Re: Visual Basic 6 Data Report Question

      Thank you very much! I haven't done it yet but I am very appreciative of
      your quick response. I have searched google for weeks looking for this.
      "Veign" <me@home.com> wrote in message
      news:BAsod.9902 $Qh3.2785@newsr ead3.news.atl.e arthlink.net...[color=blue]
      > You have to use the Sections collection to get the header section and then
      > the Controls collection to change the controls caption or text.
      >
      > like:
      > drMyReport.Sect ions("Section4" ).Controls("lbl MyLabel").Capti on = "Hello
      > World"
      >
      > Where:
      > drMyReport is your Data Report
      > Section4 is the section where the controls you want to change reside
      > lblMyCaption is the name of the control you want to alter
      >
      > --
      > Chris Hanscom - Microsoft MVP (VB)
      > http://www.veign.com
      > --
      >
      > "Me" <you@me.com> wrote in message
      > news:QKGdne3AY_ 0viD_cRVn-iA@rogers.com.. .[color=green]
      >> Hi all,
      >>
      >> I have an app in which I need to create a packing slip. I have designed[/color]
      > in[color=green]
      >> report designer. The data is pulled from a SQL database. My question is
      >> how can I put information from the data base into the Page Header?
      >> The way I have it setup right now the PageHeader contains the logo,
      >> title,
      >> address. All of which are fine. Then under that I need to put the ship[/color]
      > to[color=green]
      >> and bill to addresses, which are pulled from the data base. Then under[/color]
      > that[color=green]
      >> I need to have the column headings for item number, qty ordered, etc...
      >> These column headings are just labels. The packing slips are usually
      >> more
      >> than one page. Because I had to put data from the database above the
      >> headings I have had to put the headings into the detail section. That[/color]
      > means[color=green]
      >> they only print on page 1. I would like them to print on subsequent[/color]
      > pages.[color=green]
      >> The way I see this working I would need to have the page header somehow
      >> include the ship to and bill to information. Any idea's? Am I making
      >> sense?
      >>
      >> Thanks for any help you can provide.
      >>
      >>
      >>[/color]
      >
      >[/color]


      Comment

      • Me

        #4
        Re: Visual Basic 6 Data Report Question

        I tried it and it works great!! Move over Spiderman you are my new
        superhero. Why is this information so hard to find?

        "Veign" <me@home.com> wrote in message
        news:BAsod.9902 $Qh3.2785@newsr ead3.news.atl.e arthlink.net...[color=blue]
        > You have to use the Sections collection to get the header section and then
        > the Controls collection to change the controls caption or text.
        >
        > like:
        > drMyReport.Sect ions("Section4" ).Controls("lbl MyLabel").Capti on = "Hello
        > World"
        >
        > Where:
        > drMyReport is your Data Report
        > Section4 is the section where the controls you want to change reside
        > lblMyCaption is the name of the control you want to alter
        >
        > --
        > Chris Hanscom - Microsoft MVP (VB)
        > http://www.veign.com
        > --
        >
        > "Me" <you@me.com> wrote in message
        > news:QKGdne3AY_ 0viD_cRVn-iA@rogers.com.. .[color=green]
        >> Hi all,
        >>
        >> I have an app in which I need to create a packing slip. I have designed[/color]
        > in[color=green]
        >> report designer. The data is pulled from a SQL database. My question is
        >> how can I put information from the data base into the Page Header?
        >> The way I have it setup right now the PageHeader contains the logo,
        >> title,
        >> address. All of which are fine. Then under that I need to put the ship[/color]
        > to[color=green]
        >> and bill to addresses, which are pulled from the data base. Then under[/color]
        > that[color=green]
        >> I need to have the column headings for item number, qty ordered, etc...
        >> These column headings are just labels. The packing slips are usually
        >> more
        >> than one page. Because I had to put data from the database above the
        >> headings I have had to put the headings into the detail section. That[/color]
        > means[color=green]
        >> they only print on page 1. I would like them to print on subsequent[/color]
        > pages.[color=green]
        >> The way I see this working I would need to have the page header somehow
        >> include the ship to and bill to information. Any idea's? Am I making
        >> sense?
        >>
        >> Thanks for any help you can provide.
        >>
        >>
        >>[/color]
        >
        >[/color]



        Comment

        • Veign

          #5
          Re: Visual Basic 6 Data Report Question

          Not common enough. The least a question is asked the harder it is to find
          an answer...

          Glad it worked for you..

          --
          Chris Hanscom - Microsoft MVP (VB)
          Veign's Resource Center

          --

          "Me" <you@me.com> wrote in message news:VM2dnWL3ed 3XSz7cRVn-hg@rogers.com.. .[color=blue]
          > I tried it and it works great!! Move over Spiderman you are my new
          > superhero. Why is this information so hard to find?
          >
          > "Veign" <me@home.com> wrote in message
          > news:BAsod.9902 $Qh3.2785@newsr ead3.news.atl.e arthlink.net...[color=green]
          > > You have to use the Sections collection to get the header section and[/color][/color]
          then[color=blue][color=green]
          > > the Controls collection to change the controls caption or text.
          > >
          > > like:
          > > drMyReport.Sect ions("Section4" ).Controls("lbl MyLabel").Capti on = "Hello
          > > World"
          > >
          > > Where:
          > > drMyReport is your Data Report
          > > Section4 is the section where the controls you want to change reside
          > > lblMyCaption is the name of the control you want to alter
          > >
          > > --
          > > Chris Hanscom - Microsoft MVP (VB)
          > > http://www.veign.com
          > > --
          > >
          > > "Me" <you@me.com> wrote in message
          > > news:QKGdne3AY_ 0viD_cRVn-iA@rogers.com.. .[color=darkred]
          > >> Hi all,
          > >>
          > >> I have an app in which I need to create a packing slip. I have[/color][/color][/color]
          designed[color=blue][color=green]
          > > in[color=darkred]
          > >> report designer. The data is pulled from a SQL database. My question[/color][/color][/color]
          is[color=blue][color=green][color=darkred]
          > >> how can I put information from the data base into the Page Header?
          > >> The way I have it setup right now the PageHeader contains the logo,
          > >> title,
          > >> address. All of which are fine. Then under that I need to put the[/color][/color][/color]
          ship[color=blue][color=green]
          > > to[color=darkred]
          > >> and bill to addresses, which are pulled from the data base. Then under[/color]
          > > that[color=darkred]
          > >> I need to have the column headings for item number, qty ordered, etc...
          > >> These column headings are just labels. The packing slips are usually
          > >> more
          > >> than one page. Because I had to put data from the database above the
          > >> headings I have had to put the headings into the detail section. That[/color]
          > > means[color=darkred]
          > >> they only print on page 1. I would like them to print on subsequent[/color]
          > > pages.[color=darkred]
          > >> The way I see this working I would need to have the page header somehow
          > >> include the ship to and bill to information. Any idea's? Am I making
          > >> sense?
          > >>
          > >> Thanks for any help you can provide.
          > >>
          > >>
          > >>[/color]
          > >
          > >[/color]
          >
          >
          >[/color]


          Comment

          Working...