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 Mike Lewis 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. damonkimble

    Errors sending command parameter to UDF

    FYI, it had to do with the fact that UDFs cannot deal with non-deterministic functions (e.g. getdate()). I had to declare a variable, set the variable to the value of the parameter and sent the variable to the UDF. this works!: declare @dt datetime set @dt = {?dt} select list_date from...
  2. damonkimble

    Errors sending command parameter to UDF

    Crystal 10 connecting to MSSQL 2000 (sp3a) via ODBC (MDAC 2.8) I am attempting to send command parameters to a UDF but keep getting a rowset error. I start out with hardcoded dates and after confirming the query works in the command, added parameters and replaced the hardcoded dates. The UDF...
  3. damonkimble

    Grand Total does not match details

    Data that is filtered out by the select expert will not show up in any totals. Please supply CR version, db and connection info. Please supply a specific example or two of the formulas involved. Also describe any grouping and suppression. damon
  4. damonkimble

    Closest to date

    If you are using a command, you can write the query to have a max(date_field) <= your date parameter (current or otherwise). Your date parameter would have to be a command parameter. If you aren't using a command, you could order by date desc and suppress everything other than the first...
  5. damonkimble

    Date Value result

    How will these 12 displays be laid out when complete? Is there a way to send a variable to offset? damon
  6. damonkimble

    Date formula to first of next month

    Ah yes, LB is correct too. I forgot about the relative functionality of dateserial. damon
  7. damonkimble

    Date Value result

    I'm not completely following you, but I think this is what you are looking for. As you said you are using this multiple times, easist to use custom function. To make it more generic I added the datetime as a variable too. Function (DateTimeVar dt, NumberVar offset) // takes in datetime and...
  8. damonkimble

    Date formula to first of next month

    A combination of dateserial and dateadd should do the trick. You're taking the year and month of the given date plus one month and 1 for the day value. cheers, damon dateserial(year(dateadd('m', 1, {table.datefield})) ,month(dateadd('m', 1, {table.datefield})) ,1)
  9. damonkimble

    Remove Time from DateTime field

    If you are trying to print a single field, just right click Format Field. You can choose from a variety of date and/or time combinations. As far as age goes, it is surprising that there still isn't a good built-in function. Here is a custom function I made. Function (DateTimeVar dstart...
  10. damonkimble

    Grouping by 30 Minute intervals

    Grouping on this more generic formula should do the trick. damon truncate((hour({table.datefield}) * 60 + minute({table.datefield}))/30)
  11. damonkimble

    Financial Date Selection

    As Madawc suggests, a formula rather than an array is the way to go. What is the criterea for your financial periods? damon
  12. damonkimble

    Grouping issues

    FYI, I ended up using subreports as it ended up being less complex than using arrays. Also, I'm using a command parameter to choose the person, so it limits the scope of how many times the subreports are done. Thanks to Synapse for the array idea, even though I didn't end up using it. damon
  13. damonkimble

    Increment Date Value

    I'm missing how your two start and end dates should return four date values. Also, what was your formula that used dateadd and what were the results? damon
  14. damonkimble

    Formula to pull Maximum of DateTime field

    Please note above is assuming that it is a date field, not a datetime. damon
  15. damonkimble

    Formula to pull Maximum of DateTime field

    Go to select expert -> show formula -> formula editor: {JOB_STEP_EMP_PROD_RATE.JOB_STEP_EMP_PROD_RATE_DATE} = Maximum({JOB_STEP_EMP_PROD_RATE.JOB_STEP_EMP_PROD_RATE_DATE}) Assuming there is nothing else there, adding the above should do the trick. cheers, damon
  16. damonkimble

    page header and footer in subreport

    Repeating Group Header works great for a header, but how about a footer? I tried 'Print at bottom of page' but it printed at the bottom and then started a new page.
  17. damonkimble

    Grouping issues

    I'd definately be willing to not have the data side by side, but rather have it in a linear fashion. thanks, damon
  18. damonkimble

    Grouping issues

    Using Crystal 10 connecting to MS SQL 2000 via ODBC. I could do the following with subreports but would prefer to not deal with the complexity and the performence hit involved. The desired group hierarchy is as follows: child | |--appts | |--parties | |--presents with...
  19. damonkimble

    Is string all caps?

    Using synapse's test formula, I returned a '1' until I unchecked File->Report Options->Database Server is Case-Insensitive. cheers, damon
  20. damonkimble

    Is string all caps?

    Using Crystal 10 connecting to MS SQL 2000 via ODBC. I am trying to find out if the value of a field is all caps. I was hoping the following formula would work, but it returns 1 with an o3_name of '275 Main St.' if {SiteAddress.o3_name} = uppercase({SiteAddress.o3_name}) then 1 else 2...

Part and Inventory Search

Back
Top