What version of CR/CE are you using, what's the datasource and the connection method?
I also noticed in the original posting some conflict in the URL. There was a user0 and apsuser commands being passed in.
If the report being called is actually an .rpt file stored in a virtual directory, the report is not being managed by Enterprise so there is no need to log in to the APS.
In the last post it looks like you are calling a report that was scheduled or added to the Entperprise system. In which case it could be considered a managed report and should be called in the URL by ID using viewrpt.cwr (see the white paper) rather than explicitly.
(my suggestion) Before getting into the coding of .js files and the like you should first make sure you can get the URL working as it is. Nice and simple.
1. Start with
How many db login prompts do you get?
Are you asked for more than user and password? (hope not)
Any parameters?
Once entered will the report preview? If yes, then refresh the report in the viewer. Does this work as well? If yes, then you know you have valid connectivity.
If not, then
2. make sure the Page Server is running as a Domain/admin account to ensure it has access to the reports data source.
Repeat #1
3. Now add the db login URL commands to align with what prompts you found in #1 above.
If using user0 and password0 do not work, try using the other approach --
User-<servername>.<databasename>& Password-
<servername>.<databasename>
where:
server name = system DSN
database name = dbName
user name = user
password = pass
Does this approach work?
Once this works, the only way to truly hide the user and password would be drop this is an .asp or .js file on the server and call it.
You could use the HIDDEN tag, but this will still expose the info in the HTML of the page.
Sounds kind of tedious to take baby steps, but URL reporting can be tricky (in my experience) and in some cases a non-starter.
Here are a couple of things you may find useful
Crystal KBase article -- c2005487
White Paper --
Sorry to go on so long. Hope it helps and does not confuse the issue.
Cheers,
SurfingGecko
Home of Crystal Ease