Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Another Crystal Reports Question
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

StephenD
Senior Member

Australia
1044 Posts

Posted - 22 January 2004 :  08:11:29  Show Profile  Send StephenD a Yahoo! Message
I'm trying to filter some information from my DB but can't get the crystal syntax right.

This is the formula as it currently stands, which works:
if Hour({TimeSalesPLU.DateHour}) = 10
    then {TimeSalesPLU.NumberOfItems}
    else 0;


I want to further filter it by only selecting items from another field (variety) in table(stock):
{Stock.Variety}
that equals a variable of say 'trackedfood'.

Both tables are linked by a PLU field.
Anyone got some ideas?

I've tried lots of different variations on:
if Hour({TimeSalesPLU.DateHour}) = 10
 and ({Stock.Variety}) = trackedfood
    then {TimeSalesPLU.NumberOfItems}
    else 0;
to no avail.

StephenD
Senior Member

Australia
1044 Posts

Posted - 22 January 2004 :  10:28:38  Show Profile  Send StephenD a Yahoo! Message
I can get the records I need in osql using this code:

SELECT *, SalesStock.PLU AS Expr1, Stock.FamilyName AS Expr2
FROM         SalesStock INNER JOIN
                      Stock ON SalesStock.InvCode = Stock.InvCode
WHERE     (SalesStock.PLU = 18065) AND (Stock.FamilyName = N'Trackedfood')


I've tried messing around in the 'Report > Select Expert' using different variations of:
{Stock.FamilyName} = "Trackedfood" and
{TimeSalesPLU.DateHour} >= {?StartingDate} and
{TimeSalesPLU.DateHour} <= {?EndingDate}

Still no luck...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07