Solved

Crystal Reports 8.5 Passing Parameters dynamically??

Posted on 2004-10-19
7
901 Views
Last Modified: 2012-06-22
I have a set of asp pages that are a plug-in for our custom application.

The basic function of these pages is to open a report, which the user selects during runtime and display it using the activeX control.

I need to add the following functionality.
I need to determine if the report has any parameters on it, and if so prompt the user for input to the parameter.  I am having trouble trying to figure out how to do this.  From what ive seen you need to specify the name of the parameter to be able to access it as an object.

Session("oRpt").ParameterFields.GetItemByName("ExampleStringParameter").AddCurrentValue(CStr("I am a string"))

How can i find out the parameter name and prompt the user for the value just by executing my asp pages?

Thanks
Greg R
0
Comment
Question by:Rowdyone52
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 4

Accepted Solution

by:
stasau earned 500 total points
ID: 12351771
You can do this by looping through the parameter fields add creating you page based on that.  I did it once but it was a pain.  Do something like (I dont remember the code exactly since I have not worked with 8.5 in a long time):

'Loop through all of the parameters in the Report
for i = 0 to Session("oRpt").ParameterFields.Count
  'Build you control here - something like
  Response.write "<input type=text name='" & Session("oRpt").ParameterFields(i).ParameterFieldName & "' >
next


Using the Paramterfields collection you can also get the Prompt, default values, ranges and other things and make this a lot better.  If I have time tonight I will throw together an example if you need more help.

0
 

Author Comment

by:Rowdyone52
ID: 12351788
is there a way to use the EnableParameterPrompting to prompt the users for the parameters?  I can do this when it refreshes, but only on refresh
0
 
LVL 4

Expert Comment

by:stasau
ID: 12351841
Not that I know of.  Even using my method would force you to create a parameter page and a viewer page (or do a refresh).
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:Rowdyone52
ID: 12351858
do you know if I looped through all parameters using something like

for i = 0 to Session("oRpt").ParameterFields.Count

next

and cleared them using

session("oRpt").ParameterFields.Item(i).ClearCurrentValueAndRange

would it force a new prompt?

just throwing out ideas thanks for your help
0
 
LVL 4

Expert Comment

by:stasau
ID: 12351885
It might.  In theory it should prompt for anything that does not have a value but I do not remember well enough how prompting works over the web for this version.  I am looking for my code I wrote that does this but I dont know where they moved it too on our network because we replaced it with a newer version.
0
 

Author Comment

by:Rowdyone52
ID: 12351895
i would love a newer version!! .NET would be nice.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question