Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pass parameter filld from vfp to crystal reports

Status
Not open for further replies.

PeriyurParthi

IS-IT--Management
Joined
Jul 18, 2001
Messages
258
Location
IN
hi all
i would like to pass values to the parameter fields which is in crystal reports 8.0, lot off replies will be helpful
thanks
parthi
 
Is your report based on a table?
The Crystal Report OCX has a parameter that allows you the specify the table to use with the report.
Code:
oCRYSTAL=CREATEOBJECT("Crystal.CrystalReport")
oCRYSTAL.REPORTFILENAME="c:\myReport.rpt"
oCRYSTAL.DATAFILES(0)="c:\myTable.dbf"
 
Are you asking if you can set various Crystal settings (like grouping filters, etc) via passing a parameter from Visual Fox Pro to Crystal?

This is my question.... how do I say only print if 'group = A' in Crystals Group Selection Criteria with a parameter passed from VFP????

in other words....

Is there a way to set the Crystal Report Group Selection Criteria by passing a statement from VFP when calling the report?
 
thanks mgagnon and ltillner, i think u have not under stood my problem, there is a parameter option in crystals reports under insert menu, we can create a parameter field and based on that if we pass values to that parmeter it will filter the records and it will retirve, it is possible in VB,
the VB code is
crystalreport1.parameter(0)="parametername";true

the value from vb will be passed to crystal reports, like wise i want to do in vfp, is it possible , replies will be helpful
thanks
parthi
 
What kind of error are you getting. What you show above looks like it should work? Attitude is Everything
 
Thanks dance
actually the systax to pass a parameter fields is

crystalreport1.ParameterFields(0) = "OrderNo;" & txt_Fs_OrderNo & " ;true" (in VB Code)

where here orderno is the parameter name in Crystal report and txt_fs_orderno is the textbox control name in VB Form and true is arugement, by the same thing i have tried in VFP like


oRep.ParameterFields(1)="scode;300512;true"

its giving error as type mismatch , i can identify the error
fi we are specifying like
oRep.ParameterFields(1)
its working but i have to pass a value to parameter field
can any one solve this problem
thanks
parthi
 
I am currently working on an application. I have seen the HOME() function used in the microsoft samples. When I install my application on a new computer how to I reference the different drives when creating reports or running forms. For example. I have a form I run from the menu. I call it by using the following.

DO FORM C:\FOLDER NAME\FORMS\FORM1.SCX

I want the folder name and location to be static. However when the directory changes my application does not. Is there a fix for the "C:\" problem?

Thanks
 
hi jspell, do u have any solution for my post....
regds ur problem try
set defa to C:\FOLDER NAME\FORMS\FORM1.SCX
and
set path to C:\FOLDER NAME\FORMS\FORM1.SCX

bye
parthi

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top