Formatting Date Field In Crystal Reports
I am using SQL Server as my database and I have a date/time field in the database. I am using a command object to pull information from the SQL Server database and displaying it in report form using Crystal Reports 8. My problem is that I only want the date displayed in the date field in Crystal Reports. I do not know how to format the incoming date/time to just display the date. Any help will be greatly appreciated.
Thanks, jen_tech
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Field Formatting In Crystal Reports
I have a field in a table (used in my report) that is "010422". It is a date.. but saved as a string. How do I convert this to look like: "01/04/22" on my report.
Same with time .. I have 140232.. and i want it to look like 14:02:32.
sa
Crystal Reports Date/Field
I am currently using a Crystal Report (8.0) which has ADO connection to MS Access 97 database.
I have a Date/Time field (Short format) in my database which contains the date/time 1/23/03 10:43:45 AM. For some reason the Crystal report shows this as being PM not AM.
Is it because I am using a short date? Anyone...
Date Field - Crystal Reports
I have a report in Crystal Reports which works fine, except in a PC. In that machine the report prints well, except the date fields that appeared in an empty way. I've worked with Regional Settings, fonts, pass the date to string, but the report doesn't work.
Have you experienced something similar? Have you any suggestion I could follow in order to solve the problem?
Thanks in advance!
Crystal Reports Reportobject Check For Date Field
Hi All,
Going out of my friggin mind trying to work this bloody thing out. Appreciate any help. I've searched everywhere but suspect I probably don't know the right keywords because this is so easy and I shouldn't be finding it so hard.
Using win xp, sp2, vb 6, crystal 10
referencing craxdrt
All I am trying to do is check to see if the stupid report object in my report is a date field. How hard can it be?
My code so far:
Declarations
CODE Dim CRXSections As CRAXDRT.Sections
Dim CRXSection As CRAXDRT.Section
Dim CRXReportObjects As CRAXDRT.ReportObjects
Dim CRXReportObject As Object
Crystal Reports RDC CrossTab Formatting
Dear All,
We use Crystal Reports Report Designer Components for reports in VB6. Weare unable to format the crosstab columns. Truncation of valuesencounters say if the values in amounts is 10 chars the last 1 or 2chars not printed. Anybody faced this problem? What is the workaround?
The crosstab in rpt worksfine with all formatting option. Anysuggestions/solutions please...
Thanks & Regards
Balakumar
Can I Control Formatting With Crystal Reports?
I am producing very complex reports from a VB application, but I am considering using Crystal Reports if that would save me some coding. Right now I control MS Word to produce 2-column pages with a lot of tables. I run a number of complex select statements to get information and then I cram a large number of tables on one or two pages. I have to construct Word documents from scratch with my program
Is Crystal Reports better?
Can I use a WYSIWYG-like screen to lay out a skeleton report and then connect the tables to a database? Some of my table cells involve variable formatting based on the value of the information. Each table row needs to be augmented with extra rows if the original row has certain flags set.
One of my problems with Word is that it automatically breaks a table across two columns if the table fits partially in a column. The problem is fixable with extra VB code, but I'm wondering if Crystal Reports is configurable to keep tables in one piece.
I have some tables of varying size that can be rearranged so that they fit better on a page and not leave so much white space. Can Crystal Reports automatically position tables to fill a page?
The Field Is Not Known With Crystal Reports 10
I have integrated a crystal report (v10) vs visual basic.
My report has one subreport... I have linked this one with the report main. The first time I execute the report is ok. All information attached is displayed sucessfully. However, if I execute it again with the same or different data (filter with combo boxes) crystal reports shows me the next error: 'The field is not known' associated with CRViewer1.ViewReport method
Do you have any idea about this error?
Any suggestion will be appreciated.
Thanks
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
Hide Field With Crystal Reports
How do I do if I want to hide a specific field in a report.
I'm going to use my own parameterized queries so I will be able to send boolean values to the report from the application during run-time.
The problem is how to design the report.
Do I have to group that specific field to able to hide it in the report?
Crystal Reports, Hide A Field
Hi, How can I hide a field in crystal reports 8.0 to print it only in the last page of the report, is there a way to do it without using sections?
Thanks
Long Field In Crystal Reports
I have a string selected from a database table, and it can get really long.
Is there any way to automatically wrap the string once it exceeds certain length?
Can anybody help?
Crystal Reports - Null Field
Im using the crystal reports wizard to connect to an access database. Currently the report is returing everything in my access table.
I only want it to return items with a NULL value in my field called "DATE".
Therefore IF my field called "date" has a NULL value then i want to see these records.
Does anyone know how to do this within the crystal report wizard??
Using The Parameter Field In Crystal Reports
I know how to use the parameter function in Crystal but how do I place the parameters entered on the report. I've tried pulling the parameter expression on the report but when the report is run and parameters are entered the field on the report is blank.
Max Field Size In Crystal Reports
does Crystal Reports impose a maximum field size? I have a Comments field that holds 500 chars but the report only shows 256 characters.
help.
thanks in advance.
Setting Field Value In Crystal Reports
Hi,
I am using a crystal repirt designer (crystal 8) in VB6 - the ICRDesigner. I have placed fields in the Details section of the report designer (a part of the VB application) but I want to assign values to these fields at runtime. Does anyone know the syntax for this. I have used
CrystalReport1.Field1.Value = rsScotiaParameter!LetterDate
but I get an error ...
please help.
OLE Object Field To Crystal Reports
Hello,
I have the Image(OLE Object field ) sitting in access 97 table, and I am using crystal reports to print out the Image.
I am linking the crystal reports to the table by the normal way(normal text field way) and it doesn't seem to work. Beacuse of OLE Object field, I wonder if there is special way to deal with it.
Thank you very much.
Crystal Reports Field Suppression
Hi all - in my report, the details section can show up to 8 fields. The fields are aligned atop each other, like so:
field1
field2
field3
field4
field5
field6
field7
field8
I suppress the fields if they are null. The problem is that the report appears very disorganized and has too much white space. I need to be able to modify the positions of the fields so that they appear consecutively. Example: if fields 2 and 5 are suppressed, I want the report's details section to show like this:
field1
field3
field4
field6
field7
field8
but instead it comes out like this:
field1
field3
field4
field6
field7
field8
and the spaces make it look horrible! How to fix this?
Autoincrement Field In Crystal Reports
i want a auto increment filed in crystal report
for ex in innoice
the format
no product
1 dwe
2 dww
the values for no filed are auto generated and for each invoice it should start from 1
Crystal Reports-field Object-
i hope to modify a file (*.rpt)-crystal reports V8.5-,I can change the textObject and the fieldobject , but if this textobject contain a fieldobject i can't read this field???
ex:
la date [?du] a [?au]->text object contain fields
then program return:la date[] a []
and i can't read {?du} {?au}!!!
Crystal Reports-Multiple Values For One Field
I have a VB6 program that contains a form that allows the user to select 3 different criteria. These criteria in turn are used by the program to pass an sql statement to the crystal report 7 object within the vb program.
The problem I am having is that I need to pull data from two different tables within the same Access database. The first table is the main table with information on machines (i.e. IPAddress, name, location, repairtime etc). The second table is linked via a generic ID number field, and contains the names of the maintenance personnel who repaired the machine. In some cases, there are several people working on one machine. I am currently using the sql statements to pull information from an Access query that combines the two tables. The problem is that if there is more than one maintenance person who repaired the machine, the query will list that record several times.
Any suggestions on how to get around this? I want all of the names to show on the report for any given ID number.
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
Word Wrap On Field In Vb Crystal Reports 8.5
Hi,
I'm very new to vb crystal reports 8.5 and have to generate a mailing label report where in I need to word wrap on the fields as it is creating spaces if either the database field is null and does not word wrap.
Also give some links to learn and explore vb crstal reports 8.5
Thanks a million....in advance
Using A Parameter Field In Crystal Reports - Very Easy One
I am new to Crystal Reports. I need to filter a query
with a where clause. I guess I need to insert a
parameter field here. I've tried but failed a couple
of times to get that thing to use. Can someone here
walk me through the process of successfully creating
and using a parameter field in Crystal Reports. To
make it easier, let me imagine a situation where I
have a table called [My Friends] and I need to
retrieve all the friends of mine who stay in Delhi. So
I need a query something like:
select * from [My Friends] where [City] = 'Delhi'
Now I create a simple report using the Report Expert
where I select one table [My Friends] and all the
fields and I have the report in front of me, showing
all my friends and their addresses, wherever they
live. Now, I need to place this filter. Please take it
from here.
Sathyaish Chakravarthy
Find Field Parameters In Crystal Reports Using VB
I have a query that returns 800 reports and I want to find the fields associated with each of those reports. How should I go about coding this into vb?
Set return = store.query("SELECT SI_NAME, SI_ID, SI_FILEs, SI_PROGID FROM CI_InfoObjects WHERE (SI_PROGID = 'crystalenterprise.report')")
if return.count > 0 then
For each item in return
objexcel.cells(i, 1).value = item.id
objexcel.cells(i, 2).value = item.title
I have returned the ID and Title, so now how do i get every field? Please Help!
Extension Of Details Field In Crystal Reports
hai hai hai every one
hope u all r fine
im back here to eat ur heads
ok im asking a solution from u all as
how to extend the details section of crystal reports? the problem does not ends here as i want to place a footer message in the footer section of reports. so now my problem is that footer runs for all the pages. but i wanted it ti be displayed for only the last page if the report is more then a single page.
hope u can help me
thanks
nithi
with regards Nithi
There are no such things as applied sciences, only applications of science.
- Louis Pasteur
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
How To Creating Hyperlink In Crystal Reports On A Field
Hi everybody,
I have a problem regarding crystal report i have to tables tblMailInfo and tblAttachments.
I have designed a main report selecting fields from tblMailInfo, the problem is that i want to create a hyperlink
on the MailID field so that when i click this field a new report opens displaying the attachements for that MailID from tblAttachments
Please help me in this problem with code if any one have.
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!
URGENT: Crystal Reports And BLOB Field.
Hi guys,
its little urgent!
i wish to embedd a blob field which stores a picture in my crystal report in detail-tab. somehow its not been displayed... kindly help me for this problem.
well, all i have done is ... set up the connection for the report, and put the picture field on the report in detail tab.
plz helpppppppppppppppppppppppp
butterfly.
Daring ideas are like chessmen moved forward. They may be beaten, but they may start a winning game.
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?
Replace Database Field In Crystal Reports
I've linked the crystal report to a database, now i need some help in manipulating the database field. For example,the field consists of "P" (stands for PASS) or "F" (stands for fail) but i want to display PASS / FAIL instead of P/F ...can someone help me on this? do i need to use a formula or something? i'm very very new to crystal reports... Thankx
emails will be welcomed. pls email to this address zijing@singnet.com.sg
Hide/Suppress A Field/column In Crystal Reports
Hi,
I'm working on an application that displays a report.
Code:
Dim Report As New CrystalReport
Option Explicit
Private Sub Form_Load()
Dim CRXReport As CRAXDRT.Report
Dim crxApp As CRAXDRT.Application
Screen.MousePointer = vbHourglass
Set crxApp = New CRAXDRT.Application
Set CRXReport = crxApp.OpenReport("C:Program FilesBusiness ObjectsCrystal Reports 11SamplesenReportsTCPOSArticleSales.rpt", 1)
CRViewer1.ReportSource = CRXReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
The report I'm showing has 7 columns, the 7th I'd like to show/hide depending on the users choice.
I've looked through the help files, and on this site, but can't find an example or answer.
Is there a way through code to do this?
Regards
Crystal Reports Table Linking Via Field Data
I have a problem handed from what I believe is a poorly designed database and having to produce a crystal report from it.
The story unfolds....
The database is in MySQL, there are a number of tables and some of these have fields with references linking to primary keys in other tables (all good and well). Except...
Some of the tables have memo/ntext fields with the primary key references in csv format. i.e.
table: mytable has a primary key of mytableref and has some records
another table: othertable has its own primary key and a mytableref MEMO/NTEXT field with values such as "1,2,3" -field data.
Not too bad as the information is built up into VB SQL string statements using the "IN" command to get the information from tables, however I have argued to the DB designer that - it should not have been this way and that the csv values should be in a table on its own so we can still use his "IN" statements in SQL but can visually link the tables via Crystal Reports. Crystal Reports XI in particular does not show memo fields in the table linking expert. Plus, because it is not proper relational, he is making a rod for his own back when coming to manage the data. i.e. he would have to write lots of lovely VB code to do INSTR and REPLACE when it comes to remove the primary record.
Now, I think that is a poor design. What do you think? (So I can pass it onto him) ?
I know its not very good and that it will suffer performance issues (he has to do LIKE '% statements to check for matches on some of his code. sigh.
but i would like to know what you think and perhaps I am totally wrong and you CAN do field-data linking with Crystal Reports via the front-end designer (it works via SQL code being passed to CR, but you cannot visually link the data for grouping). Phew. Thanks for spending half the day reading my thread
How To Split One Field In 2 Columns Group In Crystal Reports ?[Need Help]
hi,
i need help in crystal reports 9 .i want the following task to do in cr9.
i have one field in table which is named as allowance status which contains only 2 values , 'Addition' and 'Deduction' in it.Allowance name field depends on status field. All i want is to show this field's values grouped in horizontal position like following:
Additions Deductions
EPF Salary Advance
... ....
means Addition allowance on the left side and deduction allowance on the right only on one field.
Can any one help me in this regard ?
Thanx in Advance
Crystal Reports : Total Of A Field In Multiple Columns
Hi
I have created one report with multiple columns (Right click on Details section -> Select 'Format Section' from popup menu -> Check mark the field 'Format with Multiple Columns').
'Weight' field is in both columns. Now i want the total of Weight in each column on every page.
Please help me with this issue
Crystal Report Date Field
Hello,
I'm using Crystal Reports 9 through VB w/ an Access97 DB. I'm using the TTX field definitions through ADO and passing the report a recordset. All my fields show up except date fields. I've tried all the possible formats for dates, but nothing seems to work. Anyone have a clue as to how to define these?
Thank You!!
Crystal Reports - How To Display Text Block Stored In Blob Field.
I'm trying to display text stored in a MySQL database blob field in a crystal report. It won't display the text because crystal reports interprets the field as a picture type. So if the blob field has a graphic stored in it, then it displays just fine. The only way I can get a large block of text to display is to store it in a longtext field. The problem with this is that I want to just have one column in my table that will either store a large block of text or an image. I know MySQL allows me to do this, but crystal reports doesn't seem to know how to handle it when it comes time to display it. Does anyone know a way around this problem without creating 2 separate columns in the table?
Sort By DATE Using Crystal Reports
OS = Windows XP SP2; Visual Basic 6 - Enterprise Edition; Crystal Reports XI - Developers Edition
I am using VB 6 to create a front-end program that creates some data-sets and calls Crystal Reports to print the contents of the data sets. One of the datasets is called "InventoryHistory".
TableName: InventoryHistory
fields:
dbPartNumber
dbLocation
dbQtyOnHand
dbEnterDate
dbEnterTime
etc.
In the VB application, I am using the sql "Insert" statement to populate the InventoryHistory table.
Insert into InventoryHistory(dbPartNumber, dbLocation, dbQtyOnHand, dbEnterDate , dbEnterTime, etc...) values (....SQL & "'" & Format(Date, "MM/DD/yyyy") & "', "'" & Format(Time, "hhmmss") & "', " ...);
My problem is, The crystal report detail section must be sorted according to TIME within DATE. The TIME does not show on the report.
01/04/2008 (160825) Part#45 Location-Bin 10
01/04/2008 (125845) Part#82 Location-Bin 6
01/02/2008 (013022) Part#5 Location-Bin 123
12/31/2007 (182233) Part#34 Location-Bin 13
12/31/2007 (144532) Part#14 Location-Bin 23
12/31/2007 (051054) Part#8 Location-Bin 32
12/20/2007 (152933) Part#100 Location-Bin 1
In the example above, the time is shown within the "(...)" (160825) = 4PM, 8 minutes, 25 seconds; (125845) = 12 noon, 58 minutes, 45 seconds, etc.
How can I sort these so that the records appear in the correct order?
I tried "Record Sort Expert" on dbEnterDate (Desc), dbEnterTime (Desc). It didn't work. The 2007 dates printed first before the 2008.
Date Display In Crystal Reports
I havbe a report that needs to display fields from a database. While other fields display the date fields just show blank. Has any one a solution to this starnge beviour. I have check the date field actually has dates in the database for display
Date-selection With Crystal Reports In VB
I have a date in my database. I select a date on my form in VB and then I have to compare this date with the data on the crystal report.
sSelection = "{Planning.Medewerkernr} = " & CmboMedewerker.BoundText & " {Planning.datum} > " & Format(DPBegin, "dd-mm-yyyy")
WeekReport2.SelectionFormula = sSelection
WeekReport2.PrintReport
It just does nothing. But when I put it like this it worked:
sSelection = "{Planning.Medewerkernr} = " & CmboMedewerker.BoundText
WeekReport2.SelectionFormula = sSelection
WeekReport2.PrintReport
The report was shown and the selection worked. How do I work with the date as a selection with crystal reports and VB?
Really have to solve this 4 the weekend, that's why I also placed it in this forum. Please help!
Crystal Reports Date Report Help
This is killing me: I am sending this selection formula for a Crystal Report and I keep getting back "A Date/Time is required Here!" What the heck.. Here is the code I'm using:
Dim Report As New CrystalReport3
Dim strSelect As String
'Supply record selection based on dates
strSelect = "{ado.comDate} in #" & _
(frmMain.txtFromDate) & "# to #" & (frmMain.txtToDate)) & "#"
Report.RecordSelectionFormula = strSelect
'Where I set the from and to dates as in teh form load
txtFromDate = Format(#7/1/2001#, "Short Date")
txtToDate = Format(#7/17/2001#, "Short Date")
I thought it could maybe be the database but it seems to not be.
Suggestions, help for a new VB 6.0 and CR 8.5 user (even your favorite CR Help sites).
Crystal Reports - Create By Date
I need a way to pass a date parameter from a VB program to a crystal report objext so the crystal report will generate a report based on the month pased. For example:
The vb Program will pass a month parameter to the CR object then create a report of all transaction for that month.
help
|