473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Need Help with this Enter Parameter please....

Dears,

I have looked every where but i cannot find answer to this. Before you think i have already the RefreshReport and there is no change in this. Find below my code.

Try
strConnection = New System.Data.OleDb.OleDbConnection(connectionstring )
strConnection.Open()
search_query = "SELECT account_tracks.request_num,account_tracks.client_n ame,account_tracks.client_cis,account_tracks.accou nt_no,account_activity.action_status,account_activ ity.comment,account_activity.ref_date,system_login .username FROM account_tracks INNER JOIN account_activity ON account_tracks.track_id = account_activity.track_id,system_login WHERE account_activity.ID=system_login.ID AND account_activity.[ref_date] BETWEEN #" & fromdatetime.ToString(format) & "# AND #" & todatetime.ToString(format) & "# AND account_tracks.client_cis = '" & searched_CIS.Text & "'"

If (Seg_CB.Text <> "") Then
search_query = search_query & " AND account_tracks.[segment] = '" & Seg_CB.Text & "'"
End If
If (Reg_CB.Text <> "") Then
search_query = search_query & " AND account_tracks.[region] = '" & Reg_CB.Text & "'"
End If
If (City_CB.Text <> "") Then
search_query = search_query & " AND account_tracks.[city] = '" & City_CB.Text & "'"
End If
If (CurStat_CB.Text <> "") Then
search_query = search_query & " AND account_tracks.[current_status] = '" & CurStat_CB.Text & "'"
End If


search_query = search_query & " Order by account_activity.ref_date DESC"


objAdapter = New OleDbDataAdapter(search_query, strConnection)
objAdapter.Fill(ObjDataSet, "account_activity")

Dim search_string As String

search_string = searched_CIS.Text

If (Seg_CB.Text <> "") Then
search_string = search_string & ", Segment: '" & Seg_CB.Text & "'"
End If
If (Reg_CB.Text <> "") Then
search_string = search_string & ", Region: '" & Reg_CB.Text & "'"
End If
If (City_CB.Text <> "") Then
search_string = search_string & ", City: '" & City_CB.Text & "'"
End If
If (CurStat_CB.Text <> "") Then
search_string = search_string & ", Status: '" & CurStat_CB.Text & "'"
End If

Dim objRpt As New CrystalReport1

objRpt.SetDataSource(ObjDataSet.Tables("account_ac tivity"))
GeneratedReport.CrystalReportViewer1.ReportSource = objRpt

Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterValues As ParameterValues

crParameterFieldDefinitions = objRpt.DataDefinition.ParameterFields

For Each crParameterFieldDefinition In crParameterFieldDefinitions
crParameterDiscreteValue = New ParameterDiscreteValue()
crParameterValues = crParameterFieldDefinition.CurrentValues

Select Case crParameterFieldDefinition.Name
Case "from_date"
crParameterDiscreteValue.Value = FromDate_DP3.Text
Case "to_date"
crParameterDiscreteValue.Value = ToDate_DP4.Text
Case "other_criteria"
crParameterDiscreteValue.Value = search_string
End Select

Try
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crPa rameterValues)
Catch ex As Exception
End Try
Next

Catch ex As Exception
MessageBox.Show("Failure Occured!")
Exit Sub
End Try


Everytime i run this, it keeps on asking me "Enter Parameter Values", please please let me know what can i do to fix this.

Regards,

Maddy
Nov 22 '11 #1
4 1878
Anyone please. Really need help with this to get done with an important project :(
Nov 23 '11 #2
Rabbit
12,516 Expert Mod 8TB
It would help to know what parameters it wants and what line it errors out on, if it's erroring out.
Nov 23 '11 #3
Thank you Rabbit for replying.

I believe i didn't explain it well earlier.

I am not getting any error. The crystal report is taking the parameters correctly.

The only thing happening is that each time when i Generate Report the Enter Parameters Value prompt pop up. The three parameters that are in the report and the prompt ask for are:

from_date
to_date
other_criteria

Why is that prompt coming every time?

I searched a lot and they said it happens due to Report Refresh but i don't have that here.

Would appreciate your help.

Regards,

Maddy
Nov 23 '11 #4
Anyone? Please help me out here?
Nov 26 '11 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Phil IU Guy | last post by:
I am having 2 issues, both acting very randomly, and for the most part I dont get this message on most computers, but I have had a couple computers get either issue 1, or issue 2. Issue #1: I...
1
by: Chuck | last post by:
I have a query that uses the query with the critera set to . We I run the query the msgbox pops up asking for the name information to be entered, but on the top (blue background) of the message box...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
2
by: lgo | last post by:
I have read several variations of this topic posted on this news group. However I was not able to find the answer for my problem. I am trying to build code (see below) to update a large single...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
2
by: billtubbs | last post by:
Hi I am getting the common problem of the "Enter Parameter Value" dialog box, which pops up every time I execute a query. I built the query using the Expression Builder in Access. If any of my...
1
by: waltnixon | last post by:
I've got an MS Access query which runs fine when double clicked and returns all of the rows in a test database I'm building. I've set up a multi group report based on the query. I immediately...
1
by: Sport Girl | last post by:
Hi everybody, please can anybody help with this question: I an working with Acees 2007, and everytime I run a report I have a dialog box prompting "Enter Parameter Value" requesting for a...
7
by: adigga1 | last post by:
Hello EveryOne, I have a situation with a Form running an event; It works fine when it calls or manipulates number values; but when I put a character within the numbers or use alpha-numeric...
1
by: Chris Brooks | last post by:
I used the CmdButton Wizard and arrived at the following: where condition: "=" & "'" & & "'" I am trying to Open a separate pop up form based on the currently selected Company Name in my...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.