I have an image field in the database which stores text with its RTF.How can I show this column data in crystal report .Also I want to display it with its RTF.Please give me areply ,thanx
Printable View
I have an image field in the database which stores text with its RTF.How can I show this column data in crystal report .Also I want to display it with its RTF.Please give me areply ,thanx
Hi Babu advance thanks for UR help.
I am working on crystal reporter. I am basically a starter. My problem is
I want to create Crystal reports in VB with Access as a database.
I have to select certain fields from different database tables and display them in the report. Here the condition is I must select records of that pericular day(sys date basis). ie If I am creating a report today I have to select fields from the records I have added today.
And user will key in the date on which he wants the report from the keyboard(using textboxes).
Hope U understand my problem. If U need any other information pl let me know. As it is bit urgent, I await ur earliest reply.
Thank You very much for UR help
Cheers and Regards
Ram
Hi Babu,
I am new to crystal reports and want to get started on it. could you please suggest me how to gain access some good documentation on crystal reports.
Thanks & Regards,
bikash
Dear Babu
I have made a project for which i need to set page size of 7.5''x8''
with printer driver not supporting this size(note that my printer is DMP.) Is there any way to explicitly define the page size for output.
Regards
Shashi bhushan
I have crystal reports available which are desgined in CR7.0 & sql server for my client server application.
I was passing query and formula fields from my application throught vb's exe.
All reports are created using report designer & with ODBC DSN for inserting views into report. now i am
upgarding same to web application using ASP & IIS.
Which is the best method to show reports in asp??
Changing sqlquery at runtime means using session("oRpt").SQLQueryString or should i use recordset?
i am attaching code for SQLQuery
<%@ LANGUAGE="VBSCRIPT" %>
<%
reportname = "SimpleSQLQuery1.rpt"
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)
// code to be written to connet to SQL Server
NewSQLQueryString = "Select Product_Master.Product_Name from Product_Master"
session("oRpt").SQLQueryString = cstr(NewSQLQueryString)
On Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write Err.description
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
%>
Using above code i am getting following error ...
Error Type:
cpeaut32 (0x800A5077)
Cannot open SQL server.
How can i connect to SQL Server?? Should i use connectio open methos or logonServer & set logon info.?
i tried that also but getting same error. Should i take any special precaution while designing reports in
crystal designer??
I am using Crystal 7.0 , sqlserver 2000 (mix authorization ) & professional 2000 as my op. system.
Dear K. Babu!
Thak you for the answer and sorry for my late reply. Could you show me how to correctly close crystal report and tables using RDC methods? Thanks a lot.
Quote:
Originally posted by K.Babu
Close first crystal report after that close recordset and then close tables
example:
({[....]}) first open last close, second open second close, last open first close.
Try this sequence, that may slove your problem.
yours
K.Babu
Do you know what' s the syntax of GETLICENSESTATUS method of the APPLICATION object in RDC?
Mr Babu,
You are kind to help everyone! My question is simple, I have a variable that I would like to pass into a selection formula inside of Crystal Reports. On other words, I want to select only records in Crystal Reports 8.5 where the EntryID = gFindString.
gFindString is a value that is populated when a user selects a record using adodb.recordset.find.
Thanks in advance for the help!
Bob
Refer the SectionLineHeight property
Quote:
Originally posted by sthota
hai babu,
thank you very much for ur reply. but in my application user will select the number of lines per page. based on that i have to show report.
that is the problem. due to this, i cannot fix the report by increasing the page footer. so what should i do now?
thank u
sthota
Is it possible to password protect reports?
- If so, how do you run them from VB with the password?
- If not, how do you keep the integrity of the reports after they are distributed to users?
Any suggestions will be appreciated.
Thanks,
SB
i have parameter in my crystal report 8.5 and i want pass value from visual basic and without displaying parameter dialog
Thank you
create formula field in crystal report design mode
named as MYNAME
and one more for BASIC
in VB code write
cr.formulas(0) = "Myname = 'Babu'"
cr.formulas(1) = "Basic = 10000"
Quote:
Originally posted by fahedksa
i have parameter in my crystal report 8.5 and i want pass value from visual basic and without displaying parameter dialog
Thank you
Hi,
Following is a description of the problem I am facing:
I need to create a report based on two DB tables. For eg, if the 2 tables are called 'x' and 'y'. both 'x' and 'y' have one common field and 'x' to 'y' is a one to many relationship. For eg let the following be the structure of the two tables:
table x table y
column names column names
---------------- -------------------
a c
b e
c f
d
I need to generate a report in the following format
x.a x.b x.c count(y.c) x.d
---------------------------------------------------------
in the above report count(y.c) refers to the count of y.c for each x.c
I have tried the following code:
Form1.CrystalReport.SQLQuery =
"SELECT x.a, x.b, x.c, COUNT(y.c) AS Expr1, x.d FROM x , INNER JOIN y ON x.c = y.c GROUP BY x.a, x.b, x.c,x.d
Form1.CrystalReport.Destination = crptToWindow
Form1.CrystalReport.WindowState = crptMaximized
Form1.CrystalReport.Action = 0
normal execution of the query returns the right result set. but execution through crystal reports does not return the right result set.
your help would be appreciated.
Hi,
Instead of 'Sqlquery', you can directly use query table to crystal report design mode. Try this.
yours,
Babu
Quote:
Originally posted by bikashg
Hi,
Following is a description of the problem I am facing:
I need to create a report based on two DB tables. For eg, if the 2 tables are called 'x' and 'y'. both 'x' and 'y' have one common field and 'x' to 'y' is a one to many relationship. For eg let the following be the structure of the two tables:
table x table y
column names column names
---------------- -------------------
a c
b e
c f
d
I need to generate a report in the following format
x.a x.b x.c count(y.c) x.d
---------------------------------------------------------
in the above report count(y.c) refers to the count of y.c for each x.c
I have tried the following code:
Form1.CrystalReport.SQLQuery =
"SELECT x.a, x.b, x.c, COUNT(y.c) AS Expr1, x.d FROM x , INNER JOIN y ON x.c = y.c GROUP BY x.a, x.b, x.c,x.d
Form1.CrystalReport.Destination = crptToWindow
Form1.CrystalReport.WindowState = crptMaximized
Form1.CrystalReport.Action = 0
normal execution of the query returns the right result set. but execution through crystal reports does not return the right result set.
your help would be appreciated.
create formula field in crystal report design mode
named as MYNAME
and one more for BASIC
Pass Value to crystal report:
cr.formulas(0) = "Myname = 'Babu'"
cr.formulas(1) = "Basic = 10000"
filter condition:
crCand.SelectionFormula = "{mytable.EntryID} = 'abc'"
crCand.SelectionFormula = "{mytable.EntryID} = 123"
yours,
K.Babu
Quote:
Originally posted by Delamater
Mr Babu,
You are kind to help everyone! My question is simple, I have a variable that I would like to pass into a selection formula inside of Crystal Reports. On other words, I want to select only records in Crystal Reports 8.5 where the EntryID = gFindString.
gFindString is a value that is populated when a user selects a record using adodb.recordset.find.
Thanks in advance for the help!
Bob
hi,
Set 'Printer Setup' in crystal report design mode, you can change printer properties with custom paper size
yours,
K.Babu
Quote:
Originally posted by shashibhushan
Dear Babu
I have made a project for which i need to set page size of 7.5''x8''
with printer driver not supporting this size(note that my printer is DMP.) Is there any way to explicitly define the page size for output.
Regards
Shashi bhushan
Hi all this one is kind of weird,
I thought Crystal's run time licenses were free? Here is my code:
Set Appn = CreateObject("CrystalRunTime.Application")
Set cReport = Appn.OpenReport("D:\Programming Projects\Work Proposal\Take4\Reports\ViTriage.rpt")
Then if I add a watch value to cReport and expand the properties, I get a message box from Crystal that says that this api is not free and that I need to purchase it. I then get a:
"Error opening File
File could not be found in 'tblViHeader', at location 'tblViHeader'"
The file does exist at that location. Is this some type of weird legitimate error or is this because I do not have the correct version of craxdrt.dll or crviewer.dll. Or, is this because of my code?
What is weird is that the code that references tblViHeader comes a few lines down.
It was working and it just all of a sudden stopped.
Any ideas?
Thanks in advance!
Bob
i wish to make a cube or olap (just like in cognos powerplay) in crystal 8.5. could you guys give some tips/ step by step procedure or any documentation will show me how to do it ?
thanks in advance
Hi,
We have created a Visual C++ .NET program that uses Crystal Reports to export reports to files. The PDF files look great but, the EXCEL files force themselves into rows and columns.
When I use crystal to export the files to EXCEL I can get them to come out right when I choose
column width based on objects in the whole report from the Excel Format Options dialog box.
How do I do this programmatically?
Thanks
Gary
Hello Mr K.Babu
I know how to design an report by Crystal Report but I do not know how to transfer database from Accscess to Crystal Report (I use Visual Basic and design Report by DataReport in VB6 but it can print Landscape orientation, that why I use Crystal report. )
Can you tell me how can i tranfer database from Access to Crystal Report .
Thanks a lot
Hi, Mr. K. Babu:
I want to prepare a set of forms(PDF) from MDB database, could I load data from the database and fill in the field in the forms autumaticly by using Crystal Report ?
Thanks,
Mark,
I want to create a report with the following in mind:
The Previous table should generate the following output:Code:Table Layout
ProjectID | ComponentID | Stack | Level | Position
----------------------------------------------------------------
10001 | 401 | 0 | 0 | 1
10001 | 402 | 0 | 0 | 3
10001 | 403 | 0 | 1 | 1
10001 | 404 | 0 | 1 | 1
10001 | 405 | 0 | 2 | 0
10001 | 406 | 0 | 2 | 1
10001 | 407 | 0 | 2 | 3
10001 | 408 | 0 | 2 | 4
10001 | 409 | 0 | 3 | 2
10001 | 410 | 1 | 0 | 1
10001 | 411 | 1 | 0 | 3
I am using crystal reports version 7.0 professional. I cannot use the cross tabs to create this report because of limitations I found with it.Code:
Project ID: 10001
----------------------------------------------------------------------
409
405 406 407 408
403 404
401 402
______________________________
410 411
----------------------------------------------------------------------
What I need to know, is given the table shown above, how can I position the Component on my report based on the Stack, Level, and Position fields of the records retrieved. The output must resemble that shown above.
I use C++, ADO, and MS Access is the database.
Mike B
I think this is not a code error, reinstall yours crystal report again, make sure the related custom options are checked correctly.
yours,
k.Babu
Quote:
Originally posted by Delamater
Hi all this one is kind of weird,
I thought Crystal's run time licenses were free? Here is my code:
Set Appn = CreateObject("CrystalRunTime.Application")
Set cReport = Appn.OpenReport("D:\Programming Projects\Work Proposal\Take4\Reports\ViTriage.rpt")
Then if I add a watch value to cReport and expand the properties, I get a message box from Crystal that says that this api is not free and that I need to purchase it. I then get a:
"Error opening File
File could not be found in 'tblViHeader', at location 'tblViHeader'"
The file does exist at that location. Is this some type of weird legitimate error or is this because I do not have the correct version of craxdrt.dll or crviewer.dll. Or, is this because of my code?
What is weird is that the code that references tblViHeader comes a few lines down.
It was working and it just all of a sudden stopped.
Any ideas?
Thanks in advance!
Bob
Hi friends,
why do you need EXCEL format?, if your data like a word document, you can try export to some other format
yours,
K.Babu
Quote:
Originally posted by ghoran
Hi,
We have created a Visual C++ .NET program that uses Crystal Reports to export reports to files. The PDF files look great but, the EXCEL files force themselves into rows and columns.
When I use crystal to export the files to EXCEL I can get them to come out right when I choose
column width based on objects in the whole report from the Excel Format Options dialog box.
How do I do this programmatically?
Thanks
Gary
Hi friends,
Create cross tab query in access itself, then you can directly use the query in crystal reports design time.
yours,
k.Babu
Quote:
Originally posted by MikeB
I want to create a report with the following in mind:
The Previous table should generate the following output:Code:Table Layout
ProjectID | ComponentID | Stack | Level | Position
----------------------------------------------------------------
10001 | 401 | 0 | 0 | 1
10001 | 402 | 0 | 0 | 3
10001 | 403 | 0 | 1 | 1
10001 | 404 | 0 | 1 | 1
10001 | 405 | 0 | 2 | 0
10001 | 406 | 0 | 2 | 1
10001 | 407 | 0 | 2 | 3
10001 | 408 | 0 | 2 | 4
10001 | 409 | 0 | 3 | 2
10001 | 410 | 1 | 0 | 1
10001 | 411 | 1 | 0 | 3
I am using crystal reports version 7.0 professional. I cannot use the cross tabs to create this report because of limitations I found with it.Code:
Project ID: 10001
----------------------------------------------------------------------
409
405 406 407 408
403 404
401 402
______________________________
410 411
----------------------------------------------------------------------
What I need to know, is given the table shown above, how can I position the Component on my report based on the Stack, Level, and Position fields of the records retrieved. The output must resemble that shown above.
I use C++, ADO, and MS Access is the database.
Mike B
Babu,
I have Crystal Report Ver. 7.00 which runs very nice on Win 2000 but not on Win XP. I am sure Seagete are not stupid to this degree. Do you have a solution to keep it running on Win XP.
What problem you face in XP OS, when using crystal report.
yours,
k.Babu
Quote:
Originally posted by camelriding
Babu,
I have Crystal Report Ver. 7.00 which runs very nice on Win 2000 but not on Win XP. I am sure Seagete are not stupid to this degree. Do you have a solution to keep it running on Win XP.
In design stage there is no problem. But at run time I get
(Method 'Action' of object 'CrystalCtl' failed)
Run-Time Error '-2147417848 (80010108)'
Thanks in advance
If you can able to view print preview at design time, that it may be crystal report control problem, try after reinstall the crystal report
yours,
k.Babu
Quote:
Originally posted by camelriding
In design stage there is no problem. But at run time I get
(Method 'Action' of object 'CrystalCtl' failed)
Run-Time Error '-2147417848 (80010108)'
Thanks in advance
Babu,
Sorry about what I said in the previous message. In design time I get some errors. The current error I got today is:
CRPaige library CRPaige(32).DLL cannot be found.
It should be on the path.
I search all the hard disk for this file but it does not exist.
To explain why we need to export to excel I need to explain our business app.
Our company is a multi media messaging company that delivers faxes, emails and voice messages around the world. Our customers submit jobs that deliver to as many as 600,000 recipients. Our reports have always been text. Since the business has grown we are now offerering graphical reports to our customers. These reports are delivered to them through email or into their mailbox.
We currently only offer pdf formatted reports to be sent to them. Our customers are directly asking us to pass the report back to them in EXCEL format.
The bottom line is that the report is formatted on a windows box and the file is then put on a server to later be delivered to the customer therefore, we need to pre-format the report before we pass it back to the server. The customer does not want to receive the file in another format and be forced to reformat it themselves.
Does this help you understand why I need to teach my VC program to programatically do this?
Thanks
Gary
I thought that crystal report was not correctly installed or it may be corrupt in your machine, reinstall your crystal report once again.
Quote:
Originally posted by camelriding
Babu,
Sorry about what I said in the previous message. In design time I get some errors. The current error I got today is:
CRPaige library CRPaige(32).DLL cannot be found.
It should be on the path.
I search all the hard disk for this file but it does not exist.
Babu,
Thanks very much for your help. At the end I managed it by installing New Crystal Report V.8.5
Thnaks again
I am puzzled.
I am looking at a report someone else created.
It looks simple to me.
There is a report head, group head, detail, group foot and report foot.
If the group selection causes a result set of no records, the variable fields in the report head are blank. The text fields there are filled in but, the data fields are empty.
If I right mouse on them in the designer and choose Browse field data I get good results.
I am reading from three different tables in a single database but, all the information in the report head is in one table.
Remember if there are records I do get a complete report.
Thanks
Gary
hi,
Test the following steps:
Remove unwanted tables from report,
View the visual links are correctly,
Remark the filter condition in selection formula record or group,
Paste same field in different groups which is specified bellow by you, preview the result.
Quote:
Originally posted by ghoran
I am puzzled.
I am looking at a report someone else created.
It looks simple to me.
There is a report head, group head, detail, group foot and report foot.
If the group selection causes a result set of no records, the variable fields in the report head are blank. The text fields there are filled in but, the data fields are empty.
If I right mouse on them in the designer and choose Browse field data I get good results.
I am reading from three different tables in a single database but, all the information in the report head is in one table.
Remember if there are records I do get a complete report.
Thanks
Gary
Thanks but, this didn't work. I did get it to work but, please read on because I don't believe this was the best way. I have been a professional programmer since 1989 so I know the idea is that as long as it works don't complain but, I like to understand why.
I do want to say that I took out the grouping and simply had a detail line. I saw the same issue. If there are no detail records based on report / selection formula / records for the detail section then the report head details do not fill in. This doesn't make sense to me since the report head is populated from one xml element and the detail from another.
1. Remove unwanted tables from report
The input is actually an xml file. The xml file is populated from a Visual C++ app that uses OLE DB to connect to a UNIX sybase server and executes stored procedures there. The xml schema id is the entire dataset and each element represents a stored procedure. The report head of the report is populated from the information in one element and the body is populated by another element. This second element is repeated for each detail line.
2. View the visual links are correctly
I checked the links section. I changed the links around. I even removed any links from the record that contains the report head info. No change.
3. Remark the filter condition in selection formula record or group
If I do this all works well.
4. Paste same field in different groups which is specified bellow by you, preview the result
No change.
How I got it to work.
I now have a main report and a subreport.
The main report is the original report head and a new report head that simply contains the subreport.
The subreport is all the detail level information.
Now if the subreport contains no detail the main report fills in its detail. WORKS!!!
Thanks for your time
Gary
I still need an answer to this one.
Is there another Forum I should post this to.
I realize that I am in a subForum of Visual Basic and this is a Visual C++ question.
Hi Babu (or anyone who have an answer to this questions)!
I have 2 Crystal Report questions.
1. And old question... When I run the "Package and Deployment Wizard" all the DLL:s needed to run CR is not included (As an example: the ones needed when exporting to PDF-format in the CRViewer), do you have any good url (or maybee file on the Installation CD) where it's explained what DLL:s that are needed to be included in the Setup?
2. Is it possible in some way assigning a global connectionobject in the VB project to a report (and in that way telling it what database to work with)
I use VB6 SP5 and CR 8.5
Sorry for asking on this forum. Nobody answers my question anywhere else. Maybe here?.....
Does report with grouping require different code in VB.NET application with CrystalReportViewer Control than report without Grouping. I have several reports without Grouping and all of them are displayed just fine in both Crystal environment and in VB.NET app. Set of other reports are previewed fine in Crystal Reports environment, but give me a mess when I run them the same way as I do with reports without Grouping from VB.NET app.
What's wrong? Is this Viewer bug or I need to run report with grouping differently. In VB6 I did the same with any report.
Vlad
Hello Mr. Babu,
I want to know, is there any way with which I can get the formula fields created in crystal report?
Amit Khardenavis
Sorry
one change in my question. I want ot know the name of formula fields.
Amit khardenavis
Create formula fields under insert menu at crystal report design time
eg. forName
forBasic
In VB Code
cr.formulas(0) = "forName = 'Amit'"
cr.formulas(1) = "forBasic = 20000"
.... and so on.
yours,
k.Babu
Quote:
Originally posted by akhardenavis
Sorry
one change in my question. I want ot know the name of formula fields.
Amit khardenavis
Refer Distribution files in crystal report documents file.
Quote:
Originally posted by stickan
Hi Babu (or anyone who have an answer to this questions)!
I have 2 Crystal Report questions.
1. And old question... When I run the "Package and Deployment Wizard" all the DLL:s needed to run CR is not included (As an example: the ones needed when exporting to PDF-format in the CRViewer), do you have any good url (or maybee file on the Installation CD) where it's explained what DLL:s that are needed to be included in the Setup?
2. Is it possible in some way assigning a global connectionobject in the VB project to a report (and in that way telling it what database to work with)
I use VB6 SP5 and CR 8.5
Hello Babu,
I think I have not enterprited my question properly to you. My problem is,
I have created one report in version 8.0. In that I have defined some formula fields and record selection formula. Now From VB programme I am calling that report file. The data file is password protected MDB file. I am giving password to data file as per your suggesion. Then I am specifying the formula field values. but I am gettign one error message when I am trying to activate report. the error message is as per follows
Error in file Report1.rpt
Unable to connect: Inalid session parameters.
My code is as per follows
cry1.ReportFileName = app.path & "\Report1.Rpt"
cry1.LogonInfo(0) = "dsn=;uid=;pwd=cyber;dsq="
cry1.DataFiles(0) = App.Path & "\Data1.mdb"
cry1.Formulas(0) = "PatNo = " & txtnu_ChartId.Text
cry1.Formulas(1) = "TreatSeries = " & txtVistSeriesNo.Text
cry1.Formulas(2) = "SeriesStartDate=Date(" & Year(CDate(txtdt_SeriesStartDate.Text)) _
& "," & Month(CDate(txtdt_SeriesStartDate.Text)) _
& "," & Day(CDate(txtdt_SeriesStartDate.Text)) & ")"
cry1.Action = 1
I don't understand what could be the reason. Can you help me in solving this problem.
Amit Khardenavis
Check the bellow line, using with date value manually if it's work, then the date value is invalid, Try again
cry1.Formulas(2) = "SeriesStartDate=Date(2003,01,01)"
---
if the value is text you should pass with quotation
cry1.Formulas(0) = "PatNo = '" & txtnu_ChartId.Text & "'"
yours,
Babu
Quote:
Originally posted by akhardenavis
Hello Babu,
I think I have not enterprited my question properly to you. My problem is,
I have created one report in version 8.0. In that I have defined some formula fields and record selection formula. Now From VB programme I am calling that report file. The data file is password protected MDB file. I am giving password to data file as per your suggesion. Then I am specifying the formula field values. but I am gettign one error message when I am trying to activate report. the error message is as per follows
Error in file Report1.rpt
Unable to connect: Inalid session parameters.
My code is as per follows
cry1.ReportFileName = app.path & "\Report1.Rpt"
cry1.LogonInfo(0) = "dsn=;uid=;pwd=cyber;dsq="
cry1.DataFiles(0) = App.Path & "\Data1.mdb"
cry1.Formulas(0) = "PatNo = " & txtnu_ChartId.Text
cry1.Formulas(1) = "TreatSeries = " & txtVistSeriesNo.Text
cry1.Formulas(2) = "SeriesStartDate=Date(" & Year(CDate(txtdt_SeriesStartDate.Text)) _
& "," & Month(CDate(txtdt_SeriesStartDate.Text)) _
& "," & Day(CDate(txtdt_SeriesStartDate.Text)) & ")"
cry1.Action = 1
I don't understand what could be the reason. Can you help me in solving this problem.
Amit Khardenavis
Hello Babu,
Thanks for your suggestions. I tried your both suggestions. All are correct but still my report is not getting activated.
One doubt came in my mind, Is it any problem if I convert any report from version 4.x to 8 and then trying to use?
Please tell me.
Amit Khardenavis
Hi,
I am using the following code to view a report in VB.
--------
Dim CrxApp As New CRAXDRT.Application
Dim CrxRpt As CRAXDRT.Report
Set CrxRpt = CrxApp.OpenReport("emp.rpt")
CrxRpt.DiscardSavedData
CRViewer1.ReportSource = CrxRpt
CRViewer1.ViewReport
------------
This works fine. Now I want to use something similar to print the report without showing it on screen.
I searched this forum and got 2 methods of doing this
1) setting the destination property of the Crviewer object to the printer.... However, I dont see a destination property for this object - (I am using crystal reports 8.5)
2) using CRViewer1.PrintReport
When I do this, I get a blank CrViewer control i.e. the control appears without the report and nothing is printed.
Where am I going wrong?
Thanks in advance
Satish
hi,
Open object browser and select crystal report library, for more details aboud class objects.
yours,
K.Babu
Quote:
Originally posted by Satishpp
Hi,
I am using the following code to view a report in VB.
--------
Dim CrxApp As New CRAXDRT.Application
Dim CrxRpt As CRAXDRT.Report
Set CrxRpt = CrxApp.OpenReport("emp.rpt")
CrxRpt.DiscardSavedData
CRViewer1.ReportSource = CrxRpt
CRViewer1.ViewReport
------------
This works fine. Now I want to use something similar to print the report without showing it on screen.
I searched this forum and got 2 methods of doing this
1) setting the destination property of the Crviewer object to the printer.... However, I dont see a destination property for this object - (I am using crystal reports 8.5)
2) using CRViewer1.PrintReport
When I do this, I get a blank CrViewer control i.e. the control appears without the report and nothing is printed.
Where am I going wrong?
Thanks in advance
Satish
hi,
Make sure all the formulas value are received correctly,
eg. Insert all the formula fields in crystal report, and then preview the formulas value are stored correct format, esspecially date value.
yours,
K.Babu
Quote:
Originally posted by akhardenavis
Hello Babu,
Thanks for your suggestions. I tried your both suggestions. All are correct but still my report is not getting activated.
One doubt came in my mind, Is it any problem if I convert any report from version 4.x to 8 and then trying to use?
Please tell me.
Amit Khardenavis
Hi Babu,
I'm not using Visual Basic, but I think you can help me with this problem. Is there a way to tell what version of Crystal Report is running on the computer? I have problem with printing multiple copies of a report on different versions of Crystal using Visual C++. I'm not too familiar with all the code interfacing with Crystal yet since I'm taking over a project that ist started by someone else. If I print on version 7.0 I get the correct number of copies, but if I print on version 8.5, I get an exponential number of copies. For example, if I put 3, I get 9 copies instead. I'm thinking if I can retrieve the version information, maybe I can get around this problem. Your help is greatly appreciated.
Thanks again,
CPB