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!

Setting db login info for multiple reports in CE10

Status
Not open for further replies.

gshadz37

Technical User
Mar 21, 2005
102
0
0
US
Does anyone know of a way to set the password for a database on multiple reports at the same time instead of going into the Process tab>Database and setting it for each individually? This is in CE 10, I'm using Business Views with an ODBC connection to an oracle db.

Thanks.
 
I don't believe there's any solution included in the Crystal Enterprise box, but it would be possible to do it programatically, as you can set the Password property of an InfoObject and then use its Commit method to write back to the CMS.

Problem would be how to tell any script you wrote which reports to set the password for. Are they all in the same folder perhaps? Otherwise, you'll have to find all the SI_IDs in advance or input them one at a time, and this doesn't seem much quicker than doing it through the normal interface.

Here's an example of how it can be done, which changes the passwords of all reports in folder 195 (this is one of the sample report folders on my installation) to "A". You'd need to have logged on and got an IStore before running this.

Code:
<%

On Error Resume Next


'Query for a report.
Dim Result
Set Result = IStore.Query("Select SI_ID, SI_PROCESSINFO.SI_LOGON_INFO From CI_INFOOBJECTS Where SI_PARENT_FOLDER=195 And SI_PROGID = 'CrystalEnterprise.Report'")

Dim oReport
For Each oReport In Result
	Set ReportInterface = oReport.PluginInterface
	For Each repLogon in ReportInterface.ReportLogons
			repLogon.Password="A"
		Next
	IStore.Commit Result
Next

Response.Write "Done"%>

Duncan
 
Hi,
Once published, you can use the 'Schedule Manager' from the administrator launchpad to change the logon info for all the reports in a selected folder..


When publishing, of course, you can use the Publishing Wizard to set the default user/pass for the reports.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top