Solved

ActiveX and Passing Parameters

Posted on 2004-04-15
9
702 Views
Last Modified: 2007-12-19
I have an ASP application that uses CE9 to view reports on the web.

I would like to use the ActiveX viewer as my viewer.

The ASP page that the user's access allows users to select a myriad of parameter values (e.g. a bunch of drop down boxes).

I'm currently using the statement:

Response.Redirect("viewrpt.cwr?id="+id+"&apstoken.....)

to call the activex viewer. Using this method how do I pass parameters?

I can pass parameters using a vbscript that creates a viewer object and adding the parameter field to the collection.

Is there a similar method to create a viewer object for the ActiveX viewer???

HELP!!
0
Comment
Question by:jpmcclain
  • 4
  • 4
9 Comments
 
LVL 42

Accepted Solution

by:
frodoman earned 500 total points
ID: 10833620
You can use promptex to pass parameters in the url.  

I'm working from memory but I believe the syntax is:  &promptex-1=12&promptex-2=blue...
0
 

Author Comment

by:jpmcclain
ID: 10833634
I was hoping to avoid that method because users can select multiple values for each parameter. I thought that it might get messy if I put them in the url.

Thoughts?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 10833706
I think they just go in the URL separated by commas:  promptex-2=blue,red,green&...

I haven't actually done this myself but from what I've read in the documentation it sounds like a straightforward process.  I don't have any other ideas w/in the CE framework.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 100

Expert Comment

by:mlmcc
ID: 10835665
I believe that is correct.

mlmcc
0
 

Author Comment

by:jpmcclain
ID: 10836376
Is it worth trying something like this?

http://www.experts-exchange.com/Databases/Crystal_Reports/Q_20553244.html?query=activex+parameter&searchType=topic

Where I use a WebBroker??

Any good examples of this would be helpful.

0
 
LVL 42

Expert Comment

by:frodoman
ID: 10836462
I have not experience with this so I can't offer an opinion on it...
0
 

Author Comment

by:jpmcclain
ID: 10837587
I tried a simple promptex solution and I'm getting odd results.

Here's my code:

teststr = "&promptex-SelectionApplication='CARMS'";

Response.Redirect("viewrpt.cwr?id=" + id + "&apstoken=" + Server.UrlEncode(token) + teststr + "&init=actx:connect");

I'm still being prompted for the application value when the report runs? Its like viewrpt.cwr ignores the promptex command. Any ideas?

I also tried substituting promptex-1 inplace of the parameter name. No luck.

Any ideas?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 10842079
Is the first parameter #1 or #0?  Should it be promptex-0 ?
0
 

Author Comment

by:jpmcclain
ID: 10845188
I got it to work.

I had to enclose the values in " instead of '

Thanks for all your help!

teststr = "&promptex-SelectionApplication=/"CARMS/"";

Response.Redirect("viewrpt.cwr?id=" + id + "&apstoken=" + Server.UrlEncode(token) + teststr + "&init=actx:connect");

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String to Date Formula Failure 2 49
Crystal - variable evaluate after with criteria 4 54
Crystal Reports No Record Returned 2 51
Sum not calculating correctly 22 31
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 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