Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1043249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T15:38:14+00:00 2026-05-16T15:38:14+00:00

Last time I used two parameter to query & show report. It worked well.

  • 0

Last time I used two parameter to query & show report. It worked well. Right now I am trying to use same code with another extra parameter but its not working. I am confused. Let me show you my code.

Code which worked well:

Parameter fields : bdate and edate

Crystal report formula : {Bal_sheet.bsdate} >= {?bdate} and {Bal_sheet.bsdate} <= {?edate}

Code to show report :

Private Sub butsbalsrep_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butsbalsrep.Click
    Dim cryRpt As New ReportDocument
    cryRpt.Load(Application.StartupPath & "\CrystalReport3.rpt")

    Dim crParameterFieldDefinitions As ParameterFieldDefinitions
    Dim crParameterFieldDefinition As ParameterFieldDefinition

    Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions
    Dim crParameterFieldDefinition1 As ParameterFieldDefinition


    Dim crParameterValues As New ParameterValues
    Dim crParameterValues1 As New ParameterValues

    Dim crParameterDiscreteValue As New ParameterDiscreteValue
    Dim crParameterDiscreteValue1 As New ParameterDiscreteValue

    crParameterDiscreteValue.Value = cmbbdate.Text
    crParameterDiscreteValue1.Value = cmbedate.Text

    crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields
    crParameterFieldDefinition = crParameterFieldDefinitions.Item("bdate")

    crParameterFieldDefinitions1 = cryRpt.DataDefinition.ParameterFields
    crParameterFieldDefinition1 = crParameterFieldDefinitions.Item("edate")

    crParameterValues = crParameterFieldDefinition.CurrentValues
    crParameterValues1 = crParameterFieldDefinition1.CurrentValues

    crParameterValues.Clear()
    crParameterValues1.Clear()

    crParameterValues.Add(crParameterDiscreteValue)
    crParameterValues1.Add(crParameterDiscreteValue1)

    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
    crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1)


    crysrepbalsht.ReportSource = cryRpt
    crysrepbalsht.Refresh()
End Sub

Code which is not working:

Parameter fields : idnmb and acyer and etyp

Crystal report formula : {res_info.stu_id} = {?idnmb} and {res_info.yr} = {?acyer} and {res_info.etype} = {?etyp}

Code to show report :

Private Sub butsrrepsr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butsrrepsr.Click
    Dim cryRpt As New ReportDocument
    cryRpt.Load(Application.StartupPath & "\CrystalReport3.rpt")

    Dim crParameterFieldDefinitions As ParameterFieldDefinitions
    Dim crParameterFieldDefinition As ParameterFieldDefinition

    Dim crParameterFieldDefinitions1 As ParameterFieldDefinitions
    Dim crParameterFieldDefinition1 As ParameterFieldDefinition

    Dim crParameterFieldDefinitions2 As ParameterFieldDefinitions
    Dim crParameterFieldDefinition2 As ParameterFieldDefinition

    Dim crParameterValues As New ParameterValues
    Dim crParameterValues1 As New ParameterValues
    Dim crParameterValues2 As New ParameterValues

    Dim crParameterDiscreteValue As New ParameterDiscreteValue
    Dim crParameterDiscreteValue1 As New ParameterDiscreteValue
    Dim crParameterDiscreteValue2 As New ParameterDiscreteValue

    crParameterDiscreteValue.Value = cmbsrrepidn.Text
    crParameterDiscreteValue1.Value = cmbsrrepay.Text
    crParameterDiscreteValue2.Value = cmbsrrepet.Text

    crParameterFieldDefinitions = cryRpt.DataDefinition.ParameterFields
    crParameterFieldDefinition = crParameterFieldDefinitions.Item("idnmb")

    crParameterFieldDefinitions1 = cryRpt.DataDefinition.ParameterFields
    crParameterFieldDefinition1 = crParameterFieldDefinitions.Item("acyer")

    crParameterFieldDefinitions2 = cryRpt.DataDefinition.ParameterFields
    crParameterFieldDefinition2 = crParameterFieldDefinitions.Item("etyp")

    crParameterValues = crParameterFieldDefinition.CurrentValues
    crParameterValues1 = crParameterFieldDefinition1.CurrentValues
    crParameterValues2 = crParameterFieldDefinition2.CurrentValues

    crParameterValues.Clear()
    crParameterValues1.Clear()
    crParameterValues2.Clear()

    crParameterValues.Add(crParameterDiscreteValue)
    crParameterValues1.Add(crParameterDiscreteValue1)
    crParameterValues2.Add(crParameterDiscreteValue2)

    crParameterFieldDefinition.ApplyCurrentValues(crParameterValues)
    crParameterFieldDefinition1.ApplyCurrentValues(crParameterValues1)
    crParameterFieldDefinition2.ApplyCurrentValues(crParameterValues2)

    CrystalReportViewer3.ReportSource = cryRpt
    CrystalReportViewer3.Refresh()

End Sub

I am confused why its not working! When I click on show report button it shows nothing(I dont get error message and getting no records back.). I have written {res_info.stu_id} = {?idnmb} and {res_info.yr} = {?acyer} and {res_info.etype} = {?etyp} it there in formula workshop-record selection formula editor. Please help me to get rid of this problem!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T15:38:15+00:00Added an answer on May 16, 2026 at 3:38 pm

    Yes you are right LittleBobbyTables. When I click on show report button it shows nothing(I dont get error message but getting no records back.) Yes I have written {res_info.stu_id} = {?idnmb} and {res_info.yr} = {?acyer} and {res_info.etype} = {?etyp} it there in formula workshop-record selection formula editor

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sessions in PHP seemed to have changed since the last time I used them,
It's been a while since I used GTK+, and the last time I did
last time I asked how to populate a data structure here . Now I
Last time I asked about the reverse process , and got some very efficient
How can my app get a valid last time connected to domain timestamp from
I'm building a Silverlight application and one of my caveats from last time was
I am writing a shell script to, among other things, determine the last time
When I save a file 'last saved' date time in a SQL database, I
Every time I create a new project I copy the last project's ant file
I have been building enterprise software for the last 10 years. In this time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.