This is more of a Business Objects/Crystal Reports question... (try looking up BOB... the Business Objects online user community) especially if you have absolutely no knowledge of SQL. I will field this question anyways because I myself used the software tool many years ago to first teach myself how to program in SQL.
We have Crystal Reports developers who do not know SQL who do this quite frequently here at our shop. I am assuming this is what you are trying to do: Query 1: SELECT something FROM ... WHERE (criteria here) Then from the results of Query 1, develop Query 2 using Crystal selection criteria. One option is to develop a SQL Command. SQL Commands in Crystal can accept parameters which are formatted with a parameter name prefixed with a ? (I think. You'll have to check the SQL Command dialogue box to figure that one out) Your next question will probably be "how do I write SQL if I don't know it?"; You can develop "Query 1" using Crystal's SQL Generator feature. Create a simple report (without formatting) which accomplishes what you want to do with the initial query. Then select "SHOW SQL" from the Crystal Reports menu. Cut and paste the SQL generated for your mock report and use that in your initial SQL Command entry for your actual report substituting any hard-coded parameter values with the appropriate parameter notation. Crystal will process the SQL Command along with any input parameters defined FIRST before any filter criteria you define in your Crystal Report. If you have the help of a SQL versed programmer, any SQL that is compliant with the underlying database (ANSI or Oracle flavored) will work in a SQL Command dialogue box. The purpose of a SQL Command in Crystal Reports is the same as the effect of an inline view used in a complex SQL query. Rich Pascual On Tue, Jan 18, 2011 at 7:03 AM, Gopakumar Pandarikkal < pandarik...@gmail.com> wrote: > I presume you are looking for something like this. whats the datefield ? i > am putting it as sampledate. i am adding trunc function to cutoff any time > fraction from the dates. > > select * from samples where sample_status ='B' and trunc(sampledate) > between trunc(sysdate) and trunc(sysdate) + 7 > > hope this helps. > > regards > Gopa > > On Jan 18, 2011 8:02 PM, "Hi_Its_Me" <manuel.floren...@gmail.com> wrote: > > Hi, > I need to add a fied in crystral reports that i need to filter before. > Sorry guys I dont know sql and have currently nobody around who could > help me. > My tryouts end all with error message. > I need all the samples with sample status "B" for the next 7 days > Table: Samples > Rows SAMPLE_Status and SAMPLE_ID > Is here somebody who coud help me? > THX a lot > > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to Oracle-PLSQL@googlegroups.com > To unsubscribe from this group, send email to > oracle-plsql-unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to Oracle-PLSQL@googlegroups.com > To unsubscribe from this group, send email to > oracle-plsql-unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to Oracle-PLSQL@googlegroups.com To unsubscribe from this group, send email to oracle-plsql-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en