Crystal Reports - Database Login dialog when using datasets

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

    #1

    Crystal Reports - Database Login dialog when using datasets

    I'm developing an VB.NET Windows Forms application that uses CR for VS.NET
    (original version shipped with VS.NET 2002 - my VS.NET has the latest SP
    installed, no SPs for CR).
    My reports get their data from ADO.NET Datasets that are pre-populated by
    other modules of the application.
    What I need to do is to use these datasets as the datasources of my reports.
    Fine, I know how to do that and it works perfectly on my development box.
    The trouble comes when I deploy the application on the client machine.
    I created a installation project in VS.NET, added the required CR merge
    modules, added the keycode, and it seems to install everything fine. But
    when it tries to show the reports in the CrystalReportVi ewer control, it
    pops-up the 'Database Login' dialog.
    Who is talking about database here? I'm already giving all the needed data.

    The reports were all created from typed datasets, using datasources of type
    ADO.NET(XML).
    It seems that a lot of people have the same problem but the only workaround
    so far appears to be "use only one DataTable inside your dataset, containing
    all the data you need". I'm trying not to have to resort to this approach
    because my datasets are very complex with many tables.
    What I've read in other similar posts is that it seems that CR gets lost
    when the dataset has more than one table

    Is this a confirmmed bug or am I missing something ?
    This is how my code looks like:

    reportDocument = new MyCustomReport( )
    reportDocument. SetDataSource(m yLoadedDataset)
    ReportViewerCon trol.ReportSour ce = reportDocument

    Thanks

    TJ!




  • Paul J. Barrett

    #2
    Re: Crystal Reports - Database Login dialog when using datasets

    The problem resides in the name of the table when you fill it. You must
    make sure that the name of the table is always the same. I got around
    this by using the Stored procedure name as the table name but then ran
    into the same problem you are having when I corrected a spelling mistake
    in the stored procedures name.

    sqlDAdapter1.Fi ll(myDataSet,"M yTable");

    Hope this helps. You can use the debugger to check the table name and
    compare it to the table name that you used in the crystal report.

    Sincerely,
    Paul J Barrett


    TJoker .NET wrote:
    [color=blue]
    > I'm developing an VB.NET Windows Forms application that uses CR for VS.NET
    > (original version shipped with VS.NET 2002 - my VS.NET has the latest SP
    > installed, no SPs for CR).
    > My reports get their data from ADO.NET Datasets that are pre-populated by
    > other modules of the application.
    > What I need to do is to use these datasets as the datasources of my reports.
    > Fine, I know how to do that and it works perfectly on my development box.
    > The trouble comes when I deploy the application on the client machine.
    > I created a installation project in VS.NET, added the required CR merge
    > modules, added the keycode, and it seems to install everything fine. But
    > when it tries to show the reports in the CrystalReportVi ewer control, it
    > pops-up the 'Database Login' dialog.
    > Who is talking about database here? I'm already giving all the needed data.
    >
    > The reports were all created from typed datasets, using datasources of type
    > ADO.NET(XML).
    > It seems that a lot of people have the same problem but the only workaround
    > so far appears to be "use only one DataTable inside your dataset, containing
    > all the data you need". I'm trying not to have to resort to this approach
    > because my datasets are very complex with many tables.
    > What I've read in other similar posts is that it seems that CR gets lost
    > when the dataset has more than one table
    >
    > Is this a confirmmed bug or am I missing something ?
    > This is how my code looks like:
    >
    > reportDocument = new MyCustomReport( )
    > reportDocument. SetDataSource(m yLoadedDataset)
    > ReportViewerCon trol.ReportSour ce = reportDocument
    >
    > Thanks
    >
    > TJ!
    >
    >
    >
    >[/color]

    Comment

    • TJoker .NET

      #3
      Re: Crystal Reports - Database Login dialog when using datasets

      I created a small sample project that reproduces the error and making it
      available on the following url:



      In the zip file there are two projects.. one for the test application and
      one for the Setup.
      What I in my test application was
      - Defined a typed ADO.NET dataset (DataSet1.xsd)
      - Created a report (CrystalReport1 .rpt)
      - Created some menus options:
      - one to load the data from a Database server (northwind
      database) into a dataset of type DataSet1
      - one to create a report of type CrystalReport1 and bind that
      dataset the report
      - one to save the dataset's xml to C:\
      - one to load the dataset with XML from C:\ and show the report

      I ran this app in my local development box (where weverything always
      works), loaded the dataset from the database, viewed the report, and saved
      the XML to a file in c:\. Later I ran the application again and loaded the
      XML from C:\. All that worked perfectly.
      Then I built the installation, and installed on the client machine. Then I
      put that XML file in its C:\ and tried to, ran the app and tried to load the
      using the menu option.. Boom! Same "Database Login" screen...

      Could anyone please verify my sample project and possibly try to reproduce
      this ? Something could be missing from the deployment documentation, which I
      read and I am following thoroughly.

      By the way, I forgot to also mention that the user executing the application
      is always the administrator of the computer, so this shouldn't be any
      permissions problem.

      Thanks for the help.

      TJ


      "Paul J. Barrett" <paulnodarnspam @nospamcoderjun to.com> wrote in message
      news:3f33c93b$1 @la-news-01....[color=blue]
      > The problem resides in the name of the table when you fill it. You must
      > make sure that the name of the table is always the same. I got around
      > this by using the Stored procedure name as the table name but then ran
      > into the same problem you are having when I corrected a spelling mistake
      > in the stored procedures name.
      >
      > sqlDAdapter1.Fi ll(myDataSet,"M yTable");
      >
      > Hope this helps. You can use the debugger to check the table name and
      > compare it to the table name that you used in the crystal report.
      >
      > Sincerely,
      > Paul J Barrett
      >
      >
      > TJoker .NET wrote:
      >[color=green]
      > > I'm developing an VB.NET Windows Forms application that uses CR for[/color][/color]
      VS.NET[color=blue][color=green]
      > > (original version shipped with VS.NET 2002 - my VS.NET has the latest SP
      > > installed, no SPs for CR).
      > > My reports get their data from ADO.NET Datasets that are pre-populated[/color][/color]
      by[color=blue][color=green]
      > > other modules of the application.
      > > What I need to do is to use these datasets as the datasources of my[/color][/color]
      reports.[color=blue][color=green]
      > > Fine, I know how to do that and it works perfectly on my development[/color][/color]
      box.[color=blue][color=green]
      > > The trouble comes when I deploy the application on the client machine.
      > > I created a installation project in VS.NET, added the required CR merge
      > > modules, added the keycode, and it seems to install everything fine. But
      > > when it tries to show the reports in the CrystalReportVi ewer control, it
      > > pops-up the 'Database Login' dialog.
      > > Who is talking about database here? I'm already giving all the needed[/color][/color]
      data.[color=blue][color=green]
      > >
      > > The reports were all created from typed datasets, using datasources of[/color][/color]
      type[color=blue][color=green]
      > > ADO.NET(XML).
      > > It seems that a lot of people have the same problem but the only[/color][/color]
      workaround[color=blue][color=green]
      > > so far appears to be "use only one DataTable inside your dataset,[/color][/color]
      containing[color=blue][color=green]
      > > all the data you need". I'm trying not to have to resort to this[/color][/color]
      approach[color=blue][color=green]
      > > because my datasets are very complex with many tables.
      > > What I've read in other similar posts is that it seems that CR gets lost
      > > when the dataset has more than one table
      > >
      > > Is this a confirmmed bug or am I missing something ?
      > > This is how my code looks like:
      > >
      > > reportDocument = new MyCustomReport( )
      > > reportDocument. SetDataSource(m yLoadedDataset)
      > > ReportViewerCon trol.ReportSour ce = reportDocument
      > >
      > > Thanks
      > >
      > > TJ!
      > >
      > >
      > >
      > >[/color]
      >[/color]


      Comment

      • K. Shier

        #4
        Re: Crystal Reports - Database Login dialog when using datasets

        you have my sympathy.

        "TJoker .NET" <nospam@nonono. no> wrote in message
        news:u5ry7IcXDH A.536@TK2MSFTNG P10.phx.gbl...[color=blue]
        > I am in contact with CrystalDecision s support (through that dreaded Answer
        > by email system)[/color]


        Comment

        • Jeremy Cowles

          #5
          Re: Crystal Reports - Database Login dialog when using datasets

          I can't see your orriginal question, but to suppress the DB Login dialog I
          had to explicitly set the login info for every connection at the time when
          the report was loaded. That was the only way I could do it.

          HTH,
          Jeremy



          "K. Shier" <ks4hire@spamAt YourOwnRisk.yah oo.com> wrote in message
          news:egV4zQZZDH A.1620@TK2MSFTN GP12.phx.gbl...[color=blue]
          > you have my sympathy.
          >
          > "TJoker .NET" <nospam@nonono. no> wrote in message
          > news:u5ry7IcXDH A.536@TK2MSFTNG P10.phx.gbl...[color=green]
          > > I am in contact with CrystalDecision s support (through that dreaded[/color][/color]
          Answer[color=blue][color=green]
          > > by email system)[/color]
          >
          >
          >[/color]

          Comment

          • TJoker .NET

            #6
            Re: Crystal Reports - Database Login dialog when using datasets

            Got it to work!!!!!!!!!

            After using a more decent support account (my company bought Crystal
            Enterprise Server) I was able to chat with the "real people" support.
            After messing aroung with try and error procedures, we figured out the
            obvious, the version of some of the dlls were mixed.
            The funny thing is that it was mixed because I had downloaded their very own
            update for the merge modules:

            modules_en.zip. asp
            But, fear not! Now you can download this update with confidence because it
            has been fixed, although they did not correct the publishing date. This
            update has been corrected after 8/6/2003 (when I downloaded it) but the
            website did not make clear that there was a new version available.
            I just downloaded the new version, installed, recompiled my setup, ran in
            the client box and it worked!

            Thanks fr anyone following this thread.

            TJ

            "TJoker .NET" <nospam@nonono. no> wrote in message
            news:eN9rRVeXDH A.656@tk2msftng p13.phx.gbl...[color=blue]
            > I created a small sample project that reproduces the error and making it
            > available on the following url:
            >
            > http://sergiopereira.com/temp/test_crystal.zip
            >
            > In the zip file there are two projects.. one for the test application and
            > one for the Setup.
            > What I in my test application was
            > - Defined a typed ADO.NET dataset (DataSet1.xsd)
            > - Created a report (CrystalReport1 .rpt)
            > - Created some menus options:
            > - one to load the data from a Database server (northwind
            > database) into a dataset of type DataSet1
            > - one to create a report of type CrystalReport1 and bind that
            > dataset the report
            > - one to save the dataset's xml to C:\
            > - one to load the dataset with XML from C:\ and show the[/color]
            report[color=blue]
            >
            > I ran this app in my local development box (where weverything always
            > works), loaded the dataset from the database, viewed the report, and saved
            > the XML to a file in c:\. Later I ran the application again and loaded the
            > XML from C:\. All that worked perfectly.
            > Then I built the installation, and installed on the client machine. Then I
            > put that XML file in its C:\ and tried to, ran the app and tried to load[/color]
            the[color=blue]
            > using the menu option.. Boom! Same "Database Login" screen...
            >
            > Could anyone please verify my sample project and possibly try to reproduce
            > this ? Something could be missing from the deployment documentation, which[/color]
            I[color=blue]
            > read and I am following thoroughly.
            >
            > By the way, I forgot to also mention that the user executing the[/color]
            application[color=blue]
            > is always the administrator of the computer, so this shouldn't be any
            > permissions problem.
            >
            > Thanks for the help.
            >
            > TJ
            >
            >
            > "Paul J. Barrett" <paulnodarnspam @nospamcoderjun to.com> wrote in message
            > news:3f33c93b$1 @la-news-01....[color=green]
            > > The problem resides in the name of the table when you fill it. You must
            > > make sure that the name of the table is always the same. I got around
            > > this by using the Stored procedure name as the table name but then ran
            > > into the same problem you are having when I corrected a spelling mistake
            > > in the stored procedures name.
            > >
            > > sqlDAdapter1.Fi ll(myDataSet,"M yTable");
            > >
            > > Hope this helps. You can use the debugger to check the table name and
            > > compare it to the table name that you used in the crystal report.
            > >
            > > Sincerely,
            > > Paul J Barrett
            > >
            > >
            > > TJoker .NET wrote:
            > >[color=darkred]
            > > > I'm developing an VB.NET Windows Forms application that uses CR for[/color][/color]
            > VS.NET[color=green][color=darkred]
            > > > (original version shipped with VS.NET 2002 - my VS.NET has the latest[/color][/color][/color]
            SP[color=blue][color=green][color=darkred]
            > > > installed, no SPs for CR).
            > > > My reports get their data from ADO.NET Datasets that are pre-populated[/color][/color]
            > by[color=green][color=darkred]
            > > > other modules of the application.
            > > > What I need to do is to use these datasets as the datasources of my[/color][/color]
            > reports.[color=green][color=darkred]
            > > > Fine, I know how to do that and it works perfectly on my development[/color][/color]
            > box.[color=green][color=darkred]
            > > > The trouble comes when I deploy the application on the client machine.
            > > > I created a installation project in VS.NET, added the required CR[/color][/color][/color]
            merge[color=blue][color=green][color=darkred]
            > > > modules, added the keycode, and it seems to install everything fine.[/color][/color][/color]
            But[color=blue][color=green][color=darkred]
            > > > when it tries to show the reports in the CrystalReportVi ewer control,[/color][/color][/color]
            it[color=blue][color=green][color=darkred]
            > > > pops-up the 'Database Login' dialog.
            > > > Who is talking about database here? I'm already giving all the needed[/color][/color]
            > data.[color=green][color=darkred]
            > > >
            > > > The reports were all created from typed datasets, using datasources of[/color][/color]
            > type[color=green][color=darkred]
            > > > ADO.NET(XML).
            > > > It seems that a lot of people have the same problem but the only[/color][/color]
            > workaround[color=green][color=darkred]
            > > > so far appears to be "use only one DataTable inside your dataset,[/color][/color]
            > containing[color=green][color=darkred]
            > > > all the data you need". I'm trying not to have to resort to this[/color][/color]
            > approach[color=green][color=darkred]
            > > > because my datasets are very complex with many tables.
            > > > What I've read in other similar posts is that it seems that CR gets[/color][/color][/color]
            lost[color=blue][color=green][color=darkred]
            > > > when the dataset has more than one table
            > > >
            > > > Is this a confirmmed bug or am I missing something ?
            > > > This is how my code looks like:
            > > >
            > > > reportDocument = new MyCustomReport( )
            > > > reportDocument. SetDataSource(m yLoadedDataset)
            > > > ReportViewerCon trol.ReportSour ce = reportDocument
            > > >
            > > > Thanks
            > > >
            > > > TJ!
            > > >
            > > >
            > > >
            > > >[/color]
            > >[/color]
            >
            >[/color]


            Comment

            • TJoker .NET

              #7
              Re: Crystal Reports - Database Login dialog when using datasets

              Got it to work!!!!!!!!!

              After using a more decent support account (my company bought Crystal
              Enterprise Server) I was able to chat with the "real people" support.
              After messing aroung with try and error procedures, we figured out the
              obvious, the version of some of the dlls were mixed.
              The funny thing is that it was mixed because I had downloaded their very own
              update for the merge modules:

              modules_en.zip. asp
              But, fear not! Now you can download this update with confidence because it
              has been fixed, although they did not correct the publishing date. This
              update has been corrected after 8/6/2003 (when I downloaded it) but the
              website did not make clear that there was a new version available.
              I just downloaded the new version, installed, recompiled my setup, ran in
              the client box and it worked!

              Thanks fr anyone following this thread.

              TJ


              "Jeremy Cowles" <jeremy.cowle s[nosp@m]asifl.com> wrote in message
              news:DC60b.5244 0$K4.2663327@tw ister.tampabay. rr.com...[color=blue]
              > I can't see your orriginal question, but to suppress the DB Login dialog I
              > had to explicitly set the login info for every connection at the time when
              > the report was loaded. That was the only way I could do it.
              >
              > HTH,
              > Jeremy
              >
              >
              >
              > "K. Shier" <ks4hire@spamAt YourOwnRisk.yah oo.com> wrote in message
              > news:egV4zQZZDH A.1620@TK2MSFTN GP12.phx.gbl...[color=green]
              > > you have my sympathy.
              > >
              > > "TJoker .NET" <nospam@nonono. no> wrote in message
              > > news:u5ry7IcXDH A.536@TK2MSFTNG P10.phx.gbl...[color=darkred]
              > > > I am in contact with CrystalDecision s support (through that dreaded[/color][/color]
              > Answer[color=green][color=darkred]
              > > > by email system)[/color]
              > >
              > >
              > >[/color]
              >[/color]


              Comment

              • ward0093
                New Member
                • Jun 2006
                • 1

                #8
                Database Login Dialog... Check the &quot;Datasourc e Location&quot;

                I found out something... You need to check the properties in the "Datasource Location" screen on your form/report (in the designer). In more detail... right click on "Database Fields" and choose "Set Datasource Location"... then verify or "Replace" the datatable (or dataset) you have with the new one.

                This is a HUGE ISSUE if you were using a custom namespace and, from the previous post/replys had to remove the namespace... it DOES NOT get removed from the datasource. Now, using this "Set Datasource Location" helps with not having to redesign or drop the fields (or new fields) back on the form... it simply updates it for you.

                This got rid of the "Database Login Dialog" from popping up!

                i hope this helps someone
                ward0093



                Originally posted by Paul J. Barrett
                The problem resides in the name of the table when you fill it. You must
                make sure that the name of the table is always the same. I got around
                this by using the Stored procedure name as the table name but then ran
                into the same problem you are having when I corrected a spelling mistake
                in the stored procedures name.

                sqlDAdapter1.Fi ll(myDataSet,"M yTable");

                Hope this helps. You can use the debugger to check the table name and
                compare it to the table name that you used in the crystal report.

                Sincerely,
                Paul J Barrett


                TJoker .NET wrote:
                [color=blue]
                > I'm developing an VB.NET Windows Forms application that uses CR for VS.NET
                > (original version shipped with VS.NET 2002 - my VS.NET has the latest SP
                > installed, no SPs for CR).
                > My reports get their data from ADO.NET Datasets that are pre-populated by
                > other modules of the application.
                > What I need to do is to use these datasets as the datasources of my reports.
                > Fine, I know how to do that and it works perfectly on my development box.
                > The trouble comes when I deploy the application on the client machine.
                > I created a installation project in VS.NET, added the required CR merge
                > modules, added the keycode, and it seems to install everything fine. But
                > when it tries to show the reports in the CrystalReportVi ewer control, it
                > pops-up the 'Database Login' dialog.
                > Who is talking about database here? I'm already giving all the needed data.
                >
                > The reports were all created from typed datasets, using datasources of type
                > ADO.NET(XML).
                > It seems that a lot of people have the same problem but the only workaround
                > so far appears to be "use only one DataTable inside your dataset, containing
                > all the data you need". I'm trying not to have to resort to this approach
                > because my datasets are very complex with many tables.
                > What I've read in other similar posts is that it seems that CR gets lost
                > when the dataset has more than one table
                >
                > Is this a confirmmed bug or am I missing something ?
                > This is how my code looks like:
                >
                > reportDocument = new MyCustomReport( )
                > reportDocument. SetDataSource(m yLoadedDataset)
                > ReportViewerCon trol.ReportSour ce = reportDocument
                >
                > Thanks
                >
                > TJ!
                >
                >
                >
                >[/color]

                Comment

                Working...