Solved

Sub-Report Help.  In Crystal Reports

Posted on 2014-04-23
20
368 Views
Last Modified: 2014-04-28
securitylistmembers-mt-why-no-li.pdfHello,
I am unable to figure this out.  I have created a report to show the Role, privileges and a list of users which has the role with the privileges.

All works really, really well when (for my parameter or prompt), I give the name of the role.

For example, I put in the rold of Basic, and the list of users are there, the list of privileges (which is the sub report) is there and correct.  Basic has privileges of View and Can View Protected Data.  

What I would like to have is:
When I put in 'ALL' for the parameter prompt, I will get the corresponding privileges listed.  What I get is nothing.  The main report still shows all of the Roles and all of the users correctly.  It's just that the privileges are not listing anything.

Please advise.  I have attached two pdfs of one where one role is listed and another pdf where ALL was put in for the parameter response.  Thank you.

Something I am overlooking and just can't get it.securitylistmembers-mt-basic-4-2.pdfHello,
I am unable to figure this out.  I have created a report to show the Role, privileges and a list of users which has the role with the privileges.

All works really, really well when (for my parameter or prompt), I give the name of the role.

For example, I put in the rold of Basic, and the list of users are there, the list of privileges (which is the sub report) is there and correct.  Basic has privileges of View and Can View Protected Data.  

What I would like to have is:
When I put in 'ALL' for the parameter prompt, I will get the corresponding privileges listed.  What I get is nothing.  The main report still shows all of the Roles and all of the users correctly.  It's just that the privileges are not listing anything.

Please advise.  I have attached two pdfs of one where one role is listed and another pdf where ALL was put in for the parameter response.  Thank you.

I was able to get some listing of parameters, but they were repeated may times and for each one.

Something I am overlooking and just can't get it.
0
Comment
Question by:mtrout
  • 9
  • 8
  • 3
20 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40018335
WHat is the selection formula in the subreport?

How is the subreport linked to the main report?

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 40019595
This may or may not have anything to do with your problem, but why does one report show "Basic" (capital "B") and the other show "basic"?  That sort of implies that the two reports are showing different data.

 James
0
 

Author Comment

by:mtrout
ID: 40020237
Hello There MLMCC and James,

Mlmcc, I have attached a file to hopefully provide more information in addition to what you requested.  Thank you so much.  The attachment is called 'Sub report 4-24-14.doc'

James, you are correct that at the moment you noticing "Basic" (capital "B") in one report and in another report shows "basic", you saw the results of me using proper case in a later report.  I have included screen shots of that.  That attachment is called 'Using Proper Case.doc'.

Thank you.
Sub-report-4-24-14.doc
Using-Proper-Case.doc
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 100

Expert Comment

by:mlmcc
ID: 40020375
First I would change the main report selection to

{?Security Role Name} = "ALL"
OR
{FGV_PUB_SS_CPRIV.CI_Name} = lcase({?Security Role Name})

I would do that for 2 reasons
1.  I believe it will be faster.
2.  If new security roles are added you don't have to change the report to handle them

You need to change the subreport selection to be similar. The only difference is you use the subreports parameter ?Pm-?Security Role Name

{?Pm-?Security Role Name} = "ALL"
OR
{FGV_PUB_SS_CPRIV.CI_Name} = lcase({?Pm-?Security Role Name})


To change the subreport filter just edit the subreport and make the change.  Remember if you change the subreport linking you will have to edit it again

mlmcc
0
 

Author Comment

by:mtrout
ID: 40021209
thank you.   I need to put a list for 'ALL' because there are a couple of roles which has lots of people making the list  extremely long.  I want to first test with a small list, to see how the 'ALL' works.  I should have mentioned that before.

I made the 'ALL' list a lot smaller this time.  I can almost see what's happening, but I believe that you will see it a lot quicker and tell me how to correct it.

