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 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
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...
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.
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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,...
|
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 ...
|
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...
|
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...
| |
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...
|
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,...
|
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...
|
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...
|
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....
|
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...
| |
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,...
|
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |