473,503 Members | 2,720 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Record Selection Formula

i have the folowing code

Dim y As New frmCobranz
Dim MyReport As New RPTCobranz
MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}= y.txtNoRelac.Text
CrystalReportViewer1.ReportSource = MyRepor

when run the report the following error rais

error in formula <record selection
'{cobh.relnbr}=y.txtnorelac.text
a number, currency amount, boolean, date, tieme or string is expected her

i don't know how to assign a value to a record selection formula
Nov 20 '05 #1
2 3379
Hi Carmen,

I take it that cobh.relnbr is a table.column and that y.txtnorelac.text is a
textbox (although I don't understand the double dot part). In any event,
here's how to construct the recordselectionformula - it has to be values,
not variables. Thus:

"{CobH.RelNbr}= " & chr(39) & y.txtNoRelac.Text & chr(39)

Thus the formula would appear in crystal to be "{CobH.RelNbr}= '12345-009' "
(example of an account #).

HTH,

Bernie Yaeger
"carmen" <cd*****@diario.com.mx> wrote in message
news:A4**********************************@microsof t.com...
i have the folowing code:

Dim y As New frmCobranza
Dim MyReport As New RPTCobranza
MyReport.DataDefinition.RecordSelectionFormula = "{CobH.RelNbr}= y.txtNoRelac.Text" CrystalReportViewer1.ReportSource = MyReport

when run the report the following error raise

error in formula <record selection>
'{cobh.relnbr}=y.txtnorelac.text'
a number, currency amount, boolean, date, tieme or string is expected here

i don't know how to assign a value to a record selection formula

Nov 20 '05 #2
Hi Carmen,

Do a messagebox.show on relac and let me know what it looks like. also,
what is the data type of cobh.relnbr?

Bernie

"carmen" <cd*****@diario.com.mx> wrote in message
news:8E**********************************@microsof t.com...
hi Bernie, i still have the problem, i change my code to the following

dim relac as string
relac = "int({CobH.RelNbr})= " & Val(y.txtNoRelac.Text)
MyReport.DataDefinition.RecordSelectionFormula = relac

but the report does not show anything

Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
7747
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
7
6259
by: damjanu | last post by:
Hi All; I need little help. I have a datasheet form. I allow user to do 'filter by selection'. My form contains a column with values. As user changes selections, I want to calculate totals....
0
1706
by: Alienz | last post by:
hiya! I wanted to make a multiple selection drop down list and I found the easiest way to do this was by creating a subform linked to a table with 2 values, the 1st value links to the main form...
2
7037
by: Łukasz W. | last post by:
Hello everybody ! How is it in Selection Formula to work with Date type, for example to deduct 7 days, week, month, year from CurrentDate. I'm trying to use such a stetement (CurrentDate - Date...
7
2039
by: Helen | last post by:
vb .net 200 crystal reports Oracl Acces Hi, I have all selection formula results needed from the main crystal report, called in the vb form (Oracle db) I now need to build in the logic in...
0
4653
by: Jasper Jones | last post by:
I have a Crystal report that shows me a list of sales and which customer bought them, I would like to get a distinct list of customers, is this possible with crystal's formulas? This is my...
0
1224
by: zafar | last post by:
I need to Use selection formula for crystal report (user may give 1,2,3 ... or more criteria for report) what is the syntax for that. secondly how to use "views" in crystal report . Thanx if any...
16
11620
by: freedom | last post by:
How to use the record selection formula in CR9 programatically using vb.net? I have a combo box that displays the date. If I select date, I can generate a report based on the selected date. Thanks in...
8
3889
by: bluemoon9 | last post by:
Does anyone know how to write a code to promt the selection at the last record in the list box?. I have this code below in the "On Click" event, when user click on the code, it close a form, requery...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.