I placed an attachment with the explanations.  What happens is that when I put in ALL, I receive data, but when I put in individual roles, I see nothing.
modifications-4-24-14.doc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40021251
Try changing the ORs to ELSE

mlmcc
0
 

Author Comment

by:mtrout
ID: 40021308
I made the change.  I received the listing for individual roles and for ALL, but the privilege listing for ALL got reduced.  I included an attachment.
Modification.doc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40021471
I don't know.  Can you upload the report file?

mlmcc
0
 

Author Comment

by:mtrout
ID: 40023019
I may need to make different screen shots for you.  let me know.
SecurityListMembers-MT-4-25-14.rpt
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40023345
I don't really see anything.  Also I don't have the UFL your report uses so the data is discarded.

Are all the roles lowercase in the data?

If you are not sure there is an option you can set so case is not an issue.
I believe it is in FILE --> OPTIONS  or FILE --> REPORT OPTIONS
Database is case sensitive.

mlmcc
0
 
LVL 35

Expert Comment

by:James0628
ID: 40023588
As I understand it, there are some values that you're looking for in the record selection formula that are not showing up in the report.  I'd remove that test from the record selection, in the main report and subreport, and see if you actually get those values in the data.

 James
0
 

Author Comment

by:mtrout
ID: 40023679
Mlmcc, I did not save data with the report.  I don't know what a UFL is.  Well, I looked it up  (User Function Library)because I don't know and have not set up one before.  So, I'm lost on that one.  To build a mini database is not an option.  From what I read about a UFL is confusing to me.  Is there another option that's possible?  May we continue on Monday?

James, I will try your suggestion.  What's happening is that the grouped data is not matching up as I hope it would be to coinside with the main report.  When I created the sub report, I set it up for group only, and just used the tables to pull the permissions.
If I need to rethink that, I don't know how I would go about doing that.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40023730
Your formulas include a call to the functions SabaI18nGetI18nProperty and SabaI18nGetI18nValue.

They may be database functions rather than a UFL.

mlmcc
0
 

Author Comment

by:mtrout
ID: 40027260
I've commented them out  They are in the headings and are just variable placeholders.

I get the correct listing for the Role when listed separately, but get all of the privileges listed for each role when I select all.
securitylistall-mt-4-25-14.pdf
SecurityListMembers-MT-4-25-14.rpt
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40027371
Link the subreport on the privilege field, {FGV_PUB_SS_CPRIV.CI_NAME}, not on the parameter.

mlmcc
0
 

Author Comment

by:mtrout
ID: 40027512
OK.  I've tried it but I need some time to rethink and make the changes correctly.  I did what I thought was correct and I don't have any privileges listed.  THe other data shows, names, Security roles, etc, but not the privileges for either single or ALL.  Please let me get back to you.  I know that it may will take  a while.  Thank you.
0
 
LVL 35

Expert Comment

by:James0628
ID: 40027696
Did you link the CI_NAME field in the main report to the parameter in the subreport?

 James
0
 

Author Comment

by:mtrout
ID: 40027892
Mlmcc,

 Thanks for your patience.  Made the changes you suggested:
Link the subreport on the privilege field, {FGV_PUB_SS_CPRIV.CI_NAME}, not on the parameter.

and took my time to make adjustments to the formulas (which needed them), and made sure that I linked based on the field, not the parameter, and....
it seems to be working just as I wanted it to.  Thank you.  I sent a result file.  Remember, I only used a couple(this time 3 roles to test with).

James, I appreciate what you said/wrote.  Looks like you and Mlmcc are in agreement.

Thanks again mlmcc.
securitylistall-mt-4-28-14.pdf
0
 

Author Closing Comment

by:mtrout
ID: 40027902
Thank you mlmcc for working with me and leading me on this one.  Also, thanks for pointing out  to use a field name and not the parameter.  I was thinking that I should have been passing the parameter from main to sub report.  Thank you again.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 40027958
Should have caught that much earlier in the discussion but got caught up in the problem of ALL vs basic.

mlmcc
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question