Hello,
This is a nice piece of code (posted by somebody on Oracle forum, don't recall the name) that generates the calendar between two dates:
SELECT C.REF_DATE, TO_CHAR(C.REF_DATE, 'WW') AS WEEK_NO, TO_CHAR(C.REF_DATE, 'MM') AS MONTH_NO
FROM
(SELECT TRUNC({?StartDate}) - 1 + N.DAY_COUNTER AS...
Using Bubble sort:
whileprintingrecords;
stringvar array MyValues := locarr;
numbervar i;
numbervar j;
stringvar temp;
for i:=1 to ubound(MyValues)-1 do (
for j:=1 to ubound(MyValues)-i do(
if MyValues[j] > MyValues[j+1] then (
temp :=...
Hi,
Create a running total: count of rsaStatus, evaluate on condition rsaStatus = 'OnTime'
or
create a formula:
@StatusFlag
if rsaStatus = 'OnTime' then 1 else 0
inser a summarry on this formula
Dana
hi,
Try this in group selection formula:
(if isnull(Command.CommentDate}) then
true
else
Command.CommentDate} = maximum({Command.CommentDate},{Command.Id})
)
Dana
Hello Dan,
Try this to check for duplicates and print them on different lines:
Whileprintingrecords;
Stringvar Ref;
if instr({Order.Ref}, Ref) = 0 then
Ref := Ref + chr(13) + {Order.Ref}
else
Ref
Dana
Something around this:
formula to identify invoices not older that 3 years for each customer:
if InvoiceAgeInYears <= 3 then 1 else 0
make a sum on this formula for each customer, and select only customers that have the sum = 0
Dana
Hello KC,
You can display it on the group footer, you'll need three formulas:
//place in groupheader section
@ResetVar
whileprintingrecords;
stringvar vcontractlist := ''
//place in detail section
@ContractsList
whileprintinrecords;
stringvar vcontractlist := vcontractlist + table.contractID...
I don't think a formula would help. You could use an Excel file that has all the dates.
If your database is Oracle 9i or higher (you need analytical functions), and you can write SQL commands in Crystal, you could write a query that will generates all dates. You would have to use an SQL command...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.