cancel
Showing results for 
Search instead for 
Did you mean: 

Problem passing parameter to crystal report subreport from *.aspx page

Former Member
0 Kudos

Background:

I am developing a .NET web application using Visual Studio 2005. The code behind is in VB.net. One of my asp.net pages calls a report, which is invoked when the user clicks a Print button. I have developed this report using the Crystal Reports software that is bundled with Visual Studio 2005. I am passing one parameter from the asp.net page (utilizing the VB.net code-behind on the Print button) to the Crystal report. The report consists of a main report and 5 subreports. Both the main report and the subreports use the same parameter. Both the main report and the subreports are bound to stored procedures, each of which require a parameter.

Problem:

For some reason, the parameter is not being passed from the asp.net page to the report. I am receiving the following error: "CrystalDecisions.CrystalReports.Engine.ParameterField.CurrentValueException: Missing Parameter Values." However, when I remove the subreports, the parameter gets passed, and the report is invoked with no problem.

I have read in other forums that there may be an issue with the Crystal Reports software that is causing this problem. I have downloaded and run the suggested hotfix, but the problem remains unresolved. I have tried changing the linking of my main report to the subreport, but that doesn't help either. It is possible that I am doing something wrong with the linking, as this is the first time I have developed a report with Crystal Reports. I need a workaround or definitive solution. Below is the aspx code used to call the report:

Imports System

Imports System.Collections.Specialized

Imports System.Collections.ObjectModel

Imports System.Collections

Imports System.Text

Imports System.Configuration

Imports System.Data.SqlClient

Imports System.Data

Imports System.Data.SqlClient.SqlDataAdapter

Imports System.Web.Configuration

Imports Crystaldecisions.crystalreports.engine

Imports Crystaldecisions.reportsource

Imports Crystaldecisions.shared

Partial Class OACIS_Award_or_Deny_BudgetSummary_PrintRpt

Inherits System.Web.UI.Page

Dim paramFields As ParameterFieldDefinitions

Dim paramField As ParameterFieldDefinition

Dim paramValue As ParameterValues

Dim paramDiscreteValue As New ParameterDiscreteValue

Public Shared idCase, nameRpt As String

Private PrintRpt As ReportDocument

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Try

idCase = Request.QueryString("id")

nameRpt = Request.QueryString("prtName")

Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")

Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)

Dim file As String = settings.File

Dim dSource, iCatalog, userIs, passUser, appString As String

dSource = Nothing

iCatalog = Nothing

userIs = Nothing

passUser = Nothing

appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()

Dim AppArray() As String = Split(appString, ";")

Dim arrayLgth As Integer = AppArray.Length

Dim i As Integer

For i = 0 To arrayLgth - 1

Dim pairIs() As String = Split(AppArray(i), "=")

Dim firstItem As String = pairIs(0)

Dim secondItem As String = pairIs(1)

If firstItem = "Data Source" Then : dSource = secondItem : End If

If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If

If firstItem = "UID" Then : userIs = secondItem : End If

If firstItem = "PWD" Then : passUser = secondItem : End If

Next

Dim crReportDocument As ReportDocument

Dim crExportOptions As ExportOptions

Dim crDiskFileDestinationOptions As DiskFileDestinationOptions

Dim crconnectioninfo As ConnectionInfo

Dim crDatabase As Database

Dim crtables As Tables

Dim crtable As Table

Dim crtablelogoninfo As TableLogOnInfo

Dim Fname As String

Dim Prtname As String

Dim FPath As String

Dim crSection As Section

Dim crReportObject As ReportObject

Dim crSubreportObject As SubreportObject

Dim subRepDoc As New ReportDocument

FPath = Server.MapPath("") + "\"

Dim rptIs As String = nameRpt

crReportDocument = New ReportDocument

Prtname = FPath

Prtname = Prtname + rptIs

crReportDocument.Load(Prtname)

Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"

crconnectioninfo = New ConnectionInfo

crconnectioninfo.ServerName = dSource

crconnectioninfo.DatabaseName = iCatalog

crconnectioninfo.UserID = userIs

crconnectioninfo.Password = passUser

crDatabase = crReportDocument.Database

crtables = crDatabase.Tables

For Each crtable In crtables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.SetDataSource(Prtname)

crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog

crtablelogoninfo.ConnectionInfo.UserID = userIs

crtablelogoninfo.ConnectionInfo.Password = passUser

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

