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.

Disable/Remove Enter Parameter Values Window in Crystal Report

I am trying to make a report which gets its data from a windows form's textboxes. My code works fine but upon display of the report, a window always appear asking to enter parameter values. How can I bypass or remove this window? Here is my code:

Dim report As rptVoucherReceipt = New rptVoucherReceipt
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues

crParameterFieldDefinitions = report.DataDefinition.ParameterFields

crParameterFieldLocation = crParameterFieldDefinitions.Item("parAmtWords")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = frmPremPay.txtAmtWords.Text
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crPara meterValues)

crParameterFieldLocation = crParameterFieldDefinitions.Item("parPayAmt")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = frmPremPay.txtPremPayPayAmt.Text
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crPara meterValues)

CrystalReportViewer1.ReportSource = report
Dec 10 '10 #1
5 11149
This thread is solved.
Dec 11 '10 #2
Dear awmantonio
can you show me how to solve it? I have same problem. Thank alot
Dec 21 '11 #3
Hi! I used this code which worked a lot better:

Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.ReportSource
Imports CrystalDecisions.Shared

Private Sub Form1Rpt_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


Dim ProjectReport As New ReportDocument
ProjectReport.Load(Application.StartupPath & "\rptProjectRpt.rpt")

Dim report As rptProjectRpt = New rptProjectRpt
Dim crParameterDiscreteValue As ParameterDiscreteValue
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldLocation As ParameterFieldDefinition
Dim crParameterValues As ParameterValues
crParameterFieldDefinitions = report.DataDefinition.ParameterFields

crParameterFieldLocation = crParameterFieldDefinitions.Item("parText1")
crParameterValues = crParameterFieldLocation.CurrentValues
crParameterDiscreteValue = New CrystalDecisions.Shared.ParameterDiscreteValue
crParameterDiscreteValue.Value = Form1.Text1.Text
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crPara meterValues)

crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldLocation.ApplyCurrentValues(crPara meterValues)

crvProjectRpt.ReportSource = report


End Sub

Cheers!
Dec 21 '11 #4
You saved my life. It worked!


@awmantonio
Mar 10 '15 #5
Jincy7
1
though it's an old answer...this actually solved my problem...
"OLD IS GOLD" ... thank you




@awmantonio
Jul 26 '15 #6

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

Similar topics

2
by: RBohannon | last post by:
I have a report with most fields populated by a query. However, some of the fields are variable in such a way that their values cannot be queried from a table. At present the values for these...
0
by: Faraz Ahmed | last post by:
is there a way to do inner join on null values in crystal report designer... in current scenario its not returing any rows if null values found.... as we can do that in query like x inner join...
0
by: James Wallace | last post by:
I would like to know if anyone knows how to apply a date range to a range value parameter of a crystal report without using the cystal report viewer. Currently I have to pass a range value to a...
2
by: Miguel | last post by:
I have followed the advice noted throughout this group for capturing parameter values in a report header. It works, but the parameter dialog box appears twice,once for the query and once for the...
1
by: n3ox3ro | last post by:
If im using an "enter parameter values" box in a query to find information in a table and if you type in a value that doesnt exist how do you stop if from displaying a blank screen on your form??
2
by: Malt via AccessMonster.com | last post by:
Hi; I would like to place a date range in a report header that matches the input dates a user enters through a parameter query when the report is run. The query contains the following in the...
1
by: Eva | last post by:
I need to pass listbox selected values to crystal report from .net 2005.when I am doing it the error display "The types of the parameter field and parameter field current values are not compatible."...
1
by: imtmub | last post by:
Hi All, I have mainpage (POselect.aspx). language VB In that page i have a textbox (txtPOId) and command button(Button1) When i press then button its should send the textbox value to Crystal...
2
by: Sep410 | last post by:
Hi all, I am using vb.net and Sql2005 and crystal report viewer in my application. the peroblem is when I run a report and I set the value for parameter a Enter Parameter value pops up.I shoudl...
3
by: chamarajanaka | last post by:
When i run the page i'm getting a message showing."Missing Parameter values" and want display the report. i've used following formula Year ({tbl_DisasterRegistration.Date}) = Year (CurrentDate) ...
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...
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.