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 do I save the user's ID in the report?

Status
Not open for further replies.

KSteele6

Programmer
May 23, 2006
7
US
I'm developing an application and I need to display only the report instances that were run by the user that's logged into my app. I've been searching for awhile now and hopefully someone can help me out.

Do I need to ask our report designer to add a hidden parameter to all our 100+ reports? Then when the report is scheduled I can set its value to the user who's logged into my app. Or is there a better/simpler solution?

Any help would be greatly appreciated.
 
You state "I need to display only the report instances that were run by the user that's logged into my app".

If you app is firing a report, then your app already knows each user, however you need to clarify what you mean by instances.

Have you saved executed reports? What software have you developed this VB app for, and what methodology did you use?

CE apps would havce instances, but anyway, I'll stop speculating, and in the future state specifics:

Crystal version
Database used
How your app interfaces with Crystal (RDC, or)
What do you think an instance is

-k
 
Thanks for the response!!! I'm able to do what I need to do. Yes we are using Enterprise XI and by instance I was referring to the report that resulted from being run.

I needed to store information with each resulting report so that later I could look at that information and filter out the ones that I wanted my app to list.

They way I did this was by setting the property on the IReport object before I scheduled it. This property then appears in the resulting report. Here's the code snippet.

IReport report;
String id;
String val;
...
IProperties properties = report.properties();
properties.add(id, val, IProperty.READ_ONLY);
[/color gray]
Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top