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