473,486 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

deadline and need help

Hi Guys,
I was brought in at the last moment to try to get a project
completed. it's vb.net and crystal reports.
Here's the problem
I can populate a parameter list for a report so the user can choose
one / all Suppliers. When a parameter option from the combo box is
clicked that came from the database (see code below) the combo box
closes but the option is not selected. I have tried every type of case
I know but still nothing works. the killer is that I have done this
with a test project and it works fine. I can't see any difference
though.

-- code removed
Dim dataReader As SqlDataReader

dataReader =
cmdSuppliers.ExecuteReader(CommandBehavior.CloseCo nnection)

Dim SuppName As String
While dataReader.Read
discreteParam = New ParameterDiscreteValue
SuppName = dataReader.GetString(0)
discreteParam.Value = SuppName & " "
MessageBox.Show(SuppName)
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
End While

discreteParam = New ParameterDiscreteValue
discreteParam.Value = "test"
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
if there are any omissions it's in the copy as the report compiles
fine. "Test" is displayed no problems but any value from the database
isn't.

Any help or suggestions would be greatly appreciated.

Best regards,

john

Nov 21 '05 #1
4 1282
Hi John,

Do you think this is a problem with your code, or a problem with the Crystal
Reporting Engine?

If it is down to the report engine, then you may want to try a different
newsgroup.

I found your description below very hard to decipher, if you have an update
on your situation please reply and we'll try and get you some help.

Best wishes
Graham Parker.
<th**********@yahoo.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hi Guys,
I was brought in at the last moment to try to get a project
completed. it's vb.net and crystal reports.
Here's the problem
I can populate a parameter list for a report so the user can choose
one / all Suppliers. When a parameter option from the combo box is
clicked that came from the database (see code below) the combo box
closes but the option is not selected. I have tried every type of case
I know but still nothing works. the killer is that I have done this
with a test project and it works fine. I can't see any difference
though.

-- code removed
Dim dataReader As SqlDataReader

dataReader =
cmdSuppliers.ExecuteReader(CommandBehavior.CloseCo nnection)

Dim SuppName As String
While dataReader.Read
discreteParam = New ParameterDiscreteValue
SuppName = dataReader.GetString(0)
discreteParam.Value = SuppName & " "
MessageBox.Show(SuppName)
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
End While

discreteParam = New ParameterDiscreteValue
discreteParam.Value = "test"
defaultValues = paramField.DefaultValues
defaultValues.Add(discreteParam)
' Apply the default parameter values.
paramField.ApplyDefaultValues(defaultValues)
if there are any omissions it's in the copy as the report compiles
fine. "Test" is displayed no problems but any value from the database
isn't.

Any help or suggestions would be greatly appreciated.

Best regards,

john

Nov 21 '05 #2
Hi Graham,
This is the first time I have worked with VB.NET and Crystal
Reports, so I have no idea where the problem lies.
clarification:
The values from the database display in the paramet list as any
hardcoded or generated text. However any value from the database cannot
be selected in the parameter list (drop down combo), it can be clicked
on but it is not
selected. I have tried all castings and adding the database value to a
string, but nothing works...

Nov 21 '05 #3
Hi,
By chance I figured out the problem. The database field was
char(100), this seems to be too long to be selected by the parameter
list. Even though it did display. To fix this problem, simply trim the
value before using it.

Hope this saves someone else time.

Nov 21 '05 #4
Hi,
By chance I figured out the problem. The database field was
char(100), this seems to be too long to be selected by the parameter
list. Even though it did display. To fix this problem, simply trim the
value before using it.

Hope this saves someone else time.

All the best

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 21 '05 #5

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

Similar topics

0
2402
by: Gregory Nans | last post by:
hello, i need some help to 'tree-ify' a string... for example i have strings such as : s = """A(here 's , B(A ) silly test) C(to show D(what kind) of stuff i need))""" and i need to...
0
1823
by: xunling | last post by:
i have a question about answering ..... this topic is "need help" what do i have to write at te topic line, !after i have klicked the "answer message" button ive tried many possibilities,...
2
3489
by: Paul Mendez | last post by:
I really need some help Date Code ConCAT Bal_Fwd NS_Fees Amt_Coll Cur_End_Bal 1/15/2004 KW 11KW2003 $500.00 $250.00 $250.00 2/15/2004 KW 12KW2003 $300.00 $500.00 ...
7
3284
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
8
1751
by: Elliot M. Rodriguez | last post by:
I am having a heckuva time debugging this, or determining why my page is behaving this way. I have a search form, that when completed, returns a datagrid. When the user selects a row (normal...
4
2185
by: robinsand | last post by:
My apologies to those of you who are more advanced Visual C++ .NET programmers, but I am working on a project for an MBA course that is condensed into an eight-week schedule, and I need help...
3
3523
by: Rich Squid | last post by:
Hello Here's my basic problem: On my asp.net form page I have a DetailsView (default mode=edit) bound to a AccessDataSource control. Users can successfuly update a databound template field,...
5
7077
by: smoi | last post by:
Hi all, My manager ask me to do backup for 3 database and restore them in a new server. I did the backup for the 3 database into BAK file. Then in the new server, when I did the restore in SQL...
1
1718
by: jhaydon | last post by:
First of all, I'm not a CSS expert. If I was, I wouldn't need to be posting for help here. Secondly, I have been doing web design for several years, just not css. Thirdly, I need help and hope...
2
2938
by: aszush | last post by:
//Title: Programming Assignment 1 //Version: //Copyright: Copyright (c) 1999 //Author: Andrew //Company: //Description: Computes employee's weekly gross and net pay....
0
6964
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
7123
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
7319
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...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3069
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
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.