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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PromptEX in CE 10 2

Status
Not open for further replies.

tpaddack

Programmer
Nov 17, 2003
28
US
Hey there,

I'm trying to get some data security via using the PromptEX functionality that is referenced in their wed developers guide. Now I see that in lots of places people have used it, and Crystal claims that indeed, it is safe and sound in CE 10. But I feel like Rodney Dangerfield here. I ain't getting no respect.

I've tried updating the URL and running it, but no dice. I used a URL like this:

"
But no luck.

I tried updating the file rptviewer.csp to include this promptex parameter as a hidden parameter, but nothing seemed to help.

Code:
//DISPLAY THE REPORT VIEWER
var url;
if ( IsWin32Server() && ( strViewer.search(/html_interactive/i) != -1 ) )
{
	url = "viewreport_ia.csp?init=connect&id=" + reportNumber;
}
else if ( IsWin32Server() && ( strViewer.search(/html/i) != -1 ) )
{
	url = "viewreport.csp?init=connect&id=" + reportNumber;
}
else
{
	url = "viewrpt.cwr?id=" + reportNumber;
}
var sf = Request.QueryString.Item("sf");
if (sf.Count != 0)
    url += "&sf=" + Server.URLEncode(sf);

Response.Write("<script language='javascript'>" + vbCRLF);
Response.Write("function init() { document.forms['viewForm'].submit(); }" + vbCRLF);
Response.Write("</script>" + vbCRLF);

Response.Write("<form name='viewForm' method='post' action='" + url + "'>" + vbCRLF);
Response.Write("<input type='hidden' name='apstoken' value=\"" + Server.HTMLEncode(strToken) + "\">" + vbCRLF);
Response.Write("<input type='hidden' name='init' value=\"" + Server.HTMLEncode(strViewer+":connect") + "\">" + vbCRLF);
Response.Write("<input type='hidden' name='promptex-viewer' value='1003'>" + vbCRLF);
Response.Write("</form>" + vbCRLF);

It's the last line of the form:
Code:
Response.Write("<input type='hidden' name='promptex-viewer' value='1003'>" + vbCRLF);

So anyone got an ideas of what's going on here? Working with the processing extensions is looking ugly. I've got it working pretty well but cannot easily get information into the pe from an outside source.

All suggestions are welcomed.

Thanks,

T
 
HI,
Not sure what the problem may be, but the promptex- style
parameter passing works fine in my CE10 setup..

Here is one 'calling' URL I use:
Code:
[URL unfurl="true"]http://MyCEServer/AfmsTest/includes/viewrpt.cwr?id=2182&apsname=Guest&apsauthtype=secEnterprise&promptex-District="ALL"&promptex-EmpNbr="ALL"&promptex-MaintShopCode="ALL"&promptex-SMaintZone="ME"&promptex-PriorityCode="G"&promptex-SSystemID="00112"&promptex-HistoryFlag="active"&promptex-CompRept="N"&promptex-StartDateStr="04/08/2004"&promptex-EndDateStr="04/15/2004"&init=actx[/URL]

Works fine..I do not use viewrpt.csp but viewrpt.cwr ( the one that viewrpt.csp calls )..


[profile]
 
This is the problem I'm starting to see why this does not work. I cannot see the file "viewrpt.cwr" anywhere in my file system on my CE 10 machine. Noe on any of my CE 9 test machines.

Do I have to install "viewrpt.cwr" specially? Did you keep it from an upgrade from a previous version? I'd love to get this going and avoid the whole C++ nightmare of the processing extensions.

Thanks,

T
 
Okay. I did not know that.

When I go to that web address, this is the error I get:

Web Component Server Error
Bad Parameter
[/color red]
So I figured it was not available in CE 10. Is there something I have to do to my WCS? Some set of files I need to install?
 
Strange. It is definitely part of CE10.

Can you post the exact URL you are using to test viewrpt.cwr?



Kingfisher
 
D'oh. Well Okay. I'm an idiot - partially. I was not looking for "viewreport.cwr", not "viewrpt.cwr". But even when I change it to "viewrpt.cwr", I still get errors.

Here is the old URL I was using:
Code:
[URL unfurl="true"]http://crystal-test/crystal/enterprise10/admin/en/viewreport.cwr?id=1042[/URL]

here is the new URL I tried:
Code:
[URL unfurl="true"]http://crystal-test/crystal/enterprise10/admin/en/viewrpt.cwr?id=1042[/URL]

I get a new error:
Error encountered by Crystal Page Server
----------------------------------------------------------
The error message returned is:

Internal error. [On Cache/Page Server: crystal-test.corp.movaris.com][/color red]

And when I tried what you suggested:
Code:
[URL unfurl="true"]http://crystal-test/crystal/enterprise10/admin/en/viewrpt.cwr[/URL]

