Simple C# Question

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

    #1

    Simple C# Question

    I have a Microsoft Access report which I have automated
    using C#. When the report opens (via DoCmd.OpenRepor t) I
    am confronted with several prompts for parameters
    (example: "Please enter today's date"). What I would like
    to do is handle each and every one of these prompts
    programmaticall y with C#. Modifying the original Access
    report (with its related queries, etc.) is not an option.
    I just want to send values from my C# app to the MS
    Access parameter prompts, that's it. Any ideas?
  • Drebin

    #2
    Re: Simple C# Question

    lol :o) You should ask for your money back!!

    For this question, you might want to try an MSAccess group and find out how
    you'd normally send arguments and Access report..

    "Sam" <sam@nospam.net > wrote in message
    news:002201c36c be$df46a1c0$a50 1280a@phx.gbl.. .[color=blue]
    > Is anyone going to respond to my posting? Hello?
    >[color=green]
    > >-----Original Message-----
    > >I have a Microsoft Access report which I have automated
    > >using C#. When the report opens (via DoCmd.OpenRepor t) I
    > >am confronted with several prompts for parameters
    > >(example: "Please enter today's date"). What I would[/color]
    > like[color=green]
    > >to do is handle each and every one of these prompts
    > >programmatical ly with C#. Modifying the original Access
    > >report (with its related queries, etc.) is not an[/color]
    > option.[color=green]
    > >I just want to send values from my C# app to the MS
    > >Access parameter prompts, that's it. Any ideas?
    > >.
    > >[/color][/color]


    Comment

    • Sam

      #3
      Re: Simple C# Question

      I thought about doing that, but this really is a C#
      question. It's all about the C# DoCmd.OpenRepor t syntax.
      [color=blue]
      >-----Original Message-----
      >lol :o) You should ask for your money back!!
      >
      >For this question, you might want to try an MSAccess[/color]
      group and find out how[color=blue]
      >you'd normally send arguments and Access report..
      >
      >"Sam" <sam@nospam.net > wrote in message
      >news:002201c36 cbe$df46a1c0$a5 01280a@phx.gbl. ..[color=green]
      >> Is anyone going to respond to my posting? Hello?
      >>[color=darkred]
      >> >-----Original Message-----
      >> >I have a Microsoft Access report which I have[/color][/color][/color]
      automated[color=blue][color=green][color=darkred]
      >> >using C#. When the report opens (via[/color][/color][/color]
      DoCmd.OpenRepor t) I[color=blue][color=green][color=darkred]
      >> >am confronted with several prompts for parameters
      >> >(example: "Please enter today's date"). What I would[/color]
      >> like[color=darkred]
      >> >to do is handle each and every one of these prompts
      >> >programmatical ly with C#. Modifying the original[/color][/color][/color]
      Access[color=blue][color=green][color=darkred]
      >> >report (with its related queries, etc.) is not an[/color]
      >> option.[color=darkred]
      >> >I just want to send values from my C# app to the MS
      >> >Access parameter prompts, that's it. Any ideas?
      >> >.
      >> >[/color][/color]
      >
      >
      >.
      >[/color]

      Comment

      • Jon Skeet

        #4
        Re: Simple C# Question

        Sam <sam@nospam.net > wrote:[color=blue]
        > I thought about doing that, but this really is a C#
        > question. It's all about the C# DoCmd.OpenRepor t syntax.[/color]

        Strictly speaking, that's not a C# question at all. C# is a language,
        not a platform.

        It's either a general .NET question, or (more specifically) a question
        about the specific class you're using. (I can't find any methods called
        OpenReport in MSDN, so I'm assuming it's a method in a specific Access
        class or the like, in which case a newsgroup dealing with that
        particular class would be a better bet.)

        --
        Jon Skeet - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        • Sam

          #5
          Re: Simple C# Question

          You must be referring to interop.DAO...I 'm referring to
          the interop.access namespace.
          [color=blue]
          >-----Original Message-----
          >I've only know the old DAO way of manipulating Access..[/color]
          what namespace is[color=blue]
          >DoCmd????
          >
          >"Sam" <sam@nospam.net > wrote in message
          >news:013701c36 ccd$7d841710$a6 01280a@phx.gbl. ..[color=green]
          >> I thought about doing that, but this really is a C#
          >> question. It's all about the C# DoCmd.OpenRepor t[/color][/color]
          syntax.[color=blue][color=green]
          >>[color=darkred]
          >> >-----Original Message-----
          >> >lol :o) You should ask for your money back!!
          >> >
          >> >For this question, you might want to try an MSAccess[/color]
          >> group and find out how[color=darkred]
          >> >you'd normally send arguments and Access report..
          >> >
          >> >"Sam" <sam@nospam.net > wrote in message
          >> >news:002201c36 cbe$df46a1c0$a5 01280a@phx.gbl. ..
          >> >> Is anyone going to respond to my posting? Hello?
          >> >>
          >> >> >-----Original Message-----
          >> >> >I have a Microsoft Access report which I have[/color]
          >> automated[color=darkred]
          >> >> >using C#. When the report opens (via[/color]
          >> DoCmd.OpenRepor t) I[color=darkred]
          >> >> >am confronted with several prompts for parameters
          >> >> >(example: "Please enter today's date"). What I[/color][/color][/color]
          would[color=blue][color=green][color=darkred]
          >> >> like
          >> >> >to do is handle each and every one of these prompts
          >> >> >programmatical ly with C#. Modifying the original[/color]
          >> Access[color=darkred]
          >> >> >report (with its related queries, etc.) is not an
          >> >> option.
          >> >> >I just want to send values from my C# app to the MS
          >> >> >Access parameter prompts, that's it. Any ideas?
          >> >> >.
          >> >> >
          >> >
          >> >
          >> >.
          >> >[/color][/color]
          >
          >
          >.
          >[/color]

          Comment

          • Jon Skeet

            #6
            Re: Simple C# Question

            Sam <sam@nospam.net > wrote:[color=blue]
            > You must be referring to interop.DAO...I 'm referring to
            > the interop.access namespace.[/color]

            That definitely sounds like it's a question for an Access newsgroup
            then.

            --
            Jon Skeet - <skeet@pobox.co m>
            Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

            If replying to the group, please do not mail me too

            Comment

            • Jo

              #7
              Re: Simple C# Question

              I used to get those problems when I was using VB or delphi to use access.
              Just means that your report is written without taking into account the
              integrity of you data that you are trying to display. if you Dbl click the
              report in Access you should not get any pompts to enter something that it
              needs to do some computation.
              A report in access is simply a reflection/view of your data in the "pseudo"
              database. (I call Access MDB's pseudo databases for obvious reasons...)

              To answer your question : and this is how I got around it.
              Set up a temp table and reference that from your report to get the values
              you need.
              populate the temp table before calling the report from c# and the clear the
              table when you are done.

              hope it helps


              "Sam" <sam@nospam.net > wrote in message
              news:0eaa01c36c af$bac73580$a40 1280a@phx.gbl.. .[color=blue]
              > I have a Microsoft Access report which I have automated
              > using C#. When the report opens (via DoCmd.OpenRepor t) I
              > am confronted with several prompts for parameters
              > (example: "Please enter today's date"). What I would like
              > to do is handle each and every one of these prompts
              > programmaticall y with C#. Modifying the original Access
              > report (with its related queries, etc.) is not an option.
              > I just want to send values from my C# app to the MS
              > Access parameter prompts, that's it. Any ideas?[/color]


              Comment

              • Sam

                #8
                Re: Simple C# Question

                Jo,

                Thanks for responding. Unfortunately, everyone seems to
                be missing the whole point of my post. I need to
                programmaticall y handle an application's dialog boxes (in
                this case, it just happens to be MS Access). I need to
                take data (stored in variables in the C# code) and
                programmaticall y pass it to these dialog boxes. Then, I
                need to programmaticall y click "ok" on these dialog
                boxes. I find it hard to believe that this is so
                complicated. There's C# code to open an Access DB.
                There's C# code to open an Access report. Why can't there
                be code to handle a simple Access dialog/input box???
                [color=blue]
                >-----Original Message-----
                >I used to get those problems when I was using VB or[/color]
                delphi to use access.[color=blue]
                >Just means that your report is written without taking[/color]
                into account the[color=blue]
                >integrity of you data that you are trying to display. if[/color]
                you Dbl click the[color=blue]
                >report in Access you should not get any pompts to enter[/color]
                something that it[color=blue]
                >needs to do some computation.
                >A report in access is simply a reflection/view of your[/color]
                data in the "pseudo"[color=blue]
                >database. (I call Access MDB's pseudo databases for[/color]
                obvious reasons...)[color=blue]
                >
                >To answer your question : and this is how I got around[/color]
                it.[color=blue]
                >Set up a temp table and reference that from your report[/color]
                to get the values[color=blue]
                >you need.
                >populate the temp table before calling the report from[/color]
                c# and the clear the[color=blue]
                >table when you are done.
                >
                >hope it helps
                >
                >
                >"Sam" <sam@nospam.net > wrote in message
                >news:0eaa01c36 caf$bac73580$a4 01280a@phx.gbl. ..[color=green]
                >> I have a Microsoft Access report which I have automated
                >> using C#. When the report opens (via DoCmd.OpenRepor t)[/color][/color]
                I[color=blue][color=green]
                >> am confronted with several prompts for parameters
                >> (example: "Please enter today's date"). What I would[/color][/color]
                like[color=blue][color=green]
                >> to do is handle each and every one of these prompts
                >> programmaticall y with C#. Modifying the original Access
                >> report (with its related queries, etc.) is not an[/color][/color]
                option.[color=blue][color=green]
                >> I just want to send values from my C# app to the MS
                >> Access parameter prompts, that's it. Any ideas?[/color]
                >
                >
                >.
                >[/color]

                Comment

                Working...