Some times when you run a
“The report you requested requires further information”.
I got this error when I tried to connect AS/400 using iSeries ODBC Drivers
Figure 1 the error message
You get this error because your DSN is not able to pass log in info to your crystal report.
There is 2 ways to solve this problem
1:- Save user and password information in your DSN.
This solution is good when the DSN allow you to save User and Password
For example DSN that connected to Sql Server .
See Figure 2
Figure 2
2:Pass User and Password information to crystal report
Pass User and Password info by using report document to your report.
You can pass log in info by using SetDatabaseLogon(User,Password) property.
Also you should verify database by using VerifyDatabase(
Example:
In this example my Crystal report get customer number as parameter and display customer info.
The report name is "cusrep.rpt"
The ASP.NET page get customer number as parameter “cusnum”.
The parameter name in crystal report is “CUNO”.
The report viewer control name is “myCrystalReportViewer”.
At page load event the program get the parameter and display te report,
P.S : do not forget to import crystal classes.
Imports CrystalDecisions.CrystalReports.Engine
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim MyRep, Myfile As String
MyRep = "cusrep.rpt"customerReport = New ReportDocument()
'******** Load the report
Dim reportPath As String = Server.MapPath(MyRep)
customerReport.Load(
'******** Pass log in info
customerReport.
'******** Verify Data base
customerReport.VerifyDatabase(
'********* Pass parameter and display report
myCrystalReportViewer.
Dim ParamFields As ParameterFields = myCrystalReportViewer.
Dim CusNum As String
CusNum = Request("cusnum")
Rep01.Name = "CUNO" '
Dim Rep01_Value As New ParameterDiscreteValue
Rep01_Value.Value = CusNum
Rep01.CurrentValues.Add(Rep01_
ParamFields.Add(Rep01)
For Each cnInfo As TableLogOnInfo In Me.myCrystalReportViewer.
cnInfo.ConnectionInfo = ConnInfo
Next
myCrystalReportViewer.
End Sub
Hi,
ReplyDeleteNeed a favor..
Do you know how to view the current record in Crystal Report when click on gridview Linkbutton.
Thanks
Aleesya