?
Solved

SQL Expression in PARAMETER?

Posted on 2006-04-05
6
Medium Priority
?
300 Views
Last Modified: 2008-02-26
I have the following SQL Expression in my report. Is it possible to use this in a PARAMETER in order to use the PARAMETER in my SELECT CRITERIA? I don't see it as a data element to use, althought I am able to use it in the actual SELECT CRITERIA????

(
SELECT min([Applicable Date])
FROM
  bankruptcy.dbo.RLS
WHERE
  [FILE NUMBER]=  "BKCYACCT"."FILE NUMBER"

)

thanks
Mike
0
Comment
Question by:MIKE
  • 2
4 Comments
 
LVL 8

Expert Comment

by:dylanyee
ID: 16388299
Hi Mike, I've never tried to pass in the entire sql expression to parameter so I am not sure is there a way.
But I would suggest you to alter the formula for select expert in runtime instead of pass in as parameter, this is the property you could you to alter your select expert's formula:

rptDoc.DataDefinition.RecordSelectionFormula

dylan
0
 
LVL 8

Expert Comment

by:dylanyee
ID: 16388317
Sorry my mistake, what you are talking is SQL Expression but not select expert. Just ignore my suggestion.

dylan
0
 
LVL 17

Author Comment

by:MIKE
ID: 16388732
Actually Dylan, I just used the MIN of the actual date field [APPLICABLE DATE] for the report. I just wanted to display the TO FROM REPORTING DATES in the header. I WAS using the parameter to do this, but had to change this. The paramter WAS a SQL Expression.l

I hope I'm making sense, but anyway thanks for the input....I just did a MIN(APPLICABLE DATE] for the FROM and a MAX[APPLICABLE DATE] for the TO date.

THANKS.....Mike
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 2000 total points
ID: 16391698
Hi Mike,

You can't use Formulas or Parameters within a SQL Expression.  You can only use true database fields, database functions are are available through your DB and method of connectivity (ODBC, for example) and true SQL recognized by your database.

You can, however, refer to a SQL Expression from within a formula or the record selection criteria.

~Kurt
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month15 days, 18 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question