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!

Hi, Hope someone can assist. I wil

Status
Not open for further replies.

shelo

Technical User
Jan 31, 2004
2
US
Hi, Hope someone can assist. I will be as detailed and brief as possible.
Using CRXI, have two tables. Linked l/o to a workstation id. Leading table has workstation user information, second table has software installed. I have two parameters
{?Software Title} & {?Software Status} selection choices "Installed" or "Not Installed".
Tried in record selection:
if {?Software Status} = "Installed" then
{vWorkstation_Program_Details.SoftwareTitle} = {?Software Title} and
{vWorkstation_Program_Details.SoftwareStatus} <> "removed software" else
if {?Software Status} = "Not Installed" then
{vWorkstation_Program_Details.SoftwareTitle} <> {?Software Title} and
{vWorkstation_Program_Details.SoftwareStatus} <> "removed software"

Result: receiving the same data back regardless of selection
Required Result: If I select status "not installed" I want all users that DO NOT have a specific software, i.e. Microsoft Office Outlook 2003. Problem is I receive all users with the detail of every other software they have installed. I just want to see the user once if they do not have the specified software entered in my parameter. I even tried a subreport and it's giving the same result.
What am I doing wrong? Any assistance would be greatly appreciated.
 
I can see 2 possible reasons: you are not using LEFT JOIN or you are not handling correctly the null values on Crystal Reports side

What is vWorkstation_Program_Details - table or view ? If it is a view can you post the SQL ? What is the SQL for the report ?




Viewer, scheduler and report manager for Crystal reports and SSRS.
Send your report everywhere.
 
Change your selection formula to:
(
(
{?Software Status} = "Not Installed" and
(
isnull({vWorkstation_Program_Details.SoftwareTitle}) or
{vWorkstation_Program_Details.SoftwareStatus} <> "removed software"
)
) or
(
{?Software Status} = "Installed" and
{vWorkstation_Program_Details.SoftwareTitle} = {?Software Title} and
{vWorkstation_Program_Details.SoftwareStatus} <> "removed software"
)
)

Then create a formula {@hastitle}:

if isnull({vWorkstation_Program_Details.SoftwareTitle}) or
{vWorkstation_Program_Details.SoftwareTitle}<>{?Software Title} then
0 else 1

Insert a group on {table.user} and then go to report->selection formula->GROUP and enter:

(
{?Software Status} = "Not Installed" and
Sum({@hastitle},{table.user})=0
) or
{?Software Status} = "Installed"

This will return the users who don't have the software if you are checking for that. You can suppress the details just for the report used to identify users with without the software with a formula like this in the section expert->details->suppress->x+2 area:

{?Software Status} = "Not Installed"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top