Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Please help. I need help on updating my report database fields so I can make changes to my report on detail section.

Below are my codes for populating my dataset and bring it to my report.

 

Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\VB Project\FormPractice\Login\Scholarship.mdb"

 

Dim intSSN As Integer = CInt(strSNNsubString)

Dim strPerSQL As String = "SELECT * FROM Personal, Education, Answers WHERE Personal.SSN =" & intSSN & " And Education.SSN =" & intSSN And Answers.SSN = " & intSSN"

Dim usrDataAdapter As New OleDbDataAdapter(strPerSQL, strConn)

usrDataAdapter.TableMappings.Add("Table", "Personal")

Dim usrDataset As New DataSet()

usrDataset.Clear()

usrDataAdapter.Fill(usrDataset, "Personal")

 

Dim rpt As New crprtAppInfo()

rpt.SetDataSource(usrDataset)

Dim fldName As String

fldName = "fldMdlName"

'GetFieldObject(fldName)

crprtViewerApp.ReportSource = rpt

 

This is what I have before in my strPerSQL query:

 

Dim strPerSQL As String = "SELECT * FROM Personal, Education WHERE Personal.SSN =" & intSSN & " And Education.SSN =" & intSSN

 

And now I add one more table to the strPerSQL query:

 

Dim strPerSQL As String = "SELECT * FROM Personal, Education, Answers WHERE Personal.SSN =" & intSSN & " And Education.SSN =" & intSSN And Answers.SSN = " & intSSN"

 

My question is, how do I update the Database Fields in my report design so I can add additional fields from the Answers table to my report. I am using Crystal Report.

 

Many thanks in advance!

 

Chong

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...