I get this:
Error encountered by Crystal Page Server
------------------------------------------------------------
The error message returned is:

File C:\Program Files\Crystal Decisions\Enterprise 10\Web Content\enterprise10\admin\en\viewrpt.cwr not found. [On Cache/Page Server: crystal-test.pageserver][/color red]

So it looks like my browser is actually looking for the file.

And it also looks like viewrpt.cwr is using the ActiveX viewer too. Is it enforced or is this changeable?

So I'm slowly getting there...
 
Hi,
It should find a report it if you just use the format:

Without the ID it will give you the error you saw..
So give it, at least, a report#..viewrpt.cwr needs an object..That is what it did not find.

To control the viewer, use the
init=actx
or
init=Java, etc ( see the docs for all values you can use)
parameter...


[profile]
 
Okay,

I have reformed my wicked ways. I tried a different report and it worked fine with that report number. The viewer came up with the report required. Thanks!

However, when I add the parameter &promptex-viewer_id="a"[\color] the system seems to ignore it. This is a string parameter in the report, is added to the selection formula and has no defaults.

I noticed that some people put a "@" sign in front of their parameter like so &promptex-@viewer_id="a"[\color]. What is that for? These are not prompts in the subreports. Am I missing something?

Now I looked around and saw that some people posted some guidelines for making their parameter work. I followed them, but still seem to be getting the high hard one from the Page Server. No luck.

Any ideas why?

I've just been given a deadline on this one. If it's not together (on how this is going to work) by the end of the month, this project is cancelled. Nice, huh?
 
Hi,
Time to read some docs..
In general,in Crystal's earlier versions, you needed to specify the Parameter values in subreports by using the
prompt0@sub1= or promptex-name@sub1= type string. In 8.5 and above of CE, this can be handled when the report is published and the default database connection info is provided.

Why would you try to include a HTML [color][/color] tag in a prompt? Parameters do not have colors just values..

To see what the URL can contain, go to Support at Business Objects and get this file:
ce8_urlcommands.pdf

[profile]
 
Do you have "Prompt the user for new value(s) when viewing" checked in CMC - Your params will be ignored if not.

I just ran CE10
Code:
[URL unfurl="true"]http://MyCEServer/crystal/enterprise10/ePortfolio/en/viewrpt.cwr?promptex-Amount%20of%20Sales=20000000&id=9486&init=actx[/URL]
It worked fine, I can change the Amount of Sales param and the report reflects the changed parameter.

Kingfisher
 
I may be blind, but I have read the documentation in crystal's WebProgrammersGuide.chm many times and I do not remember seeing anything about "Prompt User for new value(s)". Anyway, that was the trick.

As for the color tags, I was trying to make it look nice for you guys here on Tek-Tips[/color red].
 
Hi,
It is understandable,much of the documentation is not easy to find - especially any involving actual use of the options in the CMC...Searching the Business Objects knowledge base can sometimes find better info.

I should have guessed about the TGML tags..

[profile]
 
Yeah, they sure do not make it easy when you want to do the more interesting stuff. I hit Crystal's Kbase and thier user forums pretty hard but there was remarkably little infromation there. A couple guys were worried that promptEX was removed in CE 10, which had me wondering. Nobody in their forums seems to be in the habit of responding.

I was looking for the WebProgrammerGuide.chm (or whatever it's called) for a couple years and just recently found it by random chance. I askled them for it about a half-dozen times and was usually told that it didn't exist, even though it's referenced in thier other docs.

This site is far superior at times, especially when you want to get input from real programmers.
 
Hi, I had the same concerns ( even when CE9 came out) about promptex-, but was assured by support that, altho' it was not the 'newest and most preferred' method of parameter passing it would still be supported due to the hundreds of thousands of installed systems that use that method..If BO expects to sell upgrades to those folks, they cannot expect then to rewrite that much code.


The web developers guide was part of the Launchpad ( in 8.5) but seems to have been well hidden after that..
The 'check for newer docs' link ( actually JavaScript ) on the CE10 Launchpad page is incorrect ( it points to crystaldecisions.com not businessobjects.com ) so you need to use:

Even there, no web admin guide, but COM, .NET and Java guides are there ( I would use the 8.5 web developer's guide even with version 10 )


[profile]
 
Yeah, I saw a lot of that kind scuttlebutt on thier forums about CE 9 and CE 10. People are wondering what CE 11 will look like and some worry it may not even be on the schedule. Of course my good friends at Crystal's old office assure us that it is in the works. It should have more hooks into BO's product.

That's interesting about the launch pad. I never did look there whane I had CE 8.5 installed. It's such a great document, allowing one a good window into programming their stuff. I guess they realized too many people were using their product in ways they never imainged; coding it on the cheap instead of buying their fancy features. I imagine we will be seeing more of such behavior as the integration with BO progresses...

Best,

Todd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top