Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Crystal report with stored procedure in subreport

Reply
Thread Tools

Crystal report with stored procedure in subreport

 
 
kenneth xg
Guest
Posts: n/a
 
      04-20-2005
Hi,

I have problem on passing parameters to subreports' stored procedures
which require parameters, from an asp.net web form.


I ve tried to use the stored procedures on the main report it works
fine, however once the stored procedures were put into a subreport, it
cause an exception:
"Missing parameter field current value"


I am pretty sured that I reference to the subreport's parameter, below
are the code used to populate the parameters

------------------------------------------------
ParameterFieldDefinitions parameterFieldDefinitions =
reportDocument.DataDefinition.ParameterFields;
ParameterFieldDefinition parameterFieldDefinition =
parameterFieldDefinitions[SUBREPORT_PARAMETER_FIELD_NAME,
SUBREPORT_NAME];
parameterFieldDefinition.CurrentValues.Clear();
parameterFieldDefinition.CurrentValues.Add(paramet erRangeValue);

------------------------------------------------
in the code behine file.

Dose anybody know why it dose not for subreports' stored procedures with
parameters and how to fix it?

Many thanks


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Kenneth
Guest
Posts: n/a
 
      04-20-2005


It is working fine now?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
crdev
Guest
Posts: n/a
 
      04-23-2005

Please help with Crystal Subreport Links

--------------------------------------------------------------------

Using I Crystal Report 9 environment I created a report with a
subreport, a parameter param_main_1 in the main report and a parameter
param_sub_1 in the subreport. Then I linked param_main_1 to
param_sub_1. I placed the field param_sub_1 on the subreport section to
make it active.

From my VB6 application I tried to analyse subreport links.
I created a crystal application object and open a report.

Dim repApp As CRAXDRT.Application
Set repApp = New CRAXDRT.Application

Dim rep As CRAXDRT.Report
Set rep = repApp.OpenReport(txtReport.Text)

Then I found a subreport and opened it

Dim oObject As Object
Dim oSection As Object
Dim oSubReport As Object

For Each oSection In rep.Sections
For Each oObject In oSection.ReportObjects
If oObject.Kind = crSubreportObject Then

Set oSubReport = oObject.OpenSubreport

I retrieved a collection of Subreport links and got my link

Dim oSubreportObject As CRAXDRT.SubreportObject
Dim oSubreportLinks As CRAXDRT.SubreportLinks
Dim oSubreportLink As CRAXDRT.SubreportLink

Set oSubreportObject = oObject
Set oSubreportLinks = oSubreportObject.Links
For i = 1 To oSubreportLinks.Count

Set oSubreportLink = oSubreportLinks(i)

I got a main report field of the link and see its properties (at least
a name)

Dim oMainreportField As Object
Dim mainreportFieldName As String

Set oMainreportField = oSubreportLink.MainReportField
mainreportFieldName = oMainreportField.Name

But I CANNOT retrieve a reference on SubreportField !!!

Dim oSubreportField As Object

Set oSubreportField = oSubreportLink.SubreportField

An error 5 "Invalid procedure call or argument" is raised.

================================================== ======

Could anybody tell me where I am wrong? And how to get a valid
reference on a subreport field of a subreport link?

Thanks in advance



--
crdev
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any suggestion about how to set page orientation of subreport in Crystal report? brett ASP .Net 0 09-01-2007 12:57 AM
Crystal Report: Stored Procedure and Temporary Table arock ASP General 0 07-12-2006 04:35 PM
Exporting Crystal Reports subreport data David Dvali ASP .Net 0 11-25-2005 03:51 PM
printing on demand Subreport crystal =?Utf-8?B?TWJpc2hy?= ASP .Net 0 07-26-2005 05:25 PM
FAIL TO LOAD THE CRYSTAL REPORT USING WEB CRYSTAL REPORT VIEWER Comfort ASP .Net Web Controls 0 10-18-2004 01:35 PM



Advertisments