Home > Archive > Visual Basic Crystal Reports > June 2005 > Reporting from Excel
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Reporting from Excel
|
|
| nstaward@gmail.com 2005-06-08, 4:02 pm |
| Hi,
I have Crystal reports (v9) running from an ASP.NET application. Those
with a SQLServer datasource work fine, with the following code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
crpt = New crystalreport1
For Each myTable In crpt.Database.Tables
myLogin = myTable.LogOnInfo
myLogin.ConnectionInfo.Password = "password"
myLogin.ConnectionInfo.UserID = "username"
myTable.ApplyLogOnInfo(myLogin)
Next
CrystalReportViewer1.ReportSource = crpt
End Sub
But I now have a report which uses an Excel 2003 xls as it's
datasource. I get the
'CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed'
error message. I've tried taking the logon code out, and using a blank
username and password but no luck,
Can anyone suggest a solution?
thanks
| |
| Thomas Wenning 2005-06-09, 8:59 am |
| What is your name?:-O
<nstaward@gmail.com> schrieb im Newsbeitrag
news:1118246408.963487.153010@g47g2000cwa.googlegroups.com...
> Hi,
>
> I have Crystal reports (v9) running from an ASP.NET application. Those
> with a SQLServer datasource work fine, with the following code:
>
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> crpt = New crystalreport1
>
> For Each myTable In crpt.Database.Tables
> myLogin = myTable.LogOnInfo
> myLogin.ConnectionInfo.Password = "password"
> myLogin.ConnectionInfo.UserID = "username"
> myTable.ApplyLogOnInfo(myLogin)
> Next
>
> CrystalReportViewer1.ReportSource = crpt
> End Sub
>
>
> But I now have a report which uses an Excel 2003 xls as it's
> datasource. I get the
> 'CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed'
> error message. I've tried taking the logon code out, and using a blank
> username and password but no luck,
>
> Can anyone suggest a solution?
>
> thanks
>
read the exce file in a dataset and use this dataset for the report like
this:
http://support.businessobjects.com/...netdatasets.pdf
Greeting
Thomas
| |
| nstaward@gmail.com 2005-06-09, 4:01 pm |
| Thanks Thomas,
I will check that out new,
Niall ;-)
| |
| nstaward@gmail.com 2005-06-09, 4:01 pm |
| I followed the pdf through. The jet ole db provider won't work with
excel so I made an Access database and linked it to the excel file, but
I am still getting the same error (log on failed)!
Any further advice?
Thanks,
Niall
|
|
|
|
|