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

PowerPrompts - Loading pages with Frames

Status
Not open for further replies.

rigged

Programmer
Jul 24, 2003
6
0
0
US
I am new to Cognos powerpromts and HTML but learning fast and having fun.
I can set up a powerprompt appplication with multiple pages and produce a report.
My question is, I want to use frames, loading multiple pages, and delete and add them at will. Works great outside powerprompts! In powerprompts, I get: HTTP Error 403 - complains about access, and won't load my pages.
I use SCR="myPage.htm" and myPage is in the same directory as the application.
If I use SCR="C:\DirA\DirB\etc..\myPage.htm" it works!
But that will cause problems when I move it to a production server.
 
Hi, I am also learning fast and enjoy the process.

What I have discover is, if your .asp or .html code need to include some file, that file to be located under
"program files\cognos\cer3\cgi-bin"

So you may <!-- #include &quot; -->

If you don't want to screw up the cgi-bin directory, you may setup another virtual directory to hold all sort of include files. This works when your Cognos server is the WEB server. I haven't tried the case of production environemnt where the WEB server is somewhere in DMZ.

By the same token, as long as the include file URL is reacheable, it should work.

To make life easier, I kind of squeeze everything in the same file. I use layers instead of frame to achieve more or less the same UI experience.
 
Hi Rigged,

There is a similar topic on the cognos knowledgebase but it deals with supporting images in your powerprompt apps. The cognos virtual directory is mapped to cer3\webcontent, create a new directory in the webcontent folder named &quot;frames&quot;. Now when you reference the page use:

src=&quot;/cognos/frames/myPage.htm&quot;

I've set up the same thing for images and any other resource I use in an app. (Tip: set up a shortcut in your sendto folder and it makes moving files there a breeze, assuming your on a windows system)

If you're developing on your local machine and publishing to a server I would also recommend adding the frames folder to your local setup. This will help in not having to rewrite your code. There is a powerprompts function that can test whether or not you are in testing mode and you can set variables based on that, but it's almost more trouble than it's worth for something like this. I only use it for database connection variables myself.

Cheers,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top