Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Viewer Web Report Parameters

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Can anyone give me a comprehensive explanation of how to pass parameters to a report being viewed on the web with the ActiveX viewer? The report comes up, but never prompts for the start and end dates.

I've read something about the websource.AddParameter method, but need this explained. If there was a way to pass them using the URL, that would be the best!!!

Someone help please!!!!!!!!
 
I would also like to know this, I want to create ASP pages with drop down options of parameters which are then passed to a Crystal report and the data then drawn from a source and displayed.

If anyone can help, I have Crystal 8 Developer.
 
Having the same problem as the people above, can't seem to create a list from wich i can pick the apropriate parameters. I would like the know if somebody has created a webbased report with paramaters you can chose and how they have done this.
 
I have successfully created web based reports using parameters

Have you added the parameters to the record selection formula?

Can you run the report from within Crystal successfully? ie you get the parameter prompts you want.

 
So how did u do this?
Is there a Crystal based wizard to guide through or do I need to code the ASP page and join it to a crystal report which is then linked to a data source?
 
in response to bleather yes i can use them succesfully from within crystal. I am prompted for the correct parameters, but when i use it from within my webbrowser i have to enter all the parameters manual because i cannot choose from the picklist. Any other things i should check?
 
In crystal 8 I do it with the ParameterFields collection (RDC object). Here is a jscript function I created for this purpose. Maybe it will point you in the right direction.

function RptSetParameter( strParameterName, strParameterValue, _bClear ) {
var bClear = true;
if ( typeof _bClear != "undefined" ) bClear = _bClear;
var ret = true;
try {
//' set the parameters
Parameters = Session("oRpt").ParameterFields;
for (i = 1; i <= Parameters.Count; i++) {
oParameters = Parameters(i);
if ( oParameters.Name == strParameterName ) {
if ( bClear ) oParameters.ClearCurrentValueAndRange();
if ( oParameters.ValueType == crNumberField) {
oParameters.SetCurrentValue(strParameterValue * 1);
} else if ( oParameters.ValueType == crDateField ||
oParameters.ValueType == crDateTimeField ) {
SetParameter( oParameters, strParameterValue);
} else {
oParameters.SetCurrentValue(strParameterValue);
}
break;
}
}
}
catch ( e ) {
this.sLastError = UASPReportError(this._Name, &quot;SetParameter(&quot;+strParameterName+&quot;,&quot;+strParameterValue+&quot;)&quot;, e);
ret = false;
}
return ret;
}
 
Hi John,

Having looked at my current reports, I haven't used pick lists. Have now tried using and had the same result as you. In a Crystal Technical Brief for version 8.0.0.371 it says that this is a limitation/known issue. If I find anything else will let you know.

Sorry can't be of any help.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top