Each record as separate report
I had developed one program to creating resume in pdf form by accessing the data from database.
Software used Asp.Net 2005,Ms Access 2000, Crystal Report XI.
What should be happen in my program?:
For example consider 3 rows in my database and fields as id,name,qfn,exp,softknown,edu,....in detailed manner.
If I run my program first row should be read and make the pass the values to the report designed and save by using the name and exp values from database. And then the second record, then third record.
What is Happening?
Values are passing properly. Reports are creating and saving as we need. but only thing is in all the pdf's all the three records are displying.
I need in first pdf, first row of the database,.
I need in second pdf, second row of database.
same for third.
My code
Dim intIdx, rcount As Integer
Dim intId As Integer
Dim reportPath, QUERY_STRING As String
CandidateReport = New ReportDocument()
reportPath = Server.MapPath("ResumeReport.rpt")
CandidateReport.Load(reportPath)
QUERY_STRING = "Select * from ReportTable"
If Cache("ResumeDataSet") Is Nothing Then
'myDataSet = DatasetConfiguration.ResumeDataSet
myDataSet = ds.Resumedataset(QUERY_STRING)
Cache("ResumeDataSet") = myDataSet
Else
myDataSet = CType(Cache("ResumeDataSet"), DataSet)
End If
rcount = myDataSet.Tables("ReportTable").Rows.Count
For intIdx = 0 To 2
File_name = myDataSet.Tables("ReportTable").Rows(intIdx)("Cand idatename")
File_name = File_name & "_" & myDataSet.Tables("ReportTable").Rows(intIdx)("Work exp")
intId = myDataSet.Tables("ReportTable").Rows(intIdx)("Cand idateid")
CandidateReport.SetDataSource(myDataSet.Tables("Re portTable").Rows(intIdx).Item("Candidatename"))
ReportView.ReportSource = CandidateReport
If Not IsPostBack Then
Exporttypeslist.DataSource = System.Enum.GetValues(GetType(ExportFormatType))
End If
ExportSetup()
ExportSelection()
ExportCompletion()
'ds.Resumedataset(QUERY_STRING1).Reset()
Next