Response.Write(ex)

Exit Sub

End Try

Next crtable

For Each crSection In crReportDocument.ReportDefinition.Sections

For Each crReportObject In crSection.ReportObjects

If crReportObject.Kind = ReportObjectKind.SubreportObject Then

crSubreportObject = CType(crReportObject, SubreportObject)

subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

For Each crtable In subRepDoc.Database.Tables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.SetDataSource(Prtname)

crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog

crtablelogoninfo.ConnectionInfo.UserID = userIs

crtablelogoninfo.ConnectionInfo.Password = passUser

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

End Try

Next

End If

Next

Next

crDiskFileDestinationOptions = New DiskFileDestinationOptions()

crDiskFileDestinationOptions.DiskFileName = Fname

crExportOptions = crReportDocument.ExportOptions

With crExportOptions

.DestinationOptions = crDiskFileDestinationOptions

.ExportDestinationType = ExportDestinationType.DiskFile

.ExportFormatType = ExportFormatType.PortableDocFormat

End With

Dim parIDCase As ParameterValues = New ParameterValues

Dim disIDCase As ParameterDiscreteValue = New ParameterDiscreteValue

disIDCase.Value = idCase

parIDCase.Add(disIDCase)

crReportDocument.DataDefinition.ParameterFields("@ID_CASE_NMBR").ApplyCurrentValues(parIDCase)

crReportDocument.Export()

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType = "application/pdf"

Response.WriteFile(Fname)

Response.Flush()

Response.Close()

System.IO.File.Delete(Fname)

Catch ex As Exception

lblMessage.Visible = True

lblMessage.Text = "Error Load

" & Convert.ToString(ex)

End Try

End Sub

End Class

Your help is greatly appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks for your help!

I've now gotten past the "missing parameter values" error, and the report renders fine in the report viewer. However, I've encounted another problem. The data in my main report displays correctly, but the data in my subreport does not display. Of course, when I view the report in the designer, both the main report and subreport display correctly. What am I doing wrong? Below is my vb.net code:

Try

idCase = Request.QueryString("id")

nameRpt = Request.QueryString("prtName")

Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")

Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)

Dim file As String = settings.File

Dim dSource, iCatalog, userIs, passUser, appString As String

dSource = Nothing

iCatalog = Nothing

userIs = Nothing

passUser = Nothing

appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()

Dim AppArray() As String = Split(appString, ";")

Dim arrayLgth As Integer = AppArray.Length

Dim i As Integer

For i = 0 To arrayLgth - 1

Dim pairIs() As String = Split(AppArray(i), "=")

Dim firstItem As String = pairIs(0)

Dim secondItem As String = pairIs(1)

If firstItem = "Data Source" Then : dSource = secondItem : End If

If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If

If firstItem = "UID" Then : userIs = secondItem : End If

If firstItem = "PWD" Then : passUser = secondItem : End If

Next

Dim crReportDocument As ReportDocument

Dim crExportOptions As ExportOptions

Dim crDiskFileDestinationOptions As DiskFileDestinationOptions

Dim crconnectioninfo As ConnectionInfo

Dim crDatabase As Database

Dim crtables As Tables

Dim crtable As Table

Dim crtablelogoninfo As TableLogOnInfo

Dim Fname As String

Dim Prtname As String

Dim FPath As String

Dim crSection As Section

Dim crReportObject As ReportObject

Dim crSubreportObject As SubreportObject

Dim subRepDoc As New ReportDocument

FPath = Server.MapPath("") + "\"

Dim rptIs As String = nameRpt

crReportDocument = New ReportDocument

Prtname = FPath

Prtname = Prtname + rptIs

crReportDocument.Load(Prtname)

Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"

crconnectioninfo = New ConnectionInfo

crconnectioninfo.ServerName = dSource

crconnectioninfo.DatabaseName = iCatalog

crconnectioninfo.UserID = userIs

crconnectioninfo.Password = passUser

crDatabase = crReportDocument.Database

crtables = crDatabase.Tables

For Each crtable In crtables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.SetDataSource(Prtname)

crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog

crtablelogoninfo.ConnectionInfo.UserID = userIs

crtablelogoninfo.ConnectionInfo.Password = passUser

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

Response.Write(ex)

Exit Sub

End Try

Next crtable

For Each crSection In crReportDocument.ReportDefinition.Sections

