how to use differenct backends
hi babu,
i created a crystal report based on Access Database through ADO connection. Can i use the same report for other backend databases like SQL server/Oracle without changing the report ?
Or is there anyway to change the connecting string property through VB code?
please help me
thanks
Can I enable/disable images on report ?
Hi Babu,
I have a report that displays a set of data. Here, one requirement is, when one field is say 'High', I have to display one red image. If it is 'Medium' I have to display 'Green' and so on. I am using Crystal reports 9.
Thanks in advance
Pooran
How to call Crystal Report in Web?
hi Babu,
Iam using below code get my report in browser but Iam getting the error.
Error No is :20614
Starting background processing failed.
one more method Iam using that is directly giving the link the report <a href=report1.rpt?user0=sa&password>Show Report</a>
If I give this user can view database server Used Id & Password,
how to avoid this.
Please help me,
Thanks in Advance
-------Code-------
Set oConn = Server.CreateObject("ADODB.Connection")
sconnection="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;pwd=test;Initial Catalog=TestDB;Data Source=MYSERVER"
oConn.Open(sconnection)
set session("oRs") = Server.CreateObject("ADODB.Recordset")
session("oRs").ActiveConnection = oConn
session("oRs").Open "SELECT [Comp_Name], [Address], [City] FROM Company"
reportname = "TestReport5.rpt"
' CREATE THE APPLICATION OBJECT
If Not IsObject (session("oApp")) Then
Set session("oApp") = Server.CreateObject("Crystal.CRPE.Application")
End If
Path = Request.ServerVariables("PATH_TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
If IsObject(session("oRpt")) then
Set session("oRpt") = nothing
End if
Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
set session("oRptOptions") = Session("oRpt").Options
session("oRptOptions").MorePrintEngineErrorMessages = 0
session("oRpt").DiscardSavedData
set Database = session("oRpt").Database
set Tables = Database.Tables
set Table1 = Tables.Item(1)
Table1.SetPrivateData 3, session("oRs")
On Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write err.Description & "<br>"
' Response.Write "An Error has occured on the server in attempting to access the data source"
Else
If IsObject(session("oPageEngine")) Then
set session("oPageEngine") = nothing
End If
set session("oPageEngine") = session("oRpt").PageEngine
End If
%>
<!-- #include file="SmartViewerActiveX.asp" -->
Problem using crystal reports 9
Hi
I am using crystal reports 9 in a program. The following line of code genates the error " Creation feature not enabled".
Set m_Report = m_Proj.NewReport
How can I workout this problem.
Thanks
name of the crystal report window
hello, i hope you can help me with this one.
how can i display the name of the report in the title bar?
thanks...
Passing recordset to Crystal report thru TTX file
Hello everybody
I am trying to pass a recordset to Crystal report using a TTX file. The recordset is created by executing Stored procedure. I created the TTX file from the recordset, using the Active Driver Function CreateFieldDefFile(). but when i run the code the report does not get populated with the records. I am SQL Server2000 as the database. What am I doing wrong here? Please advise.
Thanks in advance
Dim CrAppl As New CRPEAuto.Application
Dim CrRep As CRPEAuto.Report
Dim CrDB As CRPEAuto.Database
Dim CrTables As CRPEAuto.DatabaseTables
Dim CrTable As CRPEAuto.DatabaseTable
Private Sub UserForm_Activate()
Dim oRSRate As New ADODB.Recordset
Dim oCmd As New ADODB.Command
Dim oParam As New ADODB.Parameter
Dim oConn As New ADODB.Connection
Dim sStr As String
oConn.Open sConn
Set oCmd.ActiveConnection = oConn
oCmd.CommandText = "sp_get_total_qty_rate"
oCmd.CommandType = adCmdStoredProc
Set oParam = oCmd.CreateParameter("customerid", adChar, adParamInput, 15, "AI")
oCmd.Parameters.Append oParam
Set oParam = oCmd.CreateParameter("datefrom", adDate, adParamInput, , "2003/01/01")
oCmd.Parameters.Append oParam
Set oParam = oCmd.CreateParameter("dateto", adDate, adParamInput, , "2003/01/20")
oCmd.Parameters.Append oParam
'open the ADO recordset
oRSRate.Open oCmd, , adOpenDynamic, adLockBatchOptimistic
'open the report
Set CrRep = CrAppl.OpenReport("D:\Report1.rpt")
'set the database object to the reports database
Set CrDB = CrRep.Database
'set the databaseTables object
Set CrTables = CrDB.Tables
'set the databaseTable object to the first table in the report
Set CrTable = CrTables.Item(1)
'sets our ADO recordset as the data for the first table
CrTable.SetPrivateData 3, oRSRate
'Preview the report with the ADO recordset as the data
CrRep.Preview
oRSRate.Close
End Sub
CR 7.0- ADO- 'Unable to access first record!' error
Using CR 7.0.0.0, CRW32 7.0.1.192.
Trying to run a report that is based on ADO (driver pdsmon.dll).
If there are no records in the query set that is used by the report, I receive the error 'Unable to access first record!' followed by 'SQL Server error'. I searched and saw that some others had received this error, but I think their situations were different.
Anyway, this report is based on a query, not a stored proc. It is run against either SQL Server or MSAccess. Any ideas on how to get around this error; i.e. just display the report with no records.
1 Attachment(s)
Crystal Report information
Hello !
I know just a little bit about Crystal Report. I am a VB developper and I am lokking for a report engine. I know that Crystal Report is a good one but I have certain specification I want from a report engine.
I want a report engine having a lot of kind of pagination. For example, 2 pages by sheet... I will explain me...
If you want to print a book with 2 pages by sheet and recto-back, so on one sheet, I will have 4 pages (2 on recto, 2 on back). The problem is if I have document of 8 pages, I will need 2 sheet. I will show you with a picture (see below).
So, my question is: Do you know if Crystal Report can build that kind of report (with this pagination). If no, do you know another report engine that can do this.
Thank you very much ! :)
Patrick.
Email notification on success/fail scheduled reports for CE8.0
Hi all,
Does anyone know how to enable the CE8.0 to sent out email notification on the success or failure of a particular report that has been scheduled?
Our aim is to write a CSP that pass the parameters to the CE8.0 to enable this.
We hope to do this without having to upgrade to CE8.5. Has anybody done this? Please share with us. Many thanks.
best regards
Tony
How to write a csp/VB for CE8.0 to export to diff file format?
Hi everybody,
Another question on CE8.0.... Is there a place where sample code can be found for writing a CSP to export scheduled rpts to diff file formats??
Can I assume that the following is relevant...
cr.Destination
cr.PrintFileName
cr.PrintFileType
If so where can I find the syntax for using them? Many thanks.
best regards
Tony
How to schedule a rpt for a specific weekday repeatably?
Hi,
Does anyone know how to trigger the CE8.0 to ran repeatably for a particular weekday? e.g. rpt to be generated on every monday...
we interested to know the methods avaiable to a CSP for the above...
Thanks in advance.
regards
Tony.
crystal report - changing the sql query text
This is not a reply but a new thread directly to Shri K Babu.
Hi,
I am using VB6 and Crystal report for my application. While designing the report using report expert, I have used ADO with Jet 3.51 and for data I have an sql statement linking three tables from my Access database.
After designing the report, I am not able to modify the sql statement, if i want to add any more fields from the tables. When i try to modify the sql statement using verify command, i get an error message. As a result, if I want to modify my report adding some additional fields, I have to redo the entire design.
I am using CR8.
Can you help me where I am going wrong ???
thanx
Re: crystal report - changing the sql query text
Don't change the sql select fields in cr, instead of this you can create query at access database whatever you need select fields names.
Then use the query from your access database to cr as a table.
Quote:
Originally posted by jojys
This is not a reply but a new thread directly to Shri K Babu.
Hi,
I am using VB6 and Crystal report for my application. While designing the report using report expert, I have used ADO with Jet 3.51 and for data I have an sql statement linking three tables from my Access database.
After designing the report, I am not able to modify the sql statement, if i want to add any more fields from the tables. When i try to modify the sql statement using verify command, i get an error message. As a result, if I want to modify my report adding some additional fields, I have to redo the entire design.
I am using CR8.
Can you help me where I am going wrong ???
thanx
Recursive Scheduling of report on CE8.0 using CSP
Hi Babu,
I was wondering if you could advice how one would go about implementing a recursive scheduling of report on CE8.0 using CSP?
Basically our recursive report uses the same parameter and every time it runs recursively. We want the parameter to be relevant to the time run.
For example, report is scheduled to run on 29 apr 03 (Tue), and then again everyweek on the same day, granted it does run every tuesday, but the date of data to print is stuck at 29 apr 03.
How do we tell CE8.0 that when it runs a recusive report, it should get current date, week month or even year's data, so that every time it runs, relevant data is secured?
Thanks & best regards
Tony
Crystal Reports from an MFC application
I have been trying to use crystal reports from a MFC dialog box. But I donot find any documentation on how to do it.(in Visual C++ .NET).
Any help would be appreciated,
thanks,
CA_IB_MR
languages incompatibilities
Hi,
I 've a problem in printing report (file.rpt) from Crystal report 9 environment. I have Microsoft Windows 2000 installed in Italian Language, and Crystal report 9 installed in English Language.
When I print a report, the result is that numbers are correctly printed but characters are non correctly printed (strange combinations of symbols are printed).
If I use both Windows 2000 and Crystal Report 9 in English version, the printing works fine.
---------------------------------------------------------------------------
Another question.
What is the run time (dll) that have to be used with Crystal Report 9??
The applicatione that have to use the run time is a C++ application.
Thanks in Advance
"server has not been started" error
hi mr.Babu,
I just came to know about the forum on crystal report.
I have a problem with crystal report which I have posted a thread just now on the following link.
www.codeguru.com/forum/showthread.php?s=&threadid=243456
Can u answer me on this immediately. I am stuck on that and i need solution immediately.
my email id is
[email protected]
thanks in advance.
Ashish
through code also it is not working
Hi all,
In my previous thread i have mentioned that I tried to connect to oracle database through crystal report wizard but it is not working. Now i have tried through code and still it is not working.
here is the code that i have written in crystal report's initialize event
Quote:
Const ConString = "Provider=MSDAORA.1;User ID=gtsc;password=gtsc;Data Source=portal1;Persist Security Info=False"
Private Sub Report_Initialize()
Dim con As ADODB.Connection
Set con = New ADODB.Connection
con.ConnectionString = ConString
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
con.Open
rs.Open "Select * from emp", con, 3, 2, 1
Database.SetDataSource rs
End Sub
Please help me immediately. it is urgent. I am stuck on that.
thanks,
ashish
CR9 VB6 Database location
Hi People,
How can I set the database location at runtime from my vb app? When i was using an old version of Crystal report i was allowed to set "same as report".
Thanks in advance.
Ricardo
Can't use more than 3 tables in a report
OK..the problem is like that.I connect the crystal report to MYSQL using ODBC.
Everything work perfect when i am just using 1 or 2 tables in a report. I use left outer join to connect each table.
But the problem occur when i am using the data from 3 or more tables in a report.It always appear a message " Fail to open a row set" What wrong actually?
Thanks for help.
Cant select the data from database where field = ""
I am using ODBC to connect crystal report to MYSQL database. I am wondering why i cant select a data from a tables where a field in a table is equal to "" (That mean it was nothing in the field,but not null,just nothing).
I right click on 1 field at the table..then click select expert
-> click equal to "" , but when run the crystal report,nothing select? how can i fix this problem?
thanks for help.
problem with charting and graphing
helo ,
nice to hear that's a crystal report specialist would resolve my question .
ok , i'm facing a problem of displaying my daily sales value into graph, my clients which running his operation hours from afternoon 3 pm to morning 3 am .... so ... it's raise a serious problem to me of displaying the sales value , you know .. by default crystal report uses default time as daily (00:00:00 to 00:00:00) ... so all my value getting wrong !! ... it should be 03:00:00 to 03:00:00 correct ? so i had been mad about this .. hope you can give me a hand .. i'm grade of hearing reply from you . thanks you!
Placing background image in Detial section
Hi ,
I am using CR7.0 version and i want to place a jpeg picture as background image in detail section when all records are displayed simultaneuosly (one by one just like in Grid).When i am printing a single record it is coming correct what i need,but when i want to print all(nearly 10 ) records it is not getting what i need......
My printer is colour printer and it is HP Deskjet color printer and all my Cry Reps are printing in Black and White and when i am printing the same reports in Data Report it is printing Colour.....
I have a created database in MS Access XP and having some tables in that database.From CR7.0 i can't able to open the database and it is giving error like unrecongnised database..
Please help me because i need this Urgent !!!!!
Thanks !!!!!!