Stupid Crystal Report Question
I am building a little report to be displayed on a windows form. I am creating a data set on the fly and pushing that to the report.
My question is how do I add the appropriate fields to the report in design mode if I can't see the the fields since I am building the dataset on the fly.
I have attached the table I am working with to the report to get fields but as soon as I delete the table the fields go with it.
Do I use unbound fields then bind them on the fly, I just don't know.
I hope this makes sense, I am assuming there is a simple trick to this!!!
Frank
I figured out one solution, probably not the best solution
I attached the tables in the report with an oledb connection. Then I found an example of pushing the user login information to the report . Once I pass the user logon information to the report, the report comes up right away with out asking for a second logon screen.
Private Sub LogonToReport(ByVal server As String, ByVal database As String, ByVal userID As String, ByVal password As String)
Dim logOnInfo As New TableLogOnInfo()
Dim table As Table
' Set the connection information for the table in the report.
For Each table In PatientReport.Database.Tables
logOnInfo.ConnectionInfo.ServerName = server
logOnInfo.ConnectionInfo.DatabaseName = database
logOnInfo.ConnectionInfo.UserID = userID
logOnInfo.ConnectionInfo.Password = password
'logOnInfo.TableName = table
table.ApplyLogOnInfo(logOnInfo)
Next table