For Each crReportObject In crSection.ReportObjects

If crReportObject.Kind = ReportObjectKind.SubreportObject Then

crSubreportObject = CType(crReportObject, SubreportObject)

subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

For Each crtable In subRepDoc.Database.Tables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.SetDataSource(Prtname)

crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog

crtablelogoninfo.ConnectionInfo.UserID = userIs

crtablelogoninfo.ConnectionInfo.Password = passUser

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

End Try

Next

End If

Next

Next

crDiskFileDestinationOptions = New DiskFileDestinationOptions()

crDiskFileDestinationOptions.DiskFileName = Fname

crExportOptions = crReportDocument.ExportOptions

With crExportOptions

.DestinationOptions = crDiskFileDestinationOptions

.ExportDestinationType = ExportDestinationType.DiskFile

.ExportFormatType = ExportFormatType.PortableDocFormat

End With

crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)

crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")

crReportDocument.Export()

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType = "application/pdf"

Response.WriteFile(Fname)

Response.Flush()

Response.Close()

System.IO.File.Delete(Fname)

Catch ex As Exception

lblMessage.Visible = True

lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)

End Try

Edited by: LaShandra Knox on Sep 17, 2008 7:59 PM

former_member208657
Active Contributor
0 Kudos

I have a few comments for your code.

- If you want new data you should be calling the Refresh method after you Load the report. This will wipe out all parameters and records from the report.

- I am puzzled by your SetDataSource lines. I have no idea why you are passing the name of the report into the report itself. The SetDataSource is used to pass .NET DataSets, DataTables, DataReaders, etc. into a Crystal Report. Sending the file path of the report won't do anything.

- Why are you applying the LogOnInfo multiple times each pass? You should only do this once.


Try
idCase = Request.QueryString("id")
nameRpt = Request.QueryString("prtName")
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")
Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)
Dim file As String = settings.File
Dim dSource, iCatalog, userIs, passUser, appString As String
dSource = Nothing
iCatalog = Nothing
userIs = Nothing
passUser = Nothing
appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()
Dim AppArray() As String = Split(appString, ";")
Dim arrayLgth As Integer = AppArray.Length
Dim i As Integer
For i = 0 To arrayLgth - 1
Dim pairIs() As String = Split(AppArray(i), "=")
Dim firstItem As String = pairIs(0)
Dim secondItem As String = pairIs(1)
If firstItem = "Data Source" Then : dSource = secondItem : End If
If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If
If firstItem = "UID" Then : userIs = secondItem : End If
If firstItem = "PWD" Then : passUser = secondItem : End If
Next
Dim crReportDocument As ReportDocument
Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim crconnectioninfo As ConnectionInfo
Dim crDatabase As Database
Dim crtables As Tables
Dim crtable As Table
Dim crtablelogoninfo As TableLogOnInfo
Dim Fname As String
Dim Prtname As String
Dim FPath As String
Dim crSection As Section
Dim crReportObject As ReportObject
Dim crSubreportObject As SubreportObject
Dim subRepDoc As New ReportDocument
FPath = Server.MapPath("") + "\"
Dim rptIs As String = nameRpt
crReportDocument = New ReportDocument
Prtname = FPath
Prtname = Prtname + rptIs
crReportDocument.Load(Prtname)

' New line of code here ... refresh the report
crReportDocument.Refresh()

Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"
crconnectioninfo = New ConnectionInfo
crconnectioninfo.ServerName = dSource
crconnectioninfo.DatabaseName = iCatalog
crconnectioninfo.UserID = userIs
crconnectioninfo.Password = passUser
crDatabase = crReportDocument.Database
crtables = crDatabase.Tables
For Each crtable In crtables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)

' Why is this SetDataSource here? Prtname is not a DataSet or DataTable
'crtable.SetDataSource(Prtname)

' Why is this info being set again? ApplyLogOnInfo has already been done.
'crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
'crtablelogoninfo.ConnectionInfo.UserID = userIs
'crtablelogoninfo.ConnectionInfo.Password = passUser
'crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
Next crtable
For Each crSection In crReportDocument.ReportDefinition.Sections
For Each crReportObject In crSection.ReportObjects
If crReportObject.Kind = ReportObjectKind.SubreportObject Then
crSubreportObject = CType(crReportObject, SubreportObject)
subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)
For Each crtable In subRepDoc.Database.Tables
Try
crtablelogoninfo = crtable.LogOnInfo
crtablelogoninfo.ConnectionInfo = crconnectioninfo
crtable.ApplyLogOnInfo(crtablelogoninfo)

