crystal report - msdn help

P

PlumeProg

Hello, I can't find a way to bind a dataset at runtime as
a source for my report source.

I looked into msdn and found some sample :
ms-
help://MS.VSCC/MS.MSDNVS/crystlmn/html/crtskaccessingsecure
databases.htm

' Declare require variables.
Dim logOnInfo As New TableLogOnInfo()
Dim i As Integer

' Loop through every table in the report.
For i = 0 To report.Database.Tables.Count - 1
' Set the connection information for current table.
logOnInfo.ConnectionInfo.ServerName = serverNameTxt.Text
logOnInfo.ConnectionInfo.DatabaseName = dbNameTxt.Text
logOnInfo.ConnectionInfo.UserID = userNameTxt.Text
logOnInfo.ConnectionInfo.Password = passwordTxt.Text
report.Database.Tables.Item(i).ApplyLogOnInfo(logOnInfo)
Next i

I can't figure what is report ? (as in report.database.
[...], last line)
 
A

Armin Zingler

PlumeProg said:
Hello, I can't find a way to bind a dataset at runtime as
a source for my report source.

I looked into msdn and found some sample :
ms-
help://MS.VSCC/MS.MSDNVS/crystlmn/html/crtskaccessingsecure
databases.htm

' Declare require variables.
Dim logOnInfo As New TableLogOnInfo()
Dim i As Integer

' Loop through every table in the report.
For i = 0 To report.Database.Tables.Count - 1
' Set the connection information for current table.
logOnInfo.ConnectionInfo.ServerName = serverNameTxt.Text
logOnInfo.ConnectionInfo.DatabaseName = dbNameTxt.Text
logOnInfo.ConnectionInfo.UserID = userNameTxt.Text
logOnInfo.ConnectionInfo.Password = passwordTxt.Text
report.Database.Tables.Item(i).ApplyLogOnInfo(logOnInfo)
Next i

I can't figure what is report ? (as in report.database.
[...], last line)

"report" is an intance of a report class you added to the project using
"Project -> Add new item -> CrystalReport". Then you can use

Dim report as new CrystalReport1
report.setdatasource(YourDataset)
CrystalReportViewer1.ReportSource = report


See also:
ms-help://MS.VSCC/MS.MSDNVS/crystlmn/html/crtsksettingupanado.netreportinavi
ewer.htm

(watch for wrapping)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top