Sum A Formula Field At Crystal Report
Hi Dear Programmer How are you all. I am facing a problem, that is summesion of a formula field. Here are the details
I have a database of MS access format. First I got two time there. By calculating the time I got the different. The calculation is done at Crystal Report. Now I need the sum of that field. But I can't do it by CR. Anybody here to help me by giving the formula code or other process. I try with Sub total command but failed. Giving a sample attachment. Thanks. Mamun
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Using Formula Field Crystal Report 8.5
hi all
i want to use forumula fied in Crystal report 8.5 and i also want to use condition in formula field
any one help me
thanx in Advance
Farhaj Qazi
Crystal Report Sort Formula Field!
Please find attached a screen shot of my report....
I'd like to sort this report by the percentage column that i've circled in red. Is there a way to do this????
This value in red is obtained as a formula field
% answered wrongly(RED) = {#RTotal0} % (Count ({Consolidated_Audit_Questions.SubectID}, {Consolidated_Audit_Questions.SubectID}))
Rtotal0 = No of times answered wrongly
PLEASE HELP!!!
I'm using Crystal reports.NET
Crystal Formula Field
Hello All
I am trying to get a formula field to work in Crystal Reports V7
The formula lookes like this:
Code:
'Batch Number ' + Totext({Route_ttx.Batch ID})
The problem I have is that {Route_ttx.Batch ID} is numeric and no matter how much I try I cannot get it to format correctly within the formula.
I get a resulting field 'Batch Number 1,234.00'
What I really need is 'Batch Number 1234'
I cannot seem ot be able to format the number correctly before it is converted into a string and appended to the 'Batch Number ' text.
Any ideas?
Crystal Reports Formula Field
Hi
I got a database column which has number values like
480, 495 , 615, 630
which is equivalent to
480 = 8am (which is like 480/60=8)
495 = 8.15am
615 = 10.00am
630 = 10.15 am
i get this values from ctDEdit control, which gives numbers for time.
Now i have to show this number values as time in crystal reports. so i thought of having a formula field.
its easy to get hours and minutes from this number:
its goes like this
(615/60)=10.25
so 10 is hours
(25*60)=1500, here 15 is minutes.
can any one please help me to do this in a formula field, ie to show the time as 10.15am for number 615.
i hope im clear.
thanks
kumaarrv
Crystal: Sort Using A Formula Field
I΄m trying to call a Crystal Report using two formula fields on SortField attribute.
But when I call this report, I get error message: RUN-TIME ERROR '20509', Invalid Field Name
CrystalReport1.WindowTitle = "MyReport"
CrystalReport1.ReportFileName = App.Path & "
eport.rpt"
CrystalReport1.SortFields(0) = "+{@FormulaField1}"
CrystalReport1.SortFields(1) = "+{@FormulaField2}"
CrystalReport1.SortFields(2) = ""
CrystalReport1.Destination = crptToWindow
CrystalReport1.WindowState = crptMaximized
CrystalReport1.DataFiles(0) = App.Path & "MyData.mdb"
CrystalReport1.Action = 1
The report is OK, and the only modification I made was using formula fields in sort attribute. Is there any error on sort attribute? The formula fields exist on detail line.
Thanx for any help!
Best Regards
Aldo Nakamura
aldonakamura@bol.com.br
Sao Paulo, Brazil
Not Able To Sum The Field In Crystal Reports 9 Formula Editor
Friends,
The below formula is not working. Please point me where iam making mistake.
=========================================
whileprintingrecords;
global numbervar tottrd;
numbervar cnttottrd;
if
(
{Admin.OTC}="001"
or
{Admin.COEN} in
["Chargeable Labour + Chargable Spares",
"Chargeable Labour + Free Spares",
"Chargeable Spares + Free Labour"]
)
then
cnttottrd := {PAYMENTS.PAIDAMT}
else
cnttottrd := 0;
tottrd := tottrd + cnttottrd
=========================================
if i change
cnttottrd := {PAYMENTS.PAIDAMT}
to
cnttottrd := 1
then its working.......
Please treat this as urgent.
Thanks & Regards
Sathyguy
Crystal Reports - Sorting A Formula Field
Hi,
I've got a formula field on my report: -
Code:
//@SumQty
Sum({SALES_VIEW.SUM_QTY}, {SALES_VIEW.AR_DESCRIPTION})
I want to sort the report using this field, but can't seem to find a way.
Is it possible to do this?
Regards
Not Able To Sum The Field In Crystal Reports 9 Formula Editor
Friends,
The below formula is not working. Please point me where iam making mistake.
=========================================
whileprintingrecords;
global numbervar tottrd;
numbervar cnttottrd;
if
(
{Admin.OTC}="001"
or
{Admin.COEN} in
["Chargeable Labour + Chargable Spares",
"Chargeable Labour + Free Spares",
"Chargeable Spares + Free Labour"]
)
then
cnttottrd := {PAYMENTS.PAIDAMT}
else
cnttottrd := 0;
tottrd := tottrd + cnttottrd
=========================================
if i change
cnttottrd := {PAYMENTS.PAIDAMT}
to
cnttottrd := 1
then its working.......
Please treat this as urgent.
Thanks & Regards
Sathyguy
Crystal Reports Formula Field Charting
I am not a Crystal expert, I normally would be using VB but this project requires a report written in Crystal and I have no access to VB. Any suggestions would be great.
I have a report with a field: {StartTime} that is being pulled from a subreport: ASubrpt.rpt.
I the main report I have a formula field: {RoundedTime} that rounds the time from {StartTime} in ASubrpt to the nearest minute by fives. (example 7:22 would be 7:20).
Now, I need to graph and cross tab the count of records on the change of {RoundedTime}.
Please advise. I have even tried using the Charting on Print-Time Formulas pdf from Business Objects.
If there was a way to format the StartTime field in ASubrpt to be rounded and then create the chart in the subreport then I could insert it into the main report, but I do now know if you can format the time like that w/o a formula field. And then would it even be chartable?
Thanks in advance!
Crystal Reports 9: Formula Field Alignment
I have the following Formula Field in the detail section of a report…
If IsNull({ado.AMOUNT}) = False Then
Formula = {ado.amount}
Else
Formula = 0.00
End if
The Horizontal Alignment for the field is set to “Right”. For some reason when ado.AMOUNT is Null the zero value of the formula is displayed to the right but it is off by one position to the left.
See Example
AMOUNT
$0.00
$10.00
Anyone know why this is happen?
Crystal Report Formula Help
i dont know where to begin... i have created this report and would like to have when the user inputs a begdate and enddate and state to show $totals of that criteria.
the report does show the beg date and end date and the state , but the only thing wrong it calculated the total cost of all the states income in the grand total of the report, i only want to have the state to show the total of that kind
ie if user inputs begdate = 1/1/03 and end date (today) and select state CA i want the report to show the totalcost income of that state between those dates, it only shows the grand totalcost of all states right now....
i am using win xp, vb6 and crstal report 4.6? that is on the vb cd
i dont know if i need to code in vb or put a formula in crystal???? HELP please
StartDate = InputBox("Enter Starting Date To Print:", "Date Entry", Date)
EndDate = InputBox("Enter Ending Date To Print:", "Date Entry", Date)
State = InputBox("Enter Code of State To Print:", "State Entry")
If StartDate = "" Then
Else
If EndDate = "" Then
Else
If State = "" Then
Else
CrystalReport1.ReportFileName = "\Server1salestx.rpt"
CrystalReport1.GroupSelectionFormula = "{OrderStatus.Date} >= " & "Date(" + Format$(StartDate, "yyyy,mm,dd") + ") and {OrderStatus.Date} <= " & "Date(" + Format$(EndDate, "yyyy,mm,dd") + ") and {OrderStatus.Order_State} = " & "'" + (State) + "'"
CrystalReport1.Action = 1
End If
End If
End If
End If
Crystal Report 8.5 Formula
greetings,
I work with VB6 sp5, SQL Server2000, Crystal Reports 8.5
Trying to create a certain report, I need to check the values of some table fields and accordingly display some notes.
my table contains, among all others, two int-type fields called HoursIn and MinutesIn. I would like to create a formula (i guess) to check these values.
If both are 0 then I would like to display "CLOSED", otherwise diplay the HoursIn and MinutesIn values.
can someone help me with this please?
should I have an empty text field and feel it accordingly? or insert the formula field and have it feeled? how can it be done? I tried but with no success.
thank you in return.
Formula In Crystal Report
Hi All,
I want to create formula in Crystal report.I am very new to Crystal reports.Can Any one guide me how to Create formulas.
I want to use replace function .
Any Ideas??
Crystal Report 8 Formula?
I'm having problems grouping a formula field. I have been told that you cannot create a group if the formula has the WhilePrintingRecords within the code. I have 4 formulas that help me get the subtotal(so to speak) for the Total Time(text object). Not a field with in database.
Formula1: WhilePrintingRecords;
NumberVar RunningTotal;
RunningTotal := 0
Formula2: WhilePrintingRecords;
NumberVar RunningTotal;
RunningTotal := RunningTotal + {@TimeDiff}
Formula3: WhilePrintingRecords;
NumberVar RunningTotal;
RunningTotal;
The 4th formula is just attaching the word minutes to formula3 total. Now is there another way to get a total for this field without using the WhilePrintingRecords, so that I can make a group out to the total field?
Thanks for any help jeffro!
Crystal Report Formula..??
I hope someone can help me out. I'm trying to write a formula for the top ten in industrial. The fields I'm using are repairtime, setuptime, and pmtime, which are used to do the totaling and that will be used to find the top total of the machineno. Also I'm using the machineno, and division, the division field is used to look up just the industrial equipment.
Can anyone help out??
Aja
Crystal Report Formula
Hi Guys,
I am using Crystal reports 8.5. I am writing reports for another packaged software which takes custom crystal reports. I have written a report and it work fine. But I have a small problem in Record selection. I have a field on the report depending on this field starting characters another field must be selected from another table. I was wondering if a formula can do this. ie using a query in a formula.
I would check like this
if Left({field1},1) = "S" then
here I need to select another field from another table with different condition
else
{field2}
Could you guys help me out on this.
thanks
Crystal Report 9 Formula
where can i get more tutorials or resources or good ideas for effective high level formula writing.
Crystal Report Formula
Hi friends,
I am using crystal reports 8 . while writing the formulas the all the fields are not displayed in report fields(in formula box).
for E.g I am trying to hide/supress one of the fields which is blank using the formula for that particular field. but cannot see that fields in report fields in the formula box.
Any help will be highly appreciated.
Noorali.
Pass Formula From VB To Crystal Report
Can anyone explain to me how I can pass a formula from a VB6 application to Crystal Reports?
I want to select specific data from the database based off of a variable in vb.
For example: In the VB app, to create the recordset, I would say
SQL = Select * from tablename where dbField = '" & txtRegion & "';"
I only want to pass the results in the recordset to CR or pass a formula where Crystal Reports would give me the same info.
Thanks,
Sam
Formula Problem In Crystal Report
I am using Crystal Reports XI.
Here is the scenario:
In the Report, I have 2 tables from the same MS Access Database. They are:
PartStatus
PartNumberChange
They both have a Primary Key call "dbPartNumber"
In the Link area of the Database Expert, the relationship is showing from PartStatus to PartNumberChange.
Part Status record must exist.
PartNumberChange record does not need to exist.
I created a record formula:
Code:
{PartStatus.dbQtyOnHand} + {PartNumberChange.dbOldQtyOnHand}
The problem is when I print the report only those PartStatus records that have a PartNumberChange record will print.
I want to print ALL the PartStatus records with their "dbQtyOnHand" . if they have a PartNumberChange record , I want to add the dbQtyOnHand to the dbOldQtyOnHand and print that total.
If I remove the formula, all the PartStatus records print but the totals are not correct if there is a matching dbPartNumber record in the PartNumberChange Table.
Thanks,
Sam
Crystal Report Selection Formula
Hi,
how can i use left, right and mid ect. function in crystal report selection formula. for example:
CR.SelectionFormula = "mid({Custumer.CustCode},1,3)" ....
we can use mid funtion in VB and Substr function in SQL query, what in Selection formula?
thanks
Crystal Report Selection Formula
I have a problem with the selection formula to be used by crystal report 10. At first I just set one selection formula and it's work and now i want to used two selection formula but I do not know how to write it. Below is the code and the word highlight with red color is the formula i want to add.Can anyone teach me how..
Code:
Private Sub ListView1_DblClick()
ndLeaApprEmpNo = Trim(ListView1.SelectedItem.SubItems(3))
ndLeaApprLCode = Trim(ListView1.SelectedItem.SubItems(1))
ndLeaApprDt = Trim(ListView1.SelectedItem.SubItems(4))
'MsgBox ndLeaApprEmpNo & ", " & ndLeaApprLCode & ", " & ndLeaApprDt
Unload Me
Me.MousePointer = vbHourglass
Dim crApp As CRAXDRT.Application
Dim Report As CRAXDRT.Report
Dim strSelectionfrm As String
Set crApp = New CRAXDRT.Application
Set Report = crApp.OpenReport("C:Program FilesMicrosoft Visual StudioVB98ProjectsLeaveAppLeaveForm2.rpt")
Report.Database.Tables(1).SetLogOnInfo "SQL", "tebrauteguh", "sa", "sa"
'{tblLeaveApp.EmpNo}='" & ndLeaApprEmpNo & "' -->another selection formula i want to add, how to combine both
strSelectionfrm = "{tblLeaveApp.Date_App}='" & ndLeaApprDt & "'"
Report.RecordSelectionFormula = strSelectionfrm
Report.DiscardSavedData
Form8.CRV.ReportSource = Report
Form8.CRV.ViewReport
Form8.Show
Form6.Hide
Me.MousePointer = vbNormal
End Sub
Sending Value In VB To Formula In Crystal Report 8.5
holla...
wrong room perhaps... but pls help... since I know this room will reply faster that other.... and I need this help soon.
I have a .RPT file which have an empty formula.
if you ask why empty formula ? coz, I'll send a value to this empty formula from my VB project.
PS : only 1 formula exist in that .RPT file
let's say this empty formula name = "period"
and I have a text box object, name = "txtPeriod"
what i need to do is to send txtPeriod.Text (in VB) to formula "{period}" in Crystal Report.
I did as below, but error.....
VB Code:
Dim CApp As New CRAXDRT.Application Dim CReport As CRAXDRT.Report Dim myPeriode as String Screen.MousePointer = vbHourglass Set CReport = CApp.OpenReport(App.Path & "myReport.rpt") CReport.DiscardSavedData CReport.PrinterSetup (0) myPeriode = "As Of : " & Format(cDate(txtPeriod.Text), "mmm-yyyy") 'error occured at below line CReport.FormulaFields(1).Value = myPeriode
any help ?
pls...
thx a lot,
[-w-]
Calculate And Formula In Crystal Report
I must do a report by crystal report6 about testing result that concerns 4 tables as follows:
1. Product table => ID, Name,
..(other details of product)
Eg. F102 Bead wire02
2. Specification => Table that keep specification of each product
Effect_date : effective date for this product (mm/dd/yyyy)
Product_ID : id that links to product table
Aname: Type of analysis
Min: Minimum value
Target: Target value
Max: Max value
XXXX = Aname in specification
Test value = Value of testing
Eg.
Effect_date-----Product_ID------Aname--------------Min----Target---Max
06/1/2000-------F102-------------Rugosity-------------3.5---------5---------7
06/1/2000-------F102-------------Diameter-------------5----------7---------10
06/1/2000-------F102-------------WL---------------------2----------5---------7
06/1/2000-------F103-------------WL---------------------2----------8---------10
07/1/2000------F102--------------Rugosity--------------3---------5---------7
3. Production record
Ticket_no----Product_ID: --------Production_date
..other production detail
10005---------F102------------------07/25/2000
10006---------F102------------------07/26/2000
10007---------F102------------------07/27/2000
4. Test result
Ticket_NO: Ticket number in production line
Product_ID: id that links to product table
TestDate: Testing date
XXXXX1 : Test value
.
XXXXXn: Test value
Eg.
Ticket No---------Product_ID ---------TestDate-----Rugosity---------Diameter---------WL
1005---------F102------------------08/1/2000---------5------------------7------------------5
1006---------F102------------------08/1/2000---------6------------------7------------------5.5
1007---------F102------------------08/2/2000---------5------------------7------------------5
1. How I can get specification value of the product. The specification has constraint that the effective date <= test date and it must be up to date specification.
2. How I can calculate min, avg, max value of ticket no 1005, 1006 and 1007
My designed report is
.
Product ID:
Product Name: Bead wire02
Production date: 07/25/2000 07/27/2000
Number of product = 3
------------------------------------Test result----------------------------Specification
ITEMS--------------Min---------Avg---------Max-------------Min---------Avg---------Max
Rugosity-------------5---------5.33---------6------------------3------------5-------------7
Diameter-----------7----------7------------7------------------ 5------------7------------10
WL-------------------5---------5.16---------5.5----------------2-----------5--------------7
.
I can code in VB to show on listview control but I cant do it in Crystal report.. what I can do
I would like to use parameter fields but it has a lot of fields (about 10-17 analysis in specification)
Crystal Report- Suppression Formula
i have a Crystal report which supresses the page footer section based on some condtion.I want to include a condition to supress the PF if its the Last Page.The problem is the Page numbers are reset based on group and hence i cannot use TotalPageCount to achieve this.I calculated the total number of pages manually but not able to use "Maximum" function on this formula filed.
i cannot use ON LAST RECORD) because the data based on LAst record prints on more than one page , hence if used supresses last few pages matching the LAST Record rather than supressing only the Last page
Please anyone help , its very urgent
Formula Editor In Crystal Report
How do I set the format in my formulas link editor
My field is numeric. In my formula editor I want to set the field value to string within a format.
for eg
the field value is 6
I want to set formula value to :
Tablename.fieldname = format(tableName.FiledName,"000")
I get an error here
Selection Formula In Crystal Report
Hello!
I created a parameter in CR that takes a list of values and limits selection to them, e.g.,
{fieldvalue} in {?parameter}
So, this works if I passed in (A0111,B0121) as the parameter. If the field value is any of those two, it gets listed in the report.
The problem I have is that if I pass in (A011, B012), then CR treats that as (A011*, B012*), e.g., anything that starts with A011 is pulled in. I only want, to give an example, A011 only.
What other way can I approach this to avoid the problem? Thank you for your help.
-Bahman
How To Use Formula Functions In Crystal Report ??
Dear Friends,
I'm very much new to crystal Reports.So I dont know how to generate a report from more then one table. To generate a report i just use the formula field. But i dont know how to use the functions & formulas given in that formula field.So anybody can u you help to generate a reort.
This is my doubt
I have 3 tables like SalaryMst,SalaryTrn & Employee
1)In this salarymst have the fields like EmpCode,Basic & Mode of pay.Mode of payment either Cash or bank.
2)SalaryTrn has the filelds like EmpCode,Gross,Net & Month &year.
3)Employee as usual it has EmpCode & other Employee Details
Now i want to generate a consolidated salary report.For that i want to calculate how much amount go for the cash & bank & also i want to calculate the total of cash & bank
i dont know how to use the formula fields ..
help required....
pls help me.....
Selection Formula In Crystal Report
Hi everybody,
Im using crystal 4.6 basically i want to select records using the selectionformula property of crystal control
something like.
cr.selectionformula=expr1 AND expr2 And expr3
i searched a lot but found that one expression is used for selection like
cr.selectionformula=expr1
i need to select records based on multiple conditions
Any help is welcome
Thanks
Kapil
Crystal Report Formula: Length
Hi.
I am a novice virtual basic programmer. Right now, I am doing a formula for crystral reports. I'm using it to print names and lastnames from a recordset from my database. However, I have a problem. Currently, for the last name, I use the formula
Code:UpperCase ({report_definition.Lastname})
Some people in my database has about 19 letters in her last name. I need to write something similar to
Code:
If Len(Text16) >= 12 Then
Printer.Font.Size = 10
End If
If Len(Text16) >= 16 Then
Printer.Font.Size = 8
End If
If Len(Text16) >= 19 Then
Printer.Font.Size = 7
End If
Could someone translate it to a crystal formula for me?
Also, I need to insert a constant that I can put in the crystal report; eg. expires. Right now, I'm using ttx as my database for my crystal report. How can I let vb pass on the information (expiry date) to add to my crystal report?
I'm using this to transfer my whole database into the crystal report.
Code:
crystalReport.Database.SetDataSource stuDents
Thanks in advanced!
Passing Crystal Report Formula By Using Vb
had anyone has got idea how to passthrough the formual fields in crystalreport by using vb forms..
what i mean is
I want to carry the some values (forumla) from cr1 to put in cr2 report to make calculations with some value fields in cr2 and calculate the accumulated fields by using vb...
thanks
Crystal Report Selection Formula Problem
I want to pass the selection formula from the vb application which is using a crystal report control. I am using crystal report 8.5. now i have a list of 3000 items from which i am allowing the users to select the items he want. whatever items he is selecting is passed as the selection formula
"{inventoryreceiptdetail.itemid} in [" & SelectedItems & "]"
(where selectedItems contains comma seperated item codes)
The thing works fine when i select few items, but as soon as i select somewhere around 1000 codes (each code is of 10 digit) it gives me error 20515.
I tried putting that selection formula directly into crystal reports. it said, "too many items have been given to this array" . When i reduce the items, it works fine.
Can you help how to get the result even with large number of items
Crystal Report Selection Formula (Urgent)
Hi Friends,
I am using crystal report to get the list of students registered between two dates. I am using vb6 as front end I've written following code to display report:
VB Code:
With crStudList .Connect = strConn .ReportFileName = App.Path & "
eportsStudentList.rpt" .ReportTitle = "Student List" .WindowTitle = "Student List" .SelectionFormula = "{tblStudent.RegistrationDate}>=#" & dtpFrom.Value & "# and {tblStudent.RegistrationDate}<=#" & dtpTo.Value & "#" .WindowState = crptMaximized .Destination = crptToWindow .Action = 1 End With
Where DtpFrom and and dtpTo are DtpPicker control which are used to select start and end date value. I've set its format to customFormat and Custom format i've set is "dd/MM/yyyy"
Its not giving any errors but if i give 01/02/2006 as start date and 28/02/2006 as end date, it should display only students' who have register in between these two dates but it displays all who registered in 02/01/2006 or 20/01/2006 or 08/01/2006.
plz help.
thx a lot
Crystal Report - Subreports Selection Formula
please help me
i need to change All the subreport selection formula , same as the main report. I Try this code but doesn't works.
'sel is string which the selection formula
Cr.SubreportToChange = ""
Cr.SelectionFormula = Sel
iSub = Cr.GetNSubreports
If iSub > 0 Then
For iCtr = 0 To iSub - 1
StrSub = Cr.GetNthSubreportName(iCtr)
Cr.SubreportToChange = StrSub
Cr.SelectionFormula = Sel
Next iCtr
End If
that code is working only if there is only one table in a main or subreport. that doesn't work in more table !
please help me , how to do this ?
thanks very much
[UNRESOLVED]Crystal Report -- Formula Error
@ Details section i used Supressed (No Drill Down) with the ff statements:
If {?ReportType} = "1" Then
{@Balance} <= 0 //All -Balance will be shown
else
If {?ReportType} = "2" Then
{@Balance} >= 0 //All +Balance will be shown
else
If {?ReportType} = "3" Then
{@Balance} <> 0 // 0 Balance will be shown
Now my problem lies at the Report Footer, I want to sum up the values as per condition above.
I used sum() and it ignores the condition and sums all positive and negative giving me wrong grand total. Any advice on how to sum it up according to the report type i selected?
Edited by - pasaway on 5/11/2006 1:29:49 AM
Change Selection Formula Of Crystal Report
Hi There,
I wanna change the slection formula for selecting records of a report (created using Crystal Reports 7) from within the vb code. I'm Able to change the formula when i'm using a string field for condition.
When I Use
crx.replaceselectionformula "{T01.F1}='AGL'"
everything works fine and i get the preview window of crystal reports.
But when I Use
crx.replaceselectionformula "{T01.F0}=date(2004,11,18)"
No records are listed whereas i'm having 10 records with F0 as 11/18/2004
Here
crx - Crystal Reports ActiveX Control Object
T01 - Data table
T01.F0- F0 field of T01 (Data Type : Date/Time)
T01.F1- F1 field of T01 (Data Type : String/varchar(10))
Is the code i'm using correct. If not please tell me how to select records with the given date for T01.F0 Field
Month Matching At Crystal Report Formula
Hi,
I want to use the formula with the crystal report.
I am using
CrysRpt1.SelectionFormula = "{format(paid_sal.Paid_date,""mm/yyyy"")}>= '" & Format(dtpfrom, "mm/yyyy") & "'"
This is giving errors of unknown field. How can I pass the SQL query with the month-year matching?
Regards
Date In Selection Formula Of Crystal Report
Hello,
I m setting the range of Dates in Selection formula of Crystal Report which is adjusted in VB. Code is like this :
Qry="{GateIn.InDate} >= '" & Format(DTPFrom, "mm-dd-YYYY") & "' " _
& "And {GateIn.InDate} <= '" & Format(DTPTo, "mm-dd-YYYY") & "' "
CryRep.ReplaceSelectionFormula Qry
Its not working properly. How can be its possible ?
Thanks
Crystal Report ,how To Discard A Selection Formula?
When i pass a selection formula from form to report it works as where clause , but if i want to undo the changes made by selection formula i.e. i want the original report without the effect of selection formula how to do it?
Thnaks to all u wonderful people in advance.
How To Set Crystal Report Formula Through Window Based Vb.net Application
Development Environment: VB.Net, Crystal Report8.0, SQL Server
I want to know how to pass a value in the formula field of crystal report while working with window based application in vb.net.
syntax: AxCrystalReport1.set_formulas(index as short,px as string)
How to define px?
Thanks & Regards,
Yachna
Accessing Main Report Field From Sub Report In Crystal Report 8.5
Hi there,
is it possible to access a field that is in a main report from the subreport. The sub report and main report uses different Sql
statment. How could i achive this.
The reason i need this is because, i would like a value to appear
in a fieldA in the subreport, if the value in fildmain in main repoert is equals to 10.
any suggestions....
Thank You...
regards ....
How To Use Record Selection Formula With Visual Basic 6.0 And Crystal Report 11.0
Hello Crystal Report 11.0 experts users,
I am first time trying to use CR11.0 with vb6.0. Previously I was using
CR8.5 and find no problems. Now, I am trying to use new VERSION OF
CR11.0 with VB6.0 and am strucked here.
I am using below code
Dim Report As New CRAXDDRT.Application
Dim RepApp As New CRAXDDRT.Report
CRViewer1.ReportSource = Report.OpenReport(NPath & "Service
Dash11.rpt")
RepApp.RecordSelectionFormula = "{DashBoard.Year}
06"
It gives me error message saying "Basic syntax is not supported in group
or record selection formula".
I have tried all possibilities and even searched in sites but not
finding any clue in this regard.
Kindly assit me in this regard.
Regards
arun
Error On Selection Formula To Display Data On Crystal Report From SQL Database
I have a problem on selection formula to display data from SQL database on crystal report it produce an error like this:
error A number, currency amount, date, time, date-time or string is expected here
Code:
Dim Ap As New Application
Dim Rep As Report
Private Sub CRV_Click()
End Sub
Private Sub Form_Load()
Dim RepFileName
RepFileName = App.Path & "LeaveForm2.rpt"
Set Rep = Ap.OpenReport(RepFileName)
Rep.RecordSelectionFormula = "{tblLeaveApp.EmpNo}=" & ndEmpNo ->error is here
Rep.DiscardSavedData
CRV.ReportSource = Rep
CRV.ViewReport
CRV.Zoom 100
'frmcrs.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form6.Show
End Sub
anyone can help me....
|