' Why is this SetDataSource here? Prtname is not a DataSet or DataTable
'crtable.SetDataSource(Prtname)

' Why is this info being set again? ApplyLogOnInfo has already been done.
'crtablelogoninfo.ConnectionInfo.DatabaseName = iCatalog
'crtablelogoninfo.ConnectionInfo.UserID = userIs
'crtablelogoninfo.ConnectionInfo.Password = passUser
'crtable.ApplyLogOnInfo(crtablelogoninfo)


crtable.Location = iCatalog + ".dbo." + crtable.Name
Catch ex As Exception

End Try
Next
End If
Next
Next

crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
.DestinationOptions = crDiskFileDestinationOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
End With


crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)
crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")

crReportDocument.Export()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()
System.IO.File.Delete(Fname)
Catch ex As Exception
lblMessage.Visible = True
lblMessage.Text = "Error Load
" & Convert.ToString(ex)
End Try

Former Member
0 Kudos

Mr. Hilton,

Thank you, thank you, thank you!!!!! After several days of beating my head against the wall, my report works! I removed the unnecessary code as you advised. After I made those modifications, I started getting a "Operation illegal on linked parameter." error, but I figured out that I didn't need the following line of code since I linked my subreports to the main report: "crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase, "MemberName")". After I removed this line of code, my report (and all 5 of its subreports) rendered perfectly in the viewer!!!!! Thanks again for your help!

Below is the finished code snippet:

Try

idCase = Request.QueryString("id")

nameRpt = Request.QueryString("prtName")

Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~/")

Dim settings As AppSettingsSection = DirectCast(config.GetSection("appSettings"), AppSettingsSection)

Dim file As String = settings.File

Dim dSource, iCatalog, userIs, passUser, appString As String

dSource = Nothing

iCatalog = Nothing

userIs = Nothing

passUser = Nothing

appString = config.ConnectionStrings.ConnectionStrings("OacisConn").ToString()

Dim AppArray() As String = Split(appString, ";")

Dim arrayLgth As Integer = AppArray.Length

Dim i As Integer

For i = 0 To arrayLgth - 1

Dim pairIs() As String = Split(AppArray(i), "=")

Dim firstItem As String = pairIs(0)

Dim secondItem As String = pairIs(1)

If firstItem = "Data Source" Then : dSource = secondItem : End If

If firstItem = "Initial Catalog" Then : iCatalog = secondItem : End If

If firstItem = "UID" Then : userIs = secondItem : End If

If firstItem = "PWD" Then : passUser = secondItem : End If

Next

Dim crReportDocument As ReportDocument

Dim crExportOptions As ExportOptions

Dim crDiskFileDestinationOptions As DiskFileDestinationOptions

Dim crconnectioninfo As ConnectionInfo

Dim crDatabase As Database

Dim crtables As Tables

Dim crtable As Table

Dim crtablelogoninfo As TableLogOnInfo

Dim Fname As String

Dim Prtname As String

Dim FPath As String

Dim crSection As Section

Dim crReportObject As ReportObject

Dim crSubreportObject As SubreportObject

Dim subRepDoc As New ReportDocument

FPath = Server.MapPath("") + "\"

Dim rptIs As String = nameRpt

crReportDocument = New ReportDocument

Prtname = FPath

Prtname = Prtname + rptIs

crReportDocument.Load(Prtname)

crReportDocument.Refresh()

Fname = "C:\WINDOWS\TEMP\" & Session.SessionID.ToString & ".pdf"

crconnectioninfo = New ConnectionInfo

crconnectioninfo.ServerName = dSource

crconnectioninfo.DatabaseName = iCatalog

crconnectioninfo.UserID = userIs

crconnectioninfo.Password = passUser

crDatabase = crReportDocument.Database

crtables = crDatabase.Tables

For Each crtable In crtables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.ApplyLogOnInfo(crtablelogoninfo)

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

Response.Write(ex)

Exit Sub

End Try

Next crtable

For Each crSection In crReportDocument.ReportDefinition.Sections

For Each crReportObject In crSection.ReportObjects

If crReportObject.Kind = ReportObjectKind.SubreportObject Then

