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
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Replace Tables From Crystal Reports In Vb
Hey all,
I want to make a form that I can replace entire tables of information depending on an option chosen in vb.
So I have a form with a 2 paragraph writeup with certain fields (like Name) that need to be replaced depending on which student (from a list) is chosen in vb. After the writing, I need to have table(s) with bulleted information in them. THe tables displayed here are dependant on what is selected in vb.
So if table A and table C is selected (from a list of tables A, B, C, D, E, F), it would display those tables at the bottom of the form.
Is this possible. I know my explanation is kinda confusing, so if you have any questions, just ask. If someone can help or maybe direct me to a tutorial, that would be great. I have never used Crystal Reports before, so treat me like a 3 yr old monkey when explaining things.
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
Change The Database Location In Crystal Reports Sub Reports From VB During Runtime
I have several reports that were designed in Crystal Reports that have the DB location changed during runtime. When I move my database, or choose another copy of the DB that has a lot of records in it, my reports don't fire. I need to be able to Verify the database during runtime. I'm usiung VB6.0 and CrystalReports8.5 I've tried using Crystal's "Verify On Every Print" function, but I haven't had any luck. Here is the code I am using.
MyLocation = "C:mydatabase.mdb"
CRPE321.ReportFileName = "c:aptcom
eports eninfo.rpt"
CRPE321.DataFiles(0) = MyLocation
CRPE321.ParameterFields(0) = "ThisKey;" & Who.Text & ";true"
CRPE321.PrintReport
Also, does anyone know if changing the DataFiles location during runtime also effects the subreports. I don't think it does, but any input would be appreciative.
Change The Database Location In Crystal Reports Sub Reports From VB During Runtime
I've created a Report Viewer that displays Crystal Reports 8.5 reports. I have the DB location in Crystal Reports changed during runtime, but I can't get the location to change in the subreports at runtime as well. Also, by using my method of calling the reports, I can't get VB to pass any parameters to the Main report. Below is the code that I am using. I'm using VB 6.0 and CR 8.5
Dim MyNewKey
MyNewKey = Who.Text
' On Error GoTo KeepGoing
MyLocation = GetStringValue("HKEY_LOCAL_MACHINESoftwareAptCom", "AptCom DB Path")
strReportFile = "c:aptcom
eports eninfo.rpt"
Set CRReport = New CRAXDRT.Report
Set CrxApp = CreateObject("crystalruntime.application")
Set CRReport = CrxApp.OpenReport(strReportFile)
' Set CRReport.ParameterFields(0) = "ThisKey;" & MyNewKey & ";true"
' KeepGoing:
For Each dbTable In CRReport.Database.Tables
dbTable.SetLogOnInfo "", MyLocation, "", ""
dbTable.Location = MyLocation
dbTable.SetDataSource MyLocation
Next dbTable
CRReport.Database.Verify
CRReport.SQLQueryString = strSQL
frmReportViewer.Show
frmReportViewer.CRViewer1.ReportSource = CRReport
frmReportViewer.CRViewer1.ViewReport
Set CRReport = Nothing
Set CrxApp = Nothing
Set CRReport = Nothing
>>>>
I've tried using this method:
MyLocation = "C:mydatabase.mdb"
CRPE321.ReportFileName = "c:aptcom
eports eninfo.rpt"
CRPE321.DataFiles(0) = MyLocation
CRPE321.ParameterFields(0) = "ThisKey;" & Who.Text & ";true"
CRPE321.PrintReport
But, I can't get Crystal Reports to verify the database during runtime. The first way verifies the DB, but won't change the DB location of the subreports or pass parameters to the reports.
Any help would be appriciative.
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.
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...
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.
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!
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.
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
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- I Need Help Running Reports With A Shared Database.
I am trying to figure out how to use a shared database in crystal reports. I have it set up for my application were I use: App.Path +
"databaseWMdbase.mdb" But in crystal reports it makes you use a drive name. I am trying to use the UNC but when I run it on the computer without the physical database it tells me Database not found... is there a way to set the Location of the database in the form load like you do with ADO? Any help or Ideas would be great.
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?
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
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 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 - 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?
Crystal Reports Without A Database?
My program doesn't use a database.
I just want to create reports based on the information I have
in certain forms or files, and i want to put a picture on the report.
that picture should be loaded with loadpicture().
I cant find any kind of IDE in this version of Crystal. I just have some examples running on VB6.
if I double click a report it opens VB6 and crystal is inside, but
I cant create new reports, what happend with components?crystal presents 5 or 6 components and picture object is not present.
There is an image object, I put it on a section, but, I can't use it,
datareport1.image1 or simply image1.something is not working.
I included all the components in the project: crystal reports 8 runtime, crviewer...etc.
Does anyone have some example about it?
Thanks!
Juan.
Problem With Database Field In Crystal Report
Hello everybody,
i'm new at working with crystal report and i'm having som problems.
Problem is, that I can't select stored procedure as data source in Crystal report. I can select a table, but there's an error when I try to set a stored procedure as data source.
Thing is, that I have to make some changes on an existing report and when I try to verify database (I made some changes in stored procedure) I get this message: "Not supported. Details: Cannot obtain error message from server." I tried to make new connection with this stored procedure, but stil didn't work. I got the same error.
I also have to tell, that this procedure works fine, when I start it from VB, but in Crystal report it doesn't work, and that this procedure is a part of package in Oracle database.
Thank you for any suggestions.
Dado
Adding New Database Field In Crystal Report 8
how could I insert a new database field in crystal report 8?
This is my problem goes... I have an existing report which it needs to insert a new field(not in my existing database fields). my CR database is Field Definition(salesman.ttx) which I modified the file and inserted with a new field.
the problem is when I call the CR from my vb program, it doesnt display my additional field. but when I created another report it appeared. is that the way CR8 works?
please help me.
thanks in advance
Crystal Reports 9 Database Problem
Hello I created a Crystal Report from Access Database. And my application wored good. Now when im trying to run the report from another PC, it says that the path to Database is not valid, and is display the original datbase path.
how do i give the path of Access Database to Crystal Report in my code.
Crystal Reports: Database Error
I have installed an application on 18 machines and am having the following error on 2 of them. I am using vb6 as my front-end, Seagate Crystal for my reporting and storing the data in an MS Access Database.
When I try to run my crstal reports from either of those 2 machines I am getting the error:
SeaGate Crystal Reports: Database Error
Microsoft OLD DB Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data Source name not found and no default driver specified.
I then receive the message:
Server has not yet been opened.
I am confused as I am only experiencing this problem on 2 of the computers.
Any Help Appreciated.
|