Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: parameter form - vb6 Post Reply Post New Topic
Author Message
kalmazz
Newbie
Newbie


Joined: 02 Feb 2011
Online Status: Offline
Posts: 1
Quote kalmazz Replybullet Topic: parameter form - vb6
     Posted: 07 Feb 2011 at 12:37am
i have designed a report in CR9 and have a selection forumlula.
I need to run this from vb6 using the below code with a parameter passing from VB6 . all are working fine but still the Crystal Report paramerer form appears.
 
if I use the below command
creport.EnableParameterPrompting = False as in line @@@@@
 
Crystal Report does not check any parameter  into consideration
Please advise me how can i stop the Crystal Report Parameter form from appering.
 
 
 
 vreportname = "E:\PCS\REPORTs\gesalessummary.rpt"
 Set capplication = New CRAXDDRT.Application
 Set creport = capplication.OpenReport(vreportname)
 creport.Database.Tables(1).SetLogOnInfo vservername, vdatabasename, vdusername, vdpassword
@@@@  creport.EnableParameterPrompting = False
 
 frmcreport.CR.SelectionFormula = "{invheader.regionno}= " & Me.regionno.Text
frmcreport.CR.ReportSource = creport
frmcreport.CR.ViewReport
frmcreport.Show
 
 
Please advice my how do I  run crystal reports from VB6 without the Crystal Report parameter form
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 07 Feb 2011 at 3:29am
shouldn't you be setting the value of the parameter, so the report 'knows' the values.
 
I don't really know the code, in .Net or VB6, but I believe you declare a variable of type crystalreport.parameter, you set it's name (so it know which parameter it is for) and then you set the value.
 
If you don't supply a parameter, crystal is going to ask, as it cannot proceed without it.
 
HTH 
IP IP Logged
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