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

Search results for query: *

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

    Last 12 rolling months formula question... Please help

    Hello TC, Change the last if like this: if {?Run Time Option} = 'Last 12 Months' then Date(DateAdd("m", -12, Date(Year(CurrentDate), Month(CurrentDate), 1))) to Date(Year(CurrentDate), Month(CurrentDate), 1) else {?Date Range}) D
  16. ianoctdec

    Suppress Blank on Demand Subreports

    One way around would be if in the main report you can calculate the totals for each month. Then if the total for a month is 0 or null, then you'll know to suppress the coresponding on demand subreport. Dana
  17. ianoctdec

    Summarizing Top10 and Top15 values

    Hi, Try to insert crosstabs in the report footer, one for top5 and one for top10; delete the rows and only show the columns totals. Dana
  18. ianoctdec

    Losing the effect of a Left Outer Join when grouping

    Hi Brian, <I worry that I need to make my left join reference table include all Customer x Skus x AP x dates and join on all of those columns to get it to show up correctly. There has to be the "right" way that I'm not thinking of.> You are correct, that's how you have to do it. Maybe you don't...
  19. ianoctdec

    Remove Parameters in a Command - Help Please!!

    Hi DeviousDi, Replace ?datefrom with SYSDATE-7, and ?datetill with SYSDATE Dana

Part and Inventory Search

Back
Top