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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
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
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 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
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
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 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....
Crystal Report With Subreports
I already asked for help with this problem, but no solution yet. Maybe this way I'll get some advice. I attached ZIP file with a very simple VB6 project which uses CrystalViewer (Crystal Reports 9) to display report wit 2 subreports. Everything is based on TTX files.
ZIP contains Access 2000 database, VB project, Crystal Report and TTX files.
I have no problem to display report. The problem occurs when I close the form with CrystalViewer control on it. VB crashes at this point. Compiled application crashes at this point too.
If I have only 1 subreport then no problem, with 2 or more I have a crash all the time. I tried to base the report and subreports on SQL Server 2000 stored procedures (Original project works with SQL Server. Access database was used for this sample to make everything simpler). I'm getting the same problem. If I use XML files (I save data from recordsets into XML files first and then I use those XMLs as datasources for the report and subreports) then everything is working without any problem. I have a big number of reports without subreports based on TTX files and would not want to have another group based on XML (this approach requires .NET framework to be installed on the user machine)
I'm asking to try my code to see if it produces the same problem on your
machines. And if yes, maybe somebody will tell me what am I doing wrong.
Thank you
Vlad
More Than 1 Subreports In Crystal Report
I'm trying to run Crystal report containing 2 subreports from VB6 application.
If report itself and all subreports are based on SQL Server SPs then it's slow. I was suggested to pass ADO recordsets as datasources at run time. This scenario increased the speed dramatically. But there is a problem when the form with Crystalviewer is closing. The application just crashes without any messages.
Just for testing purposes I tried to use the simplest sets of data (2-3 fields without any joins) for all recordsets. Even in this case the application crashes.
Everything is fine when there is only 1 subreport. If 2 or more then there is a crash.
Is there anybody who successfully uses Crystal report with more than 1 subreport? I'm asking only about reports which get there data from recordsets.
I successfully created a report with several subreports but they are based on XML files.
I need by some reason to base them on recordsets. They are created on TTX files and during run time ADO recordsets are passed.
Vlad
How To Call A Crystal Report With Cross Tabs /subreports From Vb
Hello,
I am looking for a way of calling a crystal report with
crosstabs/subreports.
I was able to call a simple crystal report using crystal report control..
but whenever I add a crosstab to the report, there is a run time error of
20998.
vb6 and crystal report 7.
Thanks,
Tania.
Crystal Reports Selection Formula HELP
Hi
Please bare with me as i'm new to Crystal
I intend to open a report (CR8) from a VB6 application. I have a database (Access) that holds the info I want but I only want to show records that are >= the date I enter into a text box.
Just to start with I have this as my selectionformula in Crystal which does not return any faults and if i change the date between the hash's then the report changes accordingly (from within Crystal)
DateValue ({Outgoing.Date}) >= #01/08/04#
I have deleted this formula in Crystal and am now entering it at the cr1.selectionformula property in my VB code but it does not seem to like it when i open the report telling me 'You need a number or string etc here'.
Ideally i want the hashed date to be a string in VB that i enter into text box but I though I Better try to crawl before walking.
Many Thanks
Shamus
Selection Formula In Crystal Reports
With crptCreditorsList
.ReportFileName = App.Path & "
eportscreditorslist.rpt"
.PrinterCopies = intCopies
.SelectionFormula = " {Creditors.accountnumber} BETWEEN '" &
strFirst & "' AND '" & strLast & "' "
.Action = 1
End With
WHy doesn't this Selection Formula work?Please help....
Crystal Reports Selection Formula, SQL
How do I construct a SelectionFormula that uses a date in VB? I am using SQL Server 6.5.
My VB6 code looks like this:
Private Sub cmdPrint_Click()
Dim rptSql As String
Dim rptDate As Date
rptSql = "SELECT * FROM CheckRegister WHERE {CheckRegister.bank_statement_date}=Date('"
rptSql = rptSql & cboStatementDate.Text + "')"
CrystalReport1.SelectionFormula = rptSql
CrystalReport1.Action = 1
End Sub
I have tried many variations on this formula, such as using the string variable alone, in quotes, and using a date variable instead of a string variable, but nothing seems to work. I keep getting the error message "The remaining text does not appear to be part of the formula".
Does the date have to converted to a different format?
If any one has a solution, I would greatly appreciate it.
Selection Formula To Subreport: Crystal Reports
I've never used the subreport feature of Crystal report and do not know how to call up a report that has them from VB. I have a report with 3 subreports. I need to have the reports only display values for a specific date. How do I pass the selection formulas to the subreports? Is it just the normal way? I use this to select the records of the primary report, but the subreports are showing all dates....
Code:
With CrysReport
.ReportFileName = App.Path & ReportName
.DataFiles(0) = App.Path & "DB.mdb"
.SelectionFormula = Selection 'defined my selection formula elsewhere
.DiscardSavedData = True
.WindowState = crptMaximized
.Destination = crptToWindow
.Action = 1
End With
Selection Formula Problem Crystal Reports
Hi there
I want to pass a parameter from vb6 that whould return like in this example cust 1 and cust 2. How do I do this? Because the selection formula does not seem to work
CR1.ReportFileName = gsReportPath & "ActiveCust.rpt"
CR1.SelectionFormula = "{Customer.Id} in ('1' ,'2')"
CR1.PrintReport
CR REport - Group Selection Formula
I would like to create a group selection formula...
Can anyone give me a sample code formula to what goes into a Group selection formula, the CR help tells you the steps to create one but do not give you an actual sample of the formula.
Set Selection Formula For Subreport In Crystal Reports Using Visual Basic 6.0
Hello Experts,
I have designed a report using crystal reports 8.0.
There are subreports also included.front end is visual basic 6.0
I change the selection formula of the main report using
crystalreport.selectionformula. I am not knowing how to
set the selection formulae for the sub reports.
can any one help me .
Crystal Report Crosstab Report Criteria Selection Using Access 2000
Hi there
I there anyone with an idea on how i can filter crosstab Report done in Crystal Report 8.5.. I'm trying to get data btw two dates for instance 05/01/04 and 05/31/04 but the following code doesn't do that. I'm using access 2000 database. Pls assist.
fMainForm.CrystalReport1.ReportSource = crptReport
fMainForm.CrystalReport1.ReportFileName = "F:OutGrowerReportsGLdelivered.rpt"
fMainForm.CrystalReport1.SelectionFormula = "Wdate" >= " & {CrossTabData.WDate} =" & "'" & CDate(DTPicker2.Value) & " AND Wdate" <= " & {CrossTabData.WDate}=" & "'" & CDate(DTPicker2.Value) & "'"
fMainForm.CrystalReport1.WindowState = crptMaximized
fMainForm.CrystalReport1.PrintReport
fMainForm.CrystalReport1.PageZoom (100)
or is there another better way to do this.
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
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)
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
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
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
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.....
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 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
[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
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
|