Hi friends,
here is my problem. I am using the Crystal Report and everything is fine. Now when i try to run the project, it first open a dialog box named as 'Enter Parameter Values' and i need to enter the date in order to view the report. But what i need is, when i just click the menu, it directly goes to report page and show all data's regardless of the date. Here is the dialog box i got.

I am unable to upload the pic in this forum. So please view it thru this link.
http://www.imagechicken.com/viewpic.php?p=1248357190043268600&x=jpg

Hello,

You need the following code to set the value of a parameterfield in crystal reports:

<reportname>.SetParameterValue("<Name of parameterfield>", <Value of the parameterfield>)

Thanks dude.BTW The Dialog box opens immediately after the form loading. So if i put the code in form loading, is it enuff to stop the dialog bix from being shown up.

Hello,

You need the following code to set the value of a parameterfield in crystal reports:

<reportname>.SetParameterValue("<Name of parameterfield>", <Value of the parameterfield>)

Dude this aint working. Tell me what should i do in order to fet rid of the dialog box.

Hello,

You need the following code to set the value of a parameterfield in crystal reports:

<reportname>.SetParameterValue("<Name of parameterfield>", <Value of the parameterfield>)

Dude this aint working. Tell me what should i do in order to fet rid of the dialog box.

Hello,

You need the following code to set the value of a parameterfield in crystal reports:

<reportname>.SetParameterValue("<Name of parameterfield>", <Value of the parameterfield>)

Dude this aint working. Tell me what should i do in order to fet rid of the dialog box.

Hello,

Here an example. It is a code I used in a program I write a view days ago:

Dim rpt As New Factuur1
        rpt.SetDataSource(Me.DatabaseDataSet)
        rpt.SetParameterValue("Bedrijfnaam", Me.txbBedrijfsnaam.Text)
        Me.CrystalReportViewer1.ReportSource = rpt

First i told the program which crystal report it must use. The name of this report is Factuur1:

Dim rpt As New Factuur1

Than I had to set the DataSource, because I had data from a database in it:

rpt.SetDataSource(Me.DatabaseDataSet)

And this is the code I used to set the value of the Parameter Field. The name of the Parameter Field is Bedrijfnaam and the value of the textbox must come from a textbox named txbBedrijfsnaam:

rpt.SetParameterValue("Bedrijfnaam", Me.txbBedrijfsnaam.Text)

And last I had to fill the crystal report viewer with the report. The name of the crystal report viewer is CrystalReportViewer1:

Me.CrystalReportViewer1.ReportSource = rpt

I hope this will help you to get rid of the message box.

Johan

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.