Talk with the Author
 Crystal Reports Forum : General Information : Talk with the Author
Message Icon Topic: Missing Parameter value for parameters used in a s Post Reply Post New Topic
Author Message
Dilip Nagle
Newbie
Newbie
Avatar

Joined: 23 Nov 2006
Location: India
Online Status: Offline
Posts: 8
Quote Dilip Nagle Replybullet Topic: Missing Parameter value for parameters used in a s
    Posted: 23 Apr 2008 at 8:45pm

Dear Brian,

I am a member of your E-Books on-line(userid: naglesys) and the books have been very helpful.
But, I am still facing the problem in following context. 
 
Sub: Passing of Parameters to SP of SubReport

I had sent you following query on CRystalReportsBooks.com and you had replied to it. But, when I read  Chapter 17, I did not get information about passing parameters to the Stored procedure used as a dataSource of SubReport. I tried all you had mentioned in your reply but I still get the message missing Parameter value.

I give below my code. So, pl. tell me what to Do.

Background:

1. I have a Main Report whose Data source is a Stoted Procedure with two input Parameters @P_FINYEAR and @P_DEPT. These are shown by CR in Parameter List.

2. I have a sub-report(embeded in Main Report), whose data source is also a Stored Procedure with two input Parameters @P_FINYEAR and @P_DEPT . These are also shown in parameter list of SubReport.

3. The Main and sub Reports are linked based on two Fields of the Datasource viz. FINYEAR and DEPT.

4. I have been passing parameters to Main & Sub Reports as follows:

Dim ocrListTax as crListTax (which is class for my rpt file)
Dim oSubReport as new ReportDocument
ocrListTax = New crListTax
ocrListTax.SetDatabaseLogon(’abc’,'pqr’,'NS-01′,’nsdb’)

ocrListTax.SetParameterValue(@P_FINYEAR “, intFinYear)

ocrListTax.SetParameterValue(”@P_DEPT”, strDept)
oSubReport = ocrListTax.OpenSubReport(”crSubReport.rpt”)
oSubReport.SetParameterValue(@P_FINYEAR “, intFinYear)
oSubReport.SetParameterValue(”@P_DEPT”, strDept)
ocrListTax.ExportToDisk(ExportFormatType.PortableDocFormat, ‘d:FinTax.pdf’)

ocrListTax.Close()

The Problem

It still gives me missing parameter value error.
(CR2003.Net version is used by me. The error also appears in CR2005.Net)

Note: The Quick Watch(debug option) shows that it is a subreport and it is loaded and yet the error of missing parameter value continues.
 
Regards,

Dilip Nagle

Dilip Nagle
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 24 Apr 2008 at 8:09am
Hi Dilip. I just posted a response in the eBook area where you posted this question.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.