p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Selection Formula problem


Message #1 by Mohammad Tariquzzaman <pol2871@a...> on Wed, 02 Oct 2002 17:09:12 -0700
Hi list,

I used VB6 and crystal report 8.5.
I have the problem with Selection Formula.
It's generating the error as " This field name is not known"

Here is my code.

Dim s1 As String

If DTPicker1 < DTPicker2 Then
	s = "{mast.Date} >= # " & Format(DTPicker1, "dd/mm/yyyy") & " # and " & _
		"{mast.Date} <= # " & Format(DTPicker2, "dd/mm/yyyy") & " # "
End If
'CrystalReport1.RecordSelectionFormula = s
Trial_or_cash_report.Show vbModal

please help.

Message #2 by "Vimal Bhuptani" <vimal_bhuptani@r...> on 2 Oct 2002 11:32:17 -0000
Hello..
well the problem is mostly with ur FIeld..as u should never 
declare ur field name with the existing data type.. such as Date 
or Text or Number etc..

as here in this case.. ur Table name is Mast and ur field name is 
Date.. so Crystal Report cannot identify which is the field 
name..
so i suggest you to please change the name of the field Date to 
some thing as Mast_date etc.. and then try. .it will work...

regards
Vimal

On Thu, 03 Oct 2002 Mohammad Tariquzzaman wrote :
>Hi list,
>
>I used VB6 and crystal report 8.5.
>I have the problem with Selection Formula.
>It's generating the error as " This field name is not known"
>
>Here is my code.
>
>Dim s1 As String
>
>If DTPicker1 < DTPicker2 Then
>s = "{mast.Date} >= # " & Format(DTPicker1, "dd/mm/yyyy") & " # 
>and " & _
> 	"{mast.Date} <= # " & Format(DTPicker2, "dd/mm/yyyy") & " # "
>End If
>'CrystalReport1.RecordSelectionFormula = s
>Trial_or_cash_report.Show vbModal
>
>please help.
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 


Vimal
Message #3 by "Wong Tze Lun" <tzelun0502@l...> on Wed, 02 Oct 2002 22:57:52 +0700
Hi Mohammad ,
 Try copy your selection formula to the seagate crystal report program and use the record selection formula to test the formula.
Most of the time the error you encounter it due to the report to have the filedd your try to refer with.

regards
tl wong


____________________________________________________________
Tired of all the SPAM in your inbox? Switch to LYCOS MAIL PLUS
http://www.mail.lycos.com/brandPage.shtml?pageId=plus
Message #4 by Mohammad Tariquzzaman <pol2871@a...> on Thu, 03 Oct 2002 05:37:16 -0700
But if I use the following code it's also generating the same error.

         dim s as string
         s = "{mast.acc_code} = & 010100"
         CrystalReport1.RecordSelectionFormula = s

Please help.
Regards,

Tariq


At 11:32 AM 02/10/2002 +0000, you wrote:
>Hello..
>well the problem is mostly with ur FIeld..as u should never declare ur 
>field name with the existing data type.. such as Date or Text or Number etc..
>
>as here in this case.. ur Table name is Mast and ur field name is Date.. 
>so Crystal Report cannot identify which is the field name..
>so i suggest you to please change the name of the field Date to some thing 
>as Mast_date etc.. and then try. .it will work...
>
>regards
>Vimal
>
>On Thu, 03 Oct 2002 Mohammad Tariquzzaman wrote :
>>Hi list,
>>
>>I used VB6 and crystal report 8.5.
>>I have the problem with Selection Formula.
>>It's generating the error as " This field name is not known"
>>
>>Here is my code.
>>
>>Dim s1 As String
>>
>>If DTPicker1 < DTPicker2 Then
>>s = "{mast.Date} >= # " & Format(DTPicker1, "dd/mm/yyyy") & " # and " & _
>>         "{mast.Date} <= # " & Format(DTPicker2, "dd/mm/yyyy") & " # "
>>End If
>>'CrystalReport1.RecordSelectionFormula = s
>>Trial_or_cash_report.Show vbModal
>>
>>please help.
>>
>>
>>---
>>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>>unsubscribe send a blank email to 
>
>
>Vimal
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 

Message #5 by =?iso-8859-1?B?UGFzY3VhbCBEZSBMZcOzbiBHZW5hbw==?= <pascualdeleon@m...> on Thu, 03 Oct 2002 07:59:54 -0400


>From: "Vimal Bhuptani" <vimal_bhuptani@r...>
>Reply-To: "crystal_reports" <crystal_reports@p...>
>To: "crystal_reports" <crystal_reports@p...>
>Subject: [crystal_reports] Re: Selection Formula problem
>Date: 2 Oct 2002 11:32:17 -0000
>
>Hello..
>well the problem is mostly with ur FIeld..as u should never declare ur 
>field name with the existing data type.. such as Date or Text or Number 
>etc..
>
>as here in this case.. ur Table name is Mast and ur field name is Date.. so 
>Crystal Report cannot identify which is the field name..
>so i suggest you to please change the name of the field Date to some thing 
>as Mast_date etc.. and then try. .it will work...
>
>regards
>Vimal
>
>On Thu, 03 Oct 2002 Mohammad Tariquzzaman wrote :
>>Hi list,
>>
>>I used VB6 and crystal report 8.5.
>>I have the problem with Selection Formula.
>>It's generating the error as " This field name is not known"
>>
>>Here is my code.
>>
>>Dim s1 As String
>>
>>If DTPicker1 < DTPicker2 Then
>>s = "{mast.Date} >= # " & Format(DTPicker1, "dd/mm/yyyy") & " # and " & _
>>	"{mast.Date} <= # " & Format(DTPicker2, "dd/mm/yyyy") & " # "
>>End If
>>'CrystalReport1.RecordSelectionFormula = s
>>Trial_or_cash_report.Show vbModal
>>
>>please help.
>>
>>
>>---
>>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>>unsubscribe send a blank email to 
>
>
>Vimal
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to 
>unsubscribe send a blank email to 

hello my name is pascual de Leon I'm a beginner try with this  
Format(DTPicker1, "yyyy/mm/dd")

_________________________________________________________________
Únase al mayor servicio mundial de correo electrónico: 
http://www.hotmail.com/es


  Return to Index