Could it be possible that there's something wrong with the Temporary
Files?

The error always comes from a file like this:
Error in File C:\DOCUME~1\XXX\LOCALS~1\Temp\CrystalReport1
{8069E57D-6905-4ED5-A130-56876A7AD67A}.rpt:
Unable to connect: incorrect log on parameters. --->
System.Runtime.InteropServices.COMException (0x8004100F): Logon
failed.

I already set the permissions for the "Network Service"-User.

Is there maybe anything wrong with permissions on this folder so that
it can't reload the temporary report?

Thanks for all your help!


On Dec 9, 10:35 pm, Fai2012 <[email protected]> wrote:
> I believe after setting the datasource you'll also need to set logon
> for each tables of the report.
> I do both every time I load a report and it works for me.
>
> Dim CONNECTION As New ConnectionInfo()
> CONNECTION.ServerName = SERVER
> CONNECTION.DatabaseName = DATABASE
> CONNECTION.UserID = UID
> CONNECTION.Password = PASSWORD
>
> Dim TABLES As Tables = REPORTDOCUMENT.Database.Tables
> Dim table As CrystalDecisions.CrystalReports.Engine.Table
> For Each table In TABLES
>         Dim LOGON As TableLogOnInfo = table.LogOnInfo
>         LOGON.ConnectionInfo = CONNECTION
>         table.ApplyLogOnInfo(LOGON)
> Next
>
> On Dec 8, 4:24 am, "[email protected]" <[email protected]> wrote:
>
> > No, I don't use it anymore.
> > Still works for one time and crashes afterwards.
>
> > cheers
>
> > On Dec 2, 8:17 pm, "Paulo Coutinho" <[email protected]> wrote:
>
> > > But you are using setLogon ou setConnection ? You dont need use it more.
>
> > > ty.
>
> > > 2008/12/2 [email protected] <[email protected]>
>
> > > > Thanks for your help!
>
> > > > I've created a DataSet, set the DataSource and the ReportSource
> > > > correctly and it works, for one single time. The second time you do
> > > > absolutely the same, the same error appears. Weird! Any ideas?
>
> > > > Cheers.
>
> > > > On Dec 1, 8:16 pm, "Paulo Coutinho" <[email protected]> wrote:
> > > > > Im try your method in the past, but it never function with me.
>
> > > > > So i found a better solution:
>
> > > > > *//load my form and create a ReportDocument instance*
> > > > > frmRelatorio fr = new frmRelatorio();
> > > > > ReportDocument rptDoc = new ReportDocument();
>
> > > > > *//load de RPT file*
> > > > > rptDoc.Load(Core.pastaLocal + @"Relatórios\balanco_contas.rpt");
>
> > > > > *//create my object that will return de dataSet to me*
> > > > > BalancoContas cr = new BalancoContas();
>
> > > > > *//call the method that return a dataset to me and fill the first 
> > > > > table
> > > > of
> > > > > my report (0)*
> > > > > rptDoc.Database.Tables[0].SetDataSource(cr.listarRelatorio());
>
> > > > > fr.rptViewer.ReportSource = rptDoc;
>
> > > > > *//show the form with crystal reports viewer*
> > > > > fr.ShowDialog();
>
> > > > ------------------------------------------------------------------------------------------------------------------------
>
> > > > > To do it, you need create a new DataSet from file -> new -> dataset.
>
> > > > > Put the columns like your database table.
>
> > > > > Fill the first table of your reports (table 0):
> > > > > rptDoc.Database.Tables[0].SetDataSource( <your dataset here> );
>
> > > > > Set the crystal report document to crystal reports reportSource:
> > > > > form.rptViewer.ReportSource = rptDoc;
>
> > > > > To simple.
>
> > > > > Cya.
>
> > > > > 2008/12/1 [email protected] <[email protected]>
>
> > > > > > Hey!
> > > > > > I'm developing a Crystal Reports-Page in Visual Studio 2008 with C#
> > > > > > and a weird error shows up all the time. I searched Google and 
> > > > > > found a
> > > > > > lot of people with the same errors but no one had a solution for 
> > > > > > this.
>
> > > > > > When I submit the form and fill the data into a datatable & a 
> > > > > > dataset
> > > > > > the first of two reports on the page loads perfectly but the second
> > > > > > report on the page comes up with the following error:
>
> > > > > > Logon failed. Details: crdb_adoplus : Object reference not set to an
> > > > > > instance of an object. Error in File [...]\Temp\temp_05e54150-
> > > > > > b4f5-427a-848f-4b402f507daf
> > > > > > {3F31E28C-9C91-47B8-84AB-95831FAB3419}.rpt: Unable to connect:
> > > > > > incorrect log on parameters.
>
> > > > > > As soon as I try to export the working report via the EXPORT button,
> > > > > > it comes up with the same error.
>
> > > > > > Parts of my C#-Code:
>
> > > > > > CrystalReport1 cr = new CrystalReport1();
> > > > > >            cr.SetDatabaseLogon("ccc", "ddd");
> > > > > >            cr.Load(Server.MapPath("~\\CrystalReport1.rpt"));
> > > > > >            cr.SetDataSource(DataSet1);
> > > > > >            CrystalReportViewer1.ReportSource = cr;
>
> > > > > >            CrystalReport1 cr2 = new CrystalReport1();
> > > > > >            cr2.SetDatabaseLogon("aaa", "bbb");
> > > > > >            cr2.Load(Server.MapPath("~\\CrystalReport1.rpt"));
> > > > > >            cr2.SetDataSource(DataSet2);
> > > > > >            CrystalReportViewer2.ReportSource = cr2;
>
> > > > > > Can anybody help me? I've been wasting a lot of time on this problem
> > > > > > without any solution...
>
> > > > > > Thanks a lot
> > > > > > -r.
>
> > > > > --
> > > > > Atenciosamente,
> > > > > Paulo Coutinho.
> > > > > Site:www.prsolucoes.com
> > > > > Msn:  [email protected]
> > > > > Skype: paulo.prsolucoes
>
> > > --
> > > Atenciosamente,
> > > Paulo Coutinho.
> > > Site:www.prsolucoes.com
> > > Msn:  [email protected]
> > > Skype: paulo.prsolucoes
>
>

Reply via email to