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!

CSP problem (displaying instances)

Status
Not open for further replies.

crystalvictim

Programmer
Dec 4, 2002
92
DE
Hello there,

we want to create a csp page which displays the last instance of a report specified by its number/ID (in fact, we have to as there's no other way to accomplish this...).

I downloaded the get_instance sample code provided by the knowledgebase and quite quickly succeeded in querying the CI_INFOOBJECTS container and retrieve the last instance's ID.

Now here's my problem: As I understand, the viewrpt.cwr can only be used when displaying an .rpt-file. I get an error (concerning the 'invalid' pdf-format) when trying to use this with an instance that has been created in acrobat format.
So I figured out that I'll obviously have to use 'infoobject.cwr' instead (which unfortunately seems to be poorly documented). It is used in showreportscript.js, so I can see how to get the last instance's ID, but I have no clue how to cope with the parameter WCSID.
This is said to be the session's logon token. Well, I've created such a token according to the above mentioned sample csp, write it into a cookie and retrieve it, but it simply doesn't work. The token's structure also seems to be quite different from the numeric-only format the WCSID in ePortfolio has.

So after having spent almost 2 days and not getting any closer to identifying the problem, my only hope is - as usual - that it's only one or two lines of code that I am lacking and that these might be provided by someone who has already managed to create a similar page.

By the way, we're using CR/CE8.5.

Thanks in advance,
Frank
 
I haven't done this, but I have simply copied the URL for the history page in CE and used it directly with success.

Perhaps you can leverage that page instead.

-k
 
I'm afraid, no. This doesn't work - I get the same error telling me I'm lacking authorization to retrieve data from the server.
I only works if I manually log onto the CMC before calling the link. So I guess there's something wrong creating or re-receiving the saved logon token. Nevertheless, I'm able to query the database, so the login seems to be successful...
But I'm still not quite sure, what the difference between the logon token created by logging onto the server-db and the WCSID is.
 
I'll give it a try tomorrow.
The SDK-help says, WCSID is a kind of logon token. But - after digging in the csp-pages provided by CMC / ePortfolio - it seems that there are LOT's AND LOT's of these tokens. Logontoken and ePortfolio_logontoken as well as WCSID- and CMC-tokens. To make things even worse, I figured out that - when logged onto CMC manually, it doesn't matter at all if I use infoobject.cwr's WCSID-parameter. The link synapsevampire suggested will work, but - alas - only as long as I'm manually logged in. Trying to successfully rebuild this procedure with an own csp acutally seems far beyond my reach - at least without much more time to spend on this matter. So as I said, I'll try out your suggestions and in case this won't work either, I'll suggest having this built by some consultant. We'll anyway have to ask our contact person about further versions of Crystal / BO and their compatibility concerning csp-pages (object model and so on)...

So far - thanks for your efforts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top