PC Review


Reply
Thread Tools Rate Thread

crystal report - msdn help

 
 
PlumeProg
Guest
Posts: n/a
 
      9th Jul 2003
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)
 
Reply With Quote
 
 
 
 
Armin Zingler
Guest
Posts: n/a
 
      9th Jul 2003
"PlumeProg" <(E-Mail Removed)> schrieb
> 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)


--
Armin

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have access to the fields in the crystal report using VB.NET (outside the design of the crystal report) with SQL statements? amiga500@gmail.com Microsoft Dot NET 0 24th Oct 2007 04:38 PM
Sending Crystal Report to Network Print Mailbox While Bypassing Crystal Report Viewer. John Smith Microsoft VB .NET 0 17th Jan 2007 04:17 PM
Crystal Report Old version vs Visual Studio .net Crystal report =?Utf-8?B?S2FubmFu?= Microsoft C# .NET 1 13th Nov 2006 10:43 PM
Change Crystal Report Zoom Level using percentages in Crystal Report Viewer (Dotnet) Alex Stevens Microsoft Dot NET Framework Forms 1 30th Jun 2004 12:34 PM
Change Crystal Report Zoom Level using percentages in Crystal Report Viewer (Dotnet) Alex Stevens Microsoft Dot NET 1 30th Jun 2004 12:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:39 AM.