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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ianoctdec

  1. ianoctdec

    Include Weekends when weekends do not exist in my database

    Hi, Check out thread1462-1740899, it shows how to write a query that generates some sort of a calendar. Dana
  2. ianoctdec

    Generating Month Names Between Two Dates

    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...
  3. ianoctdec

    How can I sort an array alphabetically?

    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 :=...
  4. ianoctdec

    Suppress or Exclude end of trip IDs

    Ofcourse! Some times we just miss the obvious. Dana
  5. ianoctdec

    How to get count of "OnTime" records

    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
  6. ianoctdec

    Suppress or Exclude end of trip IDs

    H, Try this: ( If trip.end_tpid = timepoint.tpid then false //filter row else true ) Dana
  7. ianoctdec

    Select only the lastest record

    hi, Try this in group selection formula: (if isnull(Command.CommentDate}) then true else Command.CommentDate} = maximum({Command.CommentDate},{Command.Id}) ) Dana
  8. ianoctdec

    Evaluation Functions

    Hi Dan, This formula only works in the group footer. To get it in the header, maybe use a subreport to do the concatenation. Dana
  9. ianoctdec

    Evaluation Functions

    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
  10. ianoctdec

    Record Selection Formula Assistance

    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
  11. ianoctdec

    Displaying two lines in a group, first line truncating

    Do you have each line in its own subsection?
  12. ianoctdec

    Concatenate Multiple Rows

    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...
  13. ianoctdec

    Show a line of data for all days in a month even if there is no raw data

    Make sure to check for nulls first if you use fields from AMOUNT table in the formulas
  14. ianoctdec

    Create Record when no records exist

    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...

Part and Inventory Search

Back
Top