Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become a VB Expert!

Join 416,720 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,864 people online right now.Registration is fast and FREE... Join Now!



how to pass parameter in crystal report from vb 6.0 how to pass parameter in crystal report from vb 6.0 Rate Topic: -----

#1 hellovishal101  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 2
  • View blog
  • Posts: 4
  • Joined: 28-October 08


Dream Kudos: 0

Share |

how to pass parameter in crystal report from vb 6.0

Post icon  Posted 28 October 2008 - 10:22 PM

dear all
i m working with vb 6.0 and crystal report
i want to send parameter to the crystal report .
how can i do it.
Pls help me its urgent.
Was This Post Helpful? 1


#2 hellovishal101  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 2
  • View blog
  • Posts: 4
  • Joined: 28-October 08


Dream Kudos: 0

Re: how to pass parameter in crystal report from vb 6.0

Posted 28 October 2008 - 11:07 PM

ANY BODY PLEASE SEND ME THE CODE TO SEND PARAMETER TO CRYSTAL REPORT FROM VB 6.0 ...
Was This Post Helpful? 1

#3 eyesice  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 23-October 08


Dream Kudos: 0

Re: how to pass parameter in crystal report from vb 6.0

Posted 29 October 2008 - 05:10 AM

Show us how you are calling your report
Was This Post Helpful? 0
  • +
  • -

#4 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • Icon

Reputation: 1401
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07


Dream Kudos: 12950

Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

Re: how to pass parameter in crystal report from vb 6.0

Posted 29 October 2008 - 05:15 AM

View Posthellovishal101, on 29 Oct, 2008 - 12:07 AM, said:

ANY BODY PLEASE SEND ME THE CODE TO SEND PARAMETER TO CRYSTAL REPORT FROM VB 6.0 ...


Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
Was This Post Helpful? 0
  • +
  • -

#5 hellovishal101  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 2
  • View blog
  • Posts: 4
  • Joined: 28-October 08


Dream Kudos: 0

Re: how to pass parameter in crystal report from vb 6.0

Posted 29 October 2008 - 05:47 AM

View Posteyesice, on 29 Oct, 2008 - 06:10 AM, said:

Show us how you are calling your report



Path1 = "D:\vishal\Vishal\Vishal\rptIndAdmitCard.rpt"
Set rpt = app.OpenReport(Path1)
frm_viewer.CRViewer1.ReportSource = rpt
frm_viewer.CRViewer1.ViewReport
frm_viewer.Show
Was This Post Helpful? 0
  • +
  • -

#6 eyesice  Icon User is offline

  • New D.I.C Head
  • Pip

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 23-October 08


Dream Kudos: 0

Re: how to pass parameter in crystal report from vb 6.0

Posted 01 December 2008 - 10:49 PM

View Posthellovishal101, on 29 Oct, 2008 - 06:17 PM, said:

View Posteyesice, on 29 Oct, 2008 - 06:10 AM, said:

Show us how you are calling your report



Path1 = "D:\vishal\Vishal\Vishal\rptIndAdmitCard.rpt"
Set rpt = app.OpenReport(Path1)
frm_viewer.CRViewer1.ReportSource = rpt
frm_viewer.CRViewer1.ViewReport
frm_viewer.Show


you have two options

Option 1
rpt.ParameterFields(0) = "@parameter_name_1;" & "parameter_value" & ";TRUE"
rpt.ParameterFields(0) = "@parameter_name_2;" & "parameter_value" & ";TRUE"

or
Option 2
rpt.ParameterFields(1).AddCurrentValue ("parameter_value")
rpt.ParameterFields(2).AddCurrentValue ("parameter_value")


use Option 1 if you are not sure about the order of parameter variables in the collection. note that bound if Parameterfields() is kept at "0" In Option 2, we are not referring to the parameters by name assuming that they are always presented in the prescribed order.

here i'm using your "rpt" object

This post has been edited by eyesice: 01 December 2008 - 10:56 PM

Was This Post Helpful? 1



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users