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!

How to display report title on Parameter Entry page in enterprise 9

Status
Not open for further replies.

mary2003

Programmer
Jun 4, 2003
11
0
0
US
Hi,

I using Crystal Enterprise 9 efolio. I like to display Report's title on Parameter entry page.
I tried to display the report title in many ways. I couldn't do it.

Can you please tell me which csp/config file has to be updated to achieve the goal.

Thanks

Mary
 
Hi,
You may have to write some custom csp ( or asp, same thing)
code to retrieve the report's name from CI_INFOOBJECTS.

Something like this ( 8.5 example, don't know if 9 is different):

Code:
	var IStore;
	var LogonTokenMgr;
	
	// Create the InfoStore object
	IStore = Sess.Service ("", "InfoStore");
	
	// Store the INfoStore objec tin the session using the helper functions.
	SetSession("IStore", IStore);
	
	// Retrieve the LogonTokenManager.
	LogonTokenMgr = Sess.LogonTokenMgr;
	
	// Retrieve a Logon Token and store it in the user's cookie file for later use.
	SetCookie("LogonToken", LogonTokenMgr.CreateLogonToken("", 1, 100));
	

	//Retrive the collection of reports
        var Query = "SELECT SI_NAME, SI_ID From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' and SI_INSTANCE=0 ORDER BY SI_NAME";
	var Reports = IStore.Query(Query);

	//The Reports collection contains and array of SI_NAME and SI_ID variables for the reports in the system.
I use this on a form to populate a SELECT list for the user to pick a report to run so it gets all of them. You can modify the where clause to just retreive the one you want by using its SI_ID.

Hth,
[profile]
 
Thank you very much for the immediate response.

As you said I have added a customised page for displaying report names. It's listing all the report names including unused reports.

Here is the code
var Query = "SELECT SI_NAME, SI_ID From CI_INFOOBJECTS Where SI_PROGID='CrystalEnterprise.Report' and SI_INSTANCE=0 ORDER BY SI_NAME";
var Reports = IStore.Query(Query);

var Reports = IStore.Query(query);
if (reports.count > 0)
{
for (i = 1;i<= Reports.count; i++)
{
var obj = Reports.Item(i);
var reportName = Obj.Title;
Response.write(ReportName);
}
}
else
{
}

Is there any way to see the table description to access the parameters associated with that report or to see only active reports.

Moreover i like to access SI_NAME alone. How can i do it.
I tried with obj.SI_NAME.. it didn't work out.

Thanks in advance

Mary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top