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

Script --- Prompt for Cube

Status
Not open for further replies.

unknown07

Technical User
Oct 18, 2007
2
DE
Hello,

I hope you can help me.

I have several Powerplay-Reports (*.ppr) and I have to link to a new cube on a new server.

Without a Script I would use "Prompt for Cube" while opening the report but I have to many reports to do it without a script.

So I would be very nice if somebody could gave me an advice or an example.

Thanks a lot.
Best regards.
 
unknown01,
What you require should be reasonably simple, as the Open command can be used to set a path for the report. Check the Macro Help for "Open Method (Report)".
e.g.
Code:
objPPRep.Open "C:\Report.ppr", "\\acmeserver\cognos\cubes\New_cube.mdc"
If you loop on the directory containing your reports, you can display the report, request a cube to run it against (perhaps a drop-down list populated from the new server) and then open the report against the new cube, prior to saving the new report in another folder - jobsa goodun!

Happy Friday,
lex

soi la, soi carré
 
Hi drlex,

thank you very much for your answer.

I've forgotten to say, that all cubes are on an enterprise server.

But by using your example I coluld solve my problem.

So thank's a lot.

Best regards
jens
 
Jens
You're welcome. For remote cubes, as per the help file, you need to specify the server and cube without the .mdc extension, together with a timeout (in seconds).

Changing the example:
Code:
objPPRep.Open "C:\Report.ppr", "PPDSRemote;ACMECOG01;New_Cube;60"

(Note that you would need to specify the logical path to the cube if you arrange your remote cubes in folders - eg "PPDSRemote;ACMECOG01;Cube Folder\New cube folder\New_Cube;60")

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top