Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Crystal Report not display by pass in parameter Post Reply Post New Topic
Author Message
youngboyguy
Newbie
Newbie


Joined: 11 Jul 2012
Online Status: Offline
Posts: 2
Quote youngboyguy Replybullet Topic: Crystal Report not display by pass in parameter
    Posted: 11 Jul 2012 at 11:25pm
Hi,
 
Good day. I have a crystal report design that consist of 1 parameter. I am written a code that try to pass in the value to Crystal Report so that it will display the report according to what i want.
 
However, it does not seems to be display the records that i want, but it just ignore my parameter and show all the records.
 
Here is my code:
 
__________________________________________________________

    Private Sub frmPreview_Load(sender As Object, e As System.EventArgs) Handles Me.Load

        Dim cryRpt As New ReportDocument

 

        cryRpt.Load(“C:\\Dynamics\Reports\Report1.rpt”)

 

            Try

 

                Dim crParameterFieldDefinitions As ParameterFieldDefinitions

                Dim crParameterFieldDefinition As ParameterFieldDefinition

                Dim crParameterValues As New ParameterValues

                Dim crParameterDiscreteValue As New ParameterDiscreteValue

 

                crParameterDiscreteValue.Value = "15"

                crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields

                crParameterFieldDefinition = crParameterFieldDefinitions.Item("ACTINDX")

                crParameterValues = crParameterFieldDefinition.CurrentValues

 

                crParameterValues.Clear()

                crParameterValues.Add(crParameterDiscreteValue)

                crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)

 

                cryRpt.ParameterFields(0).CurrentValues = crParameterValues

 

                CrystalReportViewer1.ReportSource = cryRpt

                CrystalReportViewer1.Refresh()

 

       End Sub

________________________________________________________________

Can anyone please help? Thanks.

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jul 2012 at 5:34am
Is there a selection criteria in the report (check the select expert)?
IP IP Logged
youngboyguy
Newbie
Newbie


Joined: 11 Jul 2012
Online Status: Offline
Posts: 2
Quote youngboyguy Replybullet Posted: 12 Jul 2012 at 3:31pm
IN the report, select expert, i have following code:
{GL00100.ACTINDX}={?ACTINDX}
 
Please help. :)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.