crSubreportObject = CType(crReportObject, SubreportObject)

subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName)

For Each crtable In subRepDoc.Database.Tables

Try

crtablelogoninfo = crtable.LogOnInfo

crtablelogoninfo.ConnectionInfo = crconnectioninfo

crtable.Location = iCatalog + ".dbo." + crtable.Name

Catch ex As Exception

End Try

Next

End If

Next

Next

crDiskFileDestinationOptions = New DiskFileDestinationOptions()

crDiskFileDestinationOptions.DiskFileName = Fname

crExportOptions = crReportDocument.ExportOptions

With crExportOptions

.DestinationOptions = crDiskFileDestinationOptions

.ExportDestinationType = ExportDestinationType.DiskFile

.ExportFormatType = ExportFormatType.PortableDocFormat

End With

crReportDocument.SetParameterValue("@ID_CASE_NMBR", idCase)

crReportDocument.Export()

Response.ClearContent()

Response.ClearHeaders()

Response.ContentType = "application/pdf"

Response.WriteFile(Fname)

Response.Flush()

Response.Close()

System.IO.File.Delete(Fname)

Catch ex As Exception

lblMessage.Visible = True

lblMessage.Text = "Error Load<br>" & Convert.ToString(ex)

End Try

Thanks again!

Edited by: LaShandra Knox on Sep 18, 2008 4:10 PM

former_member208657
Active Contributor
0 Kudos

Glad I could help.

Happy reporting!

Answers (2)

Answers (2)

former_member208657
Active Contributor
0 Kudos

You should start by simplifying your code for passing parameters. We have a convenience method called SetParameterValue() that works very well. You simply need to tell it what parameter you want to fill and the value. It even works for subreports if you give it the subreport name.

Next is to confirm that your subreports are linked correctly to your main report. You can do that by running the report in the Crystal Reports designer. Are you prompted for your parameter value once or twice?

How did you link your main report and subreport? How did you ensure your main report parameter would automatically fill the subreport parameter? Give step by steps instructions so we can be sure you didn't miss anything.

Former Member
0 Kudos

Thank you for your replies.

I am a newbie at Crystal Reports. The aspx code that I posted was written by someone else (I think they may have copied it from the web). I copied it and modified it to call my report. Unfortunately I am unfamiliar with the vb.net methods used to call/export reports. I tried moving the parameter code as the previous poster advised, but that didn't work for me. I probably still put it in the wrong place. I'm afraid someone will have to give me step-by-step instructions on how to modify my code.

I do believe that I have done the linking in the report correctly. When I preview the report in the designer, I am prompted only once for a parameter.

This is how I linked the subreports to the main report:

1. Right-clicked on the subreport and selected "Change Subreport Links"

2. In the Container Report Field(s) to link to section: From the available fields box, I selected the field on which I wanted to link and added it to the Field(s) to link to box. (Note: The field is retrieved by the stored procedure on which the main report is bound. In the Fields to link to box, it looks like this: "GetByPrimaryKey_CASE_BudgetSum;1.ID_CASE_NMBR")

3. In the Subreport parameter field to use dropdown, I selected the parameter name. It looks like this: "?@ID_CASE_NMBR"

4. I click OK to exit the Subreport Links dialog.

I performed the above steps for all 5 subreports.

Please advise.

former_member183750
Active Contributor
0 Kudos

I think the best way to proceed will be as David suggested. Start small, gain knowledge and confidence and keep building on that. Here is a link to a number of sample applications. See how these work, then try to implement these in your app. I'd start with a simple report - no subreports, then add one subreport, then two and so on. Keep your testing / learning apps as win apps, once you are ready try web apps.

Here is the link to the sample apps:

https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe

This White Paper is really good for code and workings of Crystal Reports and .NET:

http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

Search the kbases here;

https://www.sdn.sap.com/irj/sdn/businessobjects-articles

And these resources will also be of help:

http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/devsuite.htm

https://boc.sdn.sap.com/developer/library

C:Program FilesBusiness ObjectsCrystal Reports 11.5Helpencrsdk_samples_aspxdatacrsdk_net_tutorials_115_en.zip

C:Program FilesBusiness ObjectsCrystal Reports 11.5Helpencrsdk_net_docdoccrsdk_net_doc.chm

Ludek

former_member183750
Active Contributor
0 Kudos

See if moving the parameter code to just after you log on to the database and before you export helps.

Ludek