Link to home
Start Free TrialLog in
Avatar of mullykid
mullykid

asked on

CR 2008 Server: Filter Saved Data via current CE User

Hi Guys,

I'd like to re-open this topic. orig thread ling below. I tried what you suggested and no records are being returned. I verified the current CE user by printing it in header.

I placed the following formula in the REPORT-SELECT EXPERT-SAVED DATA

{PR_BACKUP_POLICY.DOMAIN}=CurrentCEUserName

Can anyone help?

https://www.experts-exchange.com/questions/27412074/Filter-Generated-scheduled-Report-content-by-Current-User.html?anchorAnswerId=37036710#a37036710
Avatar of mullykid
mullykid

ASKER

ps, I Created a CR Server User, which I then logged in as. Do I need a profile or anything?
Ok, this works but not as I want from CMC

1. Created a User
2. Created a profile for that user and added the filter condition
3. Run the report as Administrator
4. Log out
5. Log in as new user created in step 1.
6. Click View Latest Instance. Nothing is displayed, despite the Saved Record condition set in developer above.
7. Click View
8. Report returns filtered content.

Q. Why does step 6 not work?
Q. View hits the database right, so this is not required.

TIA!
I think I may have an idea why its not working.

Is Crystal Report Server 2008 compatable with Saved Record Selection?

When you look at the report filter options, Record and Group Selection only exist?

Can anyone help here? Thanks.
Continue here is fine thanks.
SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks Rhinok for the SP version heads up.

I understand your point on the architecture, but I guess (for us) using the example case above, the Administrator User will be the country.

Therefore, we will initially generate the report for all regions via the Admin user, and then allow subsequent region 'Saved Data' filtering per non administrator user.

I'll give this a test and report back early next week.

Sorry JustAMod. I won't do that again. Thanks for helping me out.
Hi Rhinok.

You mentioned in your reply above that you can filter via user groups. Do you mean Crystal Report Server user groups, and if so, how?

Thanks.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hey,

Ok. I ran the report in CMC for all users (Administrator) to generate the data. This will be scheduled. Then I logged in as another user.

When I click VIEW LATEST INSTANCE, the report gives me ALL customer data with the Saved Data Selection Formula in place.
When I click VIEW the report successfully filters the data.

I need this to work with VIEW LATEST INSTANCE. Am I doing something wrong? Isn't VIEW hitting the Database?

TIA
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ok. But isn't passing the current user (CurrentCEUserName) as a parameter not the same as just using CurrentCEUserName? Am I missing something, or do I need to do this?
It's not the same thing.  
Avatar of Mike McCracken
If you don't pass it in as a parameter then when you open the saved report for viewing it just displays the report and doesn't do any updating or further filtering.

mlmcc
Thanks. I'll give it a shot.
Hey Guys,
Sorry, I am strugglng to understand this.
All I want to do ths is the following.
1. Run/Schedule a report for all users via CMC
2. For current logged in user, when VIEWING LATEST INSTANCE, filter the report content
3. If possible, instead of filtering by user filter by its user group. Is the parent GroupName available?

Can someone list actions to help me do this? I have to have this resolved today.

Thank you!!

The proper method to achieve what you want is to create and use Business Views.  That's your answer.
Ok, if it all possible could I do it the way already suggested.

I added a parameter to the report and used this in my saved selection formula.

I executed the report for all users (administrator parameter passed in) .

So, when I go to VIEW LATEST INSTANCE how do I pass in a parameter to filter as suggested above?
]Thank you!



Ok, i see the parameter list. It works when you enter a parameter, i.e. the report content filters.

My last question before I close this so is, how do I populate the parameter automatically with the current logged in user, instead of entering it?

Thanks again.
You can't populate the parameter automatically without using some sort of front end application.  It would have to be entered.

About the only other thing I can think of, since you don't want to build it with a Business View, would be to conditionally suppress detail data where {PR_BACKUP_POLICY.DOMAIN} <> CurrentCEUserName.  You may have to  account for this in your various formulas and calculations, too.
Ok thanks. Would this work for VIEW LATEST INSTANCE though?

Also, a nagging question. Does VIEW hit the database or no?
1)  I haven't tested whether or not it would work with View Latest Instance, so I don't know for sure

2)  In general, View hits the database, but depending on your settings you may actually be pulling cached data.
Ok. Thanks Rhinok. I will go from here.

Last question :)

Is it possible to know the current user group name. I don't see a reserved field in Crystal like CurrentCEUserName. All I see is GroupNo.
There's no built-in function for the user group.