Solved

ActiveX and Passing Parameters

Posted on 2004-04-15
9
700 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
 
LVL 100

Expert Comment

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

mlmcc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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 …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

914 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now