|
-
Sep 22nd, 2006, 01:14 AM
#1
Thread Starter
Junior Member
Crystal Report Formula
Hi to all,
I am using VB6 and Crystal XI.
I want to know how to pass values of Crystal report formulas.
I hope , below example, let u clear what i am asking.
I insert a Formula Field , @CompanyName in Crystal report. I am need to pass the value for this formula in VB Runtime.
I don't know how to pass a value for crystal report formula.
Can anyone help me?
Advance Thanks.
Regards,
Suresh.
-
Sep 22nd, 2006, 08:56 AM
#2
Lively Member
Re: Crystal Report Formula
 Originally Posted by suresh.cgmohan
Hi to all,
I am using VB6 and Crystal XI.
I want to know how to pass values of Crystal report formulas.
I hope , below example, let u clear what i am asking.
I insert a Formula Field , @CompanyName in Crystal report. I am need to pass the value for this formula in VB Runtime.
I don't know how to pass a value for crystal report formula.
Can anyone help me?
Advance Thanks.
Regards,
Suresh.
Try adding a parameter field to the report, passing the parameter value from VB and then use that parameter value in the formula instead of passing the value straight to the formula. Depending on the parameter type and what the formula requires, you may have to cast values. Make the parameter field invisible.
HTH
Energy can be neither created not destroyed. It can only be wasted.
Red Green
-
Sep 23rd, 2006, 12:15 AM
#3
Thread Starter
Junior Member
Re: Crystal Report Formula
Hi King_George,
Thans for ur info.
Passing value to Formula field from VB is accomplished.
Now, i am need to know, how to pass the Selection Formula.
Please send me one example in string and integer type.
When i pass the value, 20515 Error Code displays and stops program execution.
I used as below format:
SelecForm = "{ItemMaster.ItemType} = 0"
CrystalReport1.SelectionFormula = SelecForm
ItemMaster.ItemType is Number Type. Database MS Access 2003.
Can you help me?
Advance Thanks,
Regards,
Suresh.
-
Sep 23rd, 2006, 11:36 AM
#4
Lively Member
Re: Crystal Report Formula
 Originally Posted by suresh.cgmohan
Hi King_George,
Thans for ur info.
Passing value to Formula field from VB is accomplished.
Now, i am need to know, how to pass the Selection Formula.
Please send me one example in string and integer type.
When i pass the value, 20515 Error Code displays and stops program execution.
I used as below format:
SelecForm = "{ItemMaster.ItemType} = 0"
CrystalReport1.SelectionFormula = SelecForm
ItemMaster.ItemType is Number Type. Database MS Access 2003.
Can you help me?
Advance Thanks,
Regards,
Suresh.
www.businessobjects.com has dozens of examples.
or here
http://www.google.ca/search?sourceid...&q=error+20515
Energy can be neither created not destroyed. It can only be wasted.
Red Green
-
Sep 23rd, 2006, 11:52 AM
#5
Junior Member
Re: Crystal Report Formula
The example:
VB Code:
With CrystalReport1
.ReportFileName = App.Path & "\RPTInvoice.rpt"
.WindowShowCloseBtn = True
.WindowShowRefreshBtn = True
.WindowState = crptMaximized
.WindowShowSearchBtn = True
.WindowTitle = "Invoice "
criteria = "{FaxOut.Bil}=" & Val(txtBil1) & ""
.SelectionFormula = criteria
.Action = 1
End With
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|