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

    Why is Boolean required here

    Ahhh yes Ian, just getting into formulas with crystal and I keep forgetting the : Thanks
  2. TanyaHarp

    Why is Boolean required here

    I want the formula to make the enddate the end of the fiscal year if the end date goes past the fiscal year end date. But when I try to run this formula it highlights the last end and says that a boolean is required here. I want it to return a date, not a boolean. //@{enddate} datevar end =...
  3. TanyaHarp

    Send Param from one formula to another

    Thanks Mcuthill, the first example is exactly what i am looking for.
  4. TanyaHarp

    Send Param from one formula to another

    Ok, to simplify I've decided on a better placement for what I'm trying to achieve. My question now is how do you do a between? //{@Qtr2mid} datevar start := {VIEW.START_DATE}; numbervar days := {VIEW.LENGTH_OF_STAY}; datevar end := start + days-1; numbervar firstquarter :=...
  5. TanyaHarp

    Send Param from one formula to another

    Sorry was out yesterday with a sick little one. Here is what I got. One of the following for each Quarter which is used as a column in a cross tab //{@Qtr1}: if {@qtrst} = 1 then {@dayscurrqtr} else if {@qtrend} = 1 then {@daysnextqtr} One of these for quarter 2, 3, and 4 //{@qtr2total}...
  6. TanyaHarp

    Send Param from one formula to another

    The first three formulas are used in a cross tab. The forma sets a number which is dependant on which formula is calling it. so //@forma numbervar form = 1; \\ or 2, 3 depending on which called this formula if form = 1 then dothis else if form = 2 then dothis else if form = 3 then dothis
  7. TanyaHarp

    Send Param from one formula to another

    I am thinking no but its worth Can you send parameters from one formula to another? So that i can have a couple different formulas call one other formula and depending on the parameter they send over it will set the condition. ie. @form1, @form2, @form3 all call @forma For the conditional...
  8. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    This is the changes I made to @dayscurrqtr. Correct me if I am wrong because like I said I'm not strong with date calculations. I'm now working on the mid quarter calculations for multiple quarter visits. @dayscurrqtr datevar start := {DAYS_STAYED_VIEW.START}; numbervar days :=...
  9. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Thanks LB, I think I almost have it worked out and will post it when/if I'm done. The above example is a two-quarter period, my mistake though for not being more clear in the original post. the rest of the changes I'm making for it being up to a four quarter stay is dependent on the daycurrqtr...
  10. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    @dayscurrqtr isn't working out properly. Stay begin May 1, 2011 Stay length 142 days Stay end date Sept 19, 2011 @dayscurrqtr is coming out at 31 days when it should be 50 or 51 days.
  11. TanyaHarp

    Isnull in selection expert

    For fields that can have null values I do a coalesce(field_name, default_null_value). The default null value can be set to text, numbers or just a blank coalesce(field_name, "NULL") coalesce(field_name, 0) coalesce(field_name, "")
  12. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Oh and I changed @daysnextqtr to figure out what the last qtr days are //{@daysnextqtr}: datevar start := {DAYS_STAYED_VIEW.START_DATE}; numbervar days := {DAYS_STAYED_VIEW.LENGTH_OF_STAY}; datevar end := start + days-1; numbervar dysnextqtr := 0; if datepart("q", end) - datepart("q",start)...
  13. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    ok, I made two more formulas called qtrmid1 and qtrmid2 which test to see if there are 1 or 2 quarters in the middle of the first and last quarter of a stay. So now i'm trying to get the @Qtr2 to do this: if {@qtrst} = 2 then {@dayscurrqtr} else if {@qtrend} = 2 then {@daysnextqtr} else if...
  14. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Looks good, two things I should have mentioned. The year for the first three quarters must be equal to a parameter year (ex 2011 entered) and the last quarter would be the parameter year plus 1 (2012). This way only stays from 2011-2012 fiscal year would show up (not previous/future years)...
  15. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    can I do something like: if Month({DAYS_STAYED_VIEW.START_DATE}) in 4 to 6 then ( if (TotalOfDays > LastDayOfMonth) then First Quarter.length_Of_stay = 2; Second Quarter.length_of_stay = 8; else ' First Quarter')
  16. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Another Quarter N refers to those stays that spans more than one quarter. When it falls into one of these quarters I need to split the length of stay between the two quarters that the stay spanned. Right now it just throws the total number into Another Quarter N rather than Quarter 1 = 2 days...
  17. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Sorry yes,it should read April 1 - June 30 is Quarter 1, July 1 - Sept 30 is Quarter 2, Oct 1 - Dec 31 is Quarter 3 and Jan 1 - March 31 is Quarter 4. The remaining step is how can I divide the length of stay between multiple quarters. Examples Guest 1 first night was June 2 and she stayed for...
  18. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Forgot to mention I'm running Crystal Reports 2008 Thanks
  19. TanyaHarp

    Cross Tab Expert - Formula to split summerized fields between columns

    Trying to determine number of days people stayed in bed and breakfast by quarter. If one person stayed 14 days and there was 2 days in one quarter and 12 in next quarter then the days need to be split up. The following formula right now will put the days into the proper quarter and shows which...

Part and Inventory Search

Back
Top