Solved

ActiveX and Passing Parameters

Posted on 2004-04-15
9
704 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
[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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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