creating my new report (new to crystal report)

ssfftt

Well-known member
Joined
Oct 27, 2005
Messages
163
Programming Experience
1-3
I use vb.net and MSsql.

1. In my report's "header" field, i want to display a details of the current user. (the user name is a unique key in db table and the current user name is held in my program: datamoduleUser.userName, i can code a dataset, dataadapter to select the details, just not suer how to connect to crystal report so that the report can display the details)

2. In my report's "details" section, i want to display a details that are retrieved from multiple tables which involves 2 parameters from different table. ( here i think i need another dataset, same problem, i cant link it from program to report, also, if i SetDataSource of the report to the dataset for "header" section, what about "details" section?


I solved point 1 problem by these chunk of code:

'get title fields data
ModuleUser.frmCRCurTestDetails.SqlSelectCommandGetRptTitleValues.Parameters("@RID").Value = ModuleUser.curResultID
ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues.Clear()
ModuleUser.frmCRCurTestDetails.SqlDataAdapterGetRptTitleValues.Fill(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)
crystalReportCurResult.SetDataSource(ModuleUser.frmCRCurTestDetails.DsGetRptTitleValues)


Now, more headache: since i fill filled report's datasource with the DsGetRptTitleValues already, how can i put in another datasource which contains the data required by point 2?
 

Latest posts

Back
Top