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

List View of a specific users reports

Status
Not open for further replies.

cutiger93

Programmer
Jan 11, 2001
55
US
I would like for my users to be able to logon and see only their reports that have been assigned to them in a list view form. I do not want to use the folder view that is currently in CE.


Anyone have any experience or advice. I was able to do it in CE 8, but I have been unable to figure it out in CE 10.


I am using CE 10 on Windows 2003 with IIS and CR 10.

 
Sorry everyone. I did not do a good job describing what I want. So here we go.

Currently we have this layout

Home
|_ Favorites

Folder1 ---You can click on the folder to go the report.
Folder2
Folder3

Here is what I wish to have:

Home
|_ Favorites

Report1
Report2
Report3
Report4
ETC.

I do not want the folders to show only the Reports that a user has access to?

Any suggestions?

Thanks for everyone's help.
 
Just publish the reports to the User folder. A user does not need "Folder1", "Folder2", etc. in his Favorites.
 
Thanks for your suggestions. I am not getting across what I needs to be said.

All I want is a listing of the reports when a user logs in that he/she has access to with out any folders.

For example:
User1 logs in and instead of seeing the folders and then drilling down into the reports I want the user to be able to log in and then just see the reports (no folders). Sorry for the miscommunication.



 
Hi, you can do that if you write custom csp code to query CI_INFOOBJECTS for Reports - It will only return reports that the user has access to.
The results of the query are an array which you can then display ( say as an HTML table)

Here us a part of a function set we use to do that( based on CE supplied examples)..

Code:
function RetrieveReports(IStore) 
{
//This returns an HTML table that is populated with the report name and
//report description.

//Precondition:
//IStore - The InfoStore object required to interface with server.


//Postcondition:
//Returns an empty string if there are no reports, null if an error occurred, and
//the string if successful.

//Notes:
//The function returns a string that is an HTML table. 
	//The query that will select the reports.
	var Query;  
	//The result of the query.
	var Result;
	//A string to hold the HTML table.
	var HTMLTable; 
	HTMLTable="";

	//Create a query that selects all the reports, but doesn't select the instances.
	Query = "Select SI_NAME, SI_ID, SI_DESCRIPTION From CI_INFOOBJECTS Where " +
	"SI_PROGID='CrystalEnterprise.Report' And SI_INSTANCE=0 +
	"ORDER BY SI_DESCRIPTION";
		
		
	//Query the server.
	try {
		Result = IStore.Query(Query) ;
	}
	catch(e) {
		return null;
	}
	 
   
	if (Result.Count > 0) {
		//Set up the table header.
		HTMLTable="<TABLE width = \"800\" >" +
		"<TR><TH align='left'><B></B></TH>" +
		"<TH align='left'><B></B></TH></TR>"; 
				
		for (k=1;k<=Result.Count;k++)
		//Add the report name and details to the table.	
		{ 
		         if (Result.Item(k).Description == "") {
			var desc1 = Result.Item(k).Title;
			}
			else {
			var desc1 = Result.Item(k).Description;
			}
			var desc = Result.Item(k).Description
			//var descSize = desc.length - 1;
			//var descDisplay = desc.substr(3,descSize);
			HTMLTable=HTMLTable +
				"<TR  valign=top><TD>" + 
				"<A   class='tableLink' title='Report Name: " + Result.Item(k).Title + "' HRef='#' onClick=\"navReport('" + Result.Item(k).ID +"')\">" +
				Server.HTMLEncode(desc) + "</A></TD>" ;
		} 
		HTMLTable=HTMLTable+"</TABLE>";
	}
	    
	return( HTMLTable);
}

We have this, and other useful functions in a file we include in our user interface pages ( like CE's helper_js.csp, etc. are used)..We actually add a parameter to that function to identify a particular folder..But this version will work for all reports in all folders.

Hope it gives you an idea of how to proceed..

[profile]
 
Still very unclear. Presumably you have a CE account like cutiger that you use to log in. When you do, you want to see a list of reports that you can access.

If these are your reports, not shared with any other user, publish them to User Folders / cutiger.

If the reports are shared with other users, publish them in a public folder. When YOU are logged into CE, go to Preferences and specify the Initial view option as Favorites. Click Apply and return to your Favorites page.

On your Favorites page, click the Organize icon. Use the drop-down list to select the public home folder, that is the CE server level. Use the folder list and Expand button to navigate to the folder where the shared report is located. Select 1 or more reports and then use Copy To or Shortcut to open the destination dialog. Select Favorites from the drop-down list and click Copy.

Note: Copy makes a physical copy of the .rpt file. If the original report is modified, the copy will have to be edited or replaced as well to remain in synch. A Shortcut uses the same physical .rpt.

Also, the user who performs the Organize will need applicable permissions to the report object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top