Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Export Reports Created Using Crystal Reports 8.5 To MS Excel

i would like to know if there is a way out to export reports created using Crystal reports 8.5 to MS Excel directly with out the user doing it manually, by coding in VB6.0.
If yes please give me the codes.

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Export To Excel From Crystal Reports 8.5
I run a crystal report from VB6, sp5. After report is displayed, when I hit the export button, and choose Ms excel format, I receive the "Excel format options" screen. When I press the <ok> button, I should receive the "select export file" screen. This does not happen. It appears only if I choose "Ms excel (data only)" export format.
Any ideas?

Print PDF File (when Created By Crystal Reports)
I have a project which uses a database, takes some values, creates a report (using crystal reports) and then stores the report in a PDF file.

I would like to be able to print this PDF file when it is created as an automation.

I am using VB 6.0 and never had some printing xperience before, so if someone could guide me through the process i'd be grateful.

ps: while searching past posts, i encountered some things about Acrobat Writer. Is it essentian to have Acrobat Writer in order to achieve my goal? I didn't quite get it..

ps2: i wasn't quite sure where to post this thread. General or Database n Reporting. I figured out it is a printing issue so i ended up here. I 'd like to apologize if i misplaced it..

Thanxs in advance

Crystal Reports Export
Using CR 9
I want to add a button to export the report to excel. I know hoe to do this but how do you export the data only format. Right noe it exports the report as it is in excell with all the headers and footers.

Urgent Help needed!

Crystal Reports 8.0 Export To Pdf
Crystal Reports 8.0 is not saving formatted
data correctly to a .pdf disk file correctly
from the report viewer. I have a VB6
application that retrieves data from a SQL
database then puts in a report. From the
report viewer I chose to export to disk in
pdf format. The file is created but the data
retrieved from the database is not in the
report. I checked the machine the I
installed to for all of the correct Crystal
dlls and all looks well. If anyone else can
give me any other assistance It would be
greatly appreciated...!

Crystal Reports Export
I have a vb application which displays a crystal report(8.5). When a user clicks on the export report button, crystal prompts the user to choose a format and a destination. Is there a way to take items off the format list? Also is there a way to set the default directory that it exports to without prompting the user?


Crystal Reports 7 Export
I am using Crystal Reports 7 with VB 6 to generate reports on Access database tables. When I preview the report on the screen and then try to use the export button, nothing happens. The button did work when I was using a package and deployment from VB but stopped working when I started using the Install Shield installer. I have gone back in and tried to load all of the dependencies of Crystal, but it still does not work. Does anyone know the dll or ocx file needed? I have the format and destination dlls loaded.

Export In Crystal Reports
 I m using crystal report 8.5 in visual basic 6.0, and i have a problem with crystal report. The problem is that i dsiplay records on the crystal report from data base using stored procedure. it is dine fine but while displaying records on the crystal report i change the value of some fileds in crystl report's designer's Section10_Format() event. The changed record are dispalyed correctly but when i export that report in text or word format the changed fields are not exported. why this happened....?

Please help me in this problem


Export Crystal Reports
I have created a report using Crystal Reports 8.5 and executed the report using VB. I want to export the output to other format for which i believe crystal reports provide the facility. But in my case i could able to see the export button when i am at design time, i mean when i see the report using crystal reports User Interface, but when i run it through VB i don't find that button to export. Do i have to enable some thing for that??

I use CRViewer control to view the report.

Thanx in advance.

Crystal Reports Export To PDF Error
On my machine (WinXP) I can get the export to PDF file working, but when I try to package the app, and then try on another machine (Win98), I get a "Failed to export the report" error. I've searched the Crystal Decisions site, this site and the web but haven't found a solution. All of the other export formats that I am using do work, just not PDF.

I use Inno Setup 3.0.7 and these are the file entries for the dll's that I am packaging, if it helps:

; Crystal Reports
Source: "C:Program FilesSeagate SoftwareReport Designer Componentcraxdrt.dll"; DestDir: "{pf}Seagate SoftwareReport Designer Component"; Flags: regserver sharedfile
Source: "C:Program FilesSeagate SoftwareViewersActiveXViewercrviewer.dll"; DestDir: "{pf}Seagate SoftwareReport Designer Component"; Flags: regserver sharedfile
Source: "c:windowssystem32P2smon.dll"; DestDir: "{sys}"; Flags: sharedfile
Source: "c:windowssystem32p2bdao.dll"; DestDir: "{sys}"; Flags: sharedfile
; Crystal Reports - Export Formats
Source: "c:windowscrystalU2DDISK.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalU2FHTML.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalCRXF_PDF.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalCRXF_RTF.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalU2FTEXT.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalU2FWORDW.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
Source: "c:windowscrystalU2FXLS.DLL"; DestDir: "{win}Crystal"; Flags: sharedfile
; Crystal Reports - Export support files
Source: "C:Program FilesSeagate SoftwareSharedEXPORTMODELLER.DLL"; DestDir: "{pf}Seagate SoftwareShared"; Flags: regserver sharedfile
Source: "C:Program FilesSeagate SoftwareSharedCRTSLV.DLL"; DestDir: "{pf}Seagate SoftwareShared"; Flags: regserver sharedfile
Source: "c:windowssystem32EXLATE32.dll"; DestDir: "{sys}"; Flags: sharedfile

Any help would be appreciated.



Crystal Reports Export List
I have a VB6 program that works with Crystal Reports 8.5 to generate a report from an Advantage SQL database. All of this is up and running and now I am adding a button so the user can choose to export the report.

I have this in place as well and when the user clicks it a box pops up asking what format they would like the report in. In this box is an amazing assortment of options. What I would like to do is prune some of those options out of there. Ideally I want .pdf, .rtf, .doc, and .csv.

Is there some way to eliminate options from their list, or do I need to create my own selection box? I found code to do the export through VB, so this would be possible, I just wanted to see if I could quickly and easily prune the list that is already provided. Thanks.


Crystal Reports Export Code From DAO To Use ADO
I have the following code, which only works exorting Crystal Reports Reports that have been set to the MS DAO driver.

Dim oApp
Dim oRpt
Dim ExportOptions
Dim Tbl

Set oApp = CreateObject("CrystalRuntime.Application")

If IsObject(oRpt) Then
Set oRpt = Nothing
End If

Set oRpt = oApp.OpenReport("D:Work FolderProjectsIMS CODEEpass TaskswebdllsRPTsC_ExecSummary.rpt", 1)
oRpt.MorePrintEngineErrorMessages = False
oRpt.EnableParameterPrompting = False

For Each Tbl In oRpt.Database.Tables
Tbl.Location = "D:Work FolderProjectsIMS CODEEpass TaskswebdllsMOXZK0R0G3AE2L6T41FL90103AGKIA.mdb"
Next Tbl

Set ExportOptions = oRpt.ExportOptions
'oRpt.SQLQueryString = "SELECT * FROM [Answer]"

ExportOptions.NumberofLinesPerPage = 50
ExportOptions.FormatType = 31
ExportOptions.DestinationType = 1
ExportOptions.DiskFileName = "c:XXX.pdf"

oRpt.Export False

Set ExportOptions = Nothing
Set oRpt = Nothing
Set oApp = Nothing

I need the equivalent code so i can use the Report to utilise ADO connections to connect to both a MS Access database and a SQL Server. Im desperate and in need of help!


Edit by loquin: added [vb][/vb] code tags around your code for readability.

Crystal Reports : Export Options.
hi all,
what my project need is Drect Export.
should not ask for the options like From Page - To Page with n Ok Button.

do any body knows how to set this options suppressed ??

b coz i m exporting that report through vb-code to txt format and while exporting it prompts to the user how many pages he wants to export.

Edited by - upen_10 on 9/24/2005 1:24:15 AM

Crystal Reports Export To PDF Error
I am trying to export to pdf from crystal reports programmically. I am using this command:

crrep.PrintOutEx False, 1, False, 1, 13, "c:pdf.pdf"

it exports but when i try to open the pdf file it says:

Acrobat could not open pdf.pdf because it is either not a supported file type or because the file has been corrupted.

When i export it through the crviewer , non programmically, it opens fine. What am i doing wrong?

Auto Crystal Export Won't Refresh Reports
I am trying to get this report to loop. It generates the first report correctly according to Access database info but instead of refreshing with new data as code loops it simply generates the same report over and over. I want to save up to 200 indivdual reports into HTML format and put them in a folder.

How do I get the first report out of memory and get it to read the database again for updated data and new report

Public Appn As CRAXDRT.Application
Public cReport As CRAXDRT.Report

Set Appn = CreateObject("CrystalRunTime.Application")

While Not rsEvent.EOF

pEventID = rsEvent!ID
dEventdate = rsEvent!EventDate
dCutoffdate = rsEvent!CutOffDate
sEvent = rsEvent!Event
bEvent = True

ssql = "INSERT INTO TicketOrderForm (CompanyName, ContactName, " & _
" Row1, Seat1, Section2, Row2, " & _
TicketMaster ) " & _
" Values ('" & _
getString(sCompanyName) & "', '" & _
getString(sContact) & "', '" & _
getString(sPhone) & "', '" & _
getString(sSeatRow) & "', '" & _
getString(sSeatFrom) & "', '" & _
getString(sSeatSection2) & "', '" & _
getString(sSeatRow2) & "', ' " & _
getString(sTicketMaster) & "') "

cmdADO.ActiveConnection = cnRpt.Conn
cmdADO.CommandText = ssql

Set cReport = Appn.OpenReport(gPath & "reportsEventNotification.rpt")

sUser = GetFullUser(oSec.UserID)
EventNotification = True
bRunReport = True

' Load TimedMessage
' TimedMessage.Timer1.Interval = 5000
' TimedMessage.txtMessage = "Sorting..."
' TimedMessage.Show vbModal

cReport.ExportOptions.DestinationType = crEDTDiskFile
FName = Trim(Str(pID)) & "_" & Trim(Str(pEventID)) & "_" & Format(Now(), "mmddYYYYhhmmss") & ".htm"
cReport.ExportOptions.FormatType = crEFTHTML40
cReport.ExportOptions.HTMLFileName = gPath & "Exports" & FName
cReport.ExportOptions.HTMLEnableSeparatedPages = False
cReport.ExportOptions.HTMLHasPageNavigator = False
cReport.Export False
bRunReport = True

If bRunReport = False Then
MsgBox "No Report will be generated", vbOKOnly
Screen.MousePointer = vbDefault
Exit Function
End If

ssql = "DELETE FROM TicketOrderForm"
cmdADO.ActiveConnection = cnRpt.Conn
cmdADO.CommandText = ssql

Set cReport = Nothing


Export MSFlexGrid Data To Crystal Reports?
I've google'd and search these forums to see if it is possible to simply move all the current rows and columns displayed in a MSFlexGrid into a Crystal Report. Later then the report would be exported to a PDF. I've mostly only found threads with no replies to this question.

Initially I pull a database file using ADO which fills my first flexgrid, then I have controls that allow the user to add selected items to a seperate flexgrid. My goal is to export the data moved into the second flexgrid and present it in a nice way in a PDF. Crystal reports seems like it would be good for formatting everything, adding headers etc, then exporting that to a PDF.

Is it possible to pull data from a MSFlexGrid to Crystal Reports?

Crystal Reports 8.5-&gt;PDF Export-&gt;Many Blank Pages
I am using Crystal Reports 8.5, VB 6 and Sql Server

I have this report which consists of a single & simple (line) chart.
It represents the changing of a single value taken from a db table.
Furthermore I have 3 single values: Max , Min and Average value from the same field. The preview option works fine.

This report is manipulated from an application which exports this report to PDF.

The exporting is done properly and the pdf is created with the values I want.
The only problem is that many blank pages are left after the first one which has the chart and values I want thus, increasing the file size.

What I suppose is that being amateur in Crystal Reports designing I misplaced the chart and/or the values in the report design.
To be honest I don't know where to put these fields in the design view of the report.
Crystal only lets me place the chart and the max,min,avg values in the Report Header.
Is this the problem? why could this be happening?

Thank you in advance.

Export Tab Separated Data With Crystal Reports
I want to export data with Crystal Reports.
The data is supposed to be separated by tabs.
Like this:
Mats Nilssson LuleŚ Sweden

I've tried to use different format types.
crEFTCharSeparatedValues with chr(9) as CharFieldDelimiter and chr(0) as CharStringDelimiter.

Nothing comes out the way I want. The TabSeparated formats enclosure the strings with ":s and charSeparated will not accept my null character as delimiter. Is there any way to solve this?

Export Button In Crystal Reports Developed In RDC
I have developed Crystal reports using both the RDC and standalone (using old CrystalReports control to access).

The standalone reports have an Export button which allow the user to e-mail the report in another format. The problem I am having is that I can't seem to find out how to add this export button to an already existing report developed with RDC.

Does anyone know how to add the export button to a Crystal Report?

Sorted Using Vsusi's Example ---&gt; Crystal Reports - Export To PDF
How can I programmatically export a Crystal Report (v8.5) a a .pdf file to a specific location? I know I can export it as .rpt file:
Crystal.ReportFileName = strPath & "Quote.rpt"
Crystal.DataFiles(0) = strPath & "QuoteSystem.mdb"
Crystal.SelectionFormula = "{Quote.QuoteNo} = " & cboQuoteNo.Text
Crystal.PrintFileName = "C:fileName.rpt"
Crystal.PrintFileType = crptCrystal
Crystal.Destination = crptToFile
I have tried .PrintFileName = C:filename.pdf, which physically creates the file but you can't open it.
I know that when I open the report, I can then export it to a PDF file, but this is very long winded and time consuming.

Any ideas anyone?

Export To Lotus Notes With Crystal Reports RDC
If I use the export button on CRViewer I get a memo in Notes with an attachement of my export file.
The same I want to do with RDC directly. There are some properties for RDC export options. But I can't figure out how to do this. I always get a window showing the progress of export. That's all. In Notes I didn't found anything......
Export to Exchange or Outlook works perfect.

With RDCRep.ExportOptions
.DestinationType = crEDTLotusDomino OR crEDTEMailVIM ???
.FormatType = crEFTText

.LotusDominoComments = ???
.LotusDominoDatabaseName = ???
.LotusDominoFormName = ???
end with

Someone has a solution for this problem?

Crystal Reports Export File Problem
I am working with Crystal Reports 9. I am using RDC and Report viewer control in VB to Preview and save my crystal Reports.

Here is the piece of code for exporting the report to a file:
The following code works fine

report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.DiskFileName = "c:sample.txt"
report.ExportOptions.FormatType = crEFTText

report.export False

Problem comes with this code:

report.ExportOptions.DestinationType = crEDTDiskFile
report.ExportOptions.DiskFileName = "c:sample.txt"
report.ExportOptions.FormatType = crEFTTabSeparatedValues

report.export False

Whenever I user some other format type other than crEFTText. I get the following error:

Run time Error ........
Error in file? or
Missing or out-of-date export DLL

Can anyone help in this regard. Why i am getting this error. I need to save the report in many format types.

Pls. do help me with this.

suresh gade

New Crystal Reports, Access And Data Report Designer Forum Has Been Created
Be among the first to post there!!!

(The result of the poll was 80% in favor.)

Trapping The Export Button Click On Crystal Reports
VB 6.0
Crystal Reports

When my users have a report displayed, they have the opportunity to
press the "Export" button (little suitcase thingy, send report to Word
or whatever) at the foot of the report. I would like to trap this
event and pop up a message box asking them not to change the wording
of the report.

Can this be done?

The reading group's reading group:

Export And ToolTip Text Problems In Crystal Reports

Please help me....................

The detail of the first problem is given here

In visual basic 6.0 i added crystal report 8.5 component and then i made a report given a stored procedure e.g abc. abc displays two fields (a1,a2) on the report. I also added a text object on the report (t1) and i supress the (a1) field. Now in the view code window, Format procedure of the Section 10 object i assign the field (a1) value to (t1) text.

Private Sub Section10_Format(ByVal pFormattingInfo As Object)
Dim st as string
          st = Field1.value
          t1.SetText (st)
End Sub

NOTE***** (It measn that i have changed the a1 filed's value to text object)

When i run the application the crystal report dispaly result correctly like the format of the report is give

                                A1 A2
                               Test1 App1
                               Test2 App2
                               Test3 App3

when i export this report in the Acrobat format then the report format is displayed same as shown. But when i export this report in the world document from export button aviable on the cystal report's tool bar then the report format is displayed like

                                A1 A2

It means that the exported file does not show the ( t1 text object) values that are assigned fron a1 field. Why this happened


I am using Crystal repor 8.5 designer component in visual basic 6.0 editor. In this case there is no option dialog in the File menu to uncheck the tooltip text . And i want to disable the tool tip text at run time because tool tip text dispalyes the information of procedure name, field type etc, How can i solve this problem i.e disabling of tooltip text in preview mode in crystal report.


Software Eng.

Export To Excell From Crystal Reports In VB6.0.. Code Needed...urgent

i'm using VB6.0 and i'm developing an application. in that i want to export Crystal reports file to Excell sheet through VB 6.0... i need the coding for that...

urgent help needed...

thanx in advance

===> ravi.

Data Reports Active Reports Or Crystal Reports
Hi all

I am really stuck here and i need help urgently
I have to call three tables in a row to print a single invoice entry
noe the problem is if the do it by calling single tables then there is a problem that it is nopt going to print the last order which is filled.Is there is any way it can be done through using sql command or something.
Secondly if i use max order in sql then i would not be in a position to print order after searching for it


Crystal Reports 9: &#8220;Choose/Save Export File&#8221; Dialog Box
I would like to use the Report object Export method to provide a simple mechanism for exporting reports. My only problem is that I would like to initialize the “Choose/Save export file” dialog box to a specific directory before it is displayed. Somewhat like setting the visual basic CommonDialog.InitDir property.

Is this possible?

Edited by - AlanG on 11/17/2003 12:18:56 PM

To Export Data Reports In Visual Basic To Excel
i want to convert data reports or export them to excel or if possible csv(comma separated values) . is there any way of doing it.
help needed immdly
with regards

In Crystal Reports, How To Display Financial Reports (P & L, Balance Sheet Etc.) In Columnar Format
Dear All,

I am developing a Financial application using VB6, MS-Access & Crystal Reports 8.5. I am facing problems in certain reports. Some of the reports like Profit & Loss and Balance Sheet require the output to be printed in columnar format.

I have tried giving subreports for each section, i.e.; Assets & Liabilities, but then, the output is not coming in order as per the groups. The problem is even more where there are sub-sections in the right side column & left side column for example in Profit & Loss, where there are sub-sections for Gross Profit/Loss and Net Profit/Loss. In such cases, how to bring the total amount fields at the same horizontal level.
I hope someone can help me how to do the above.

Thanks in advance.

Best Regards

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"

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.

Need To Understand Data Reports - Heard That Crystal Reports Were Slow
I have two questions:

1.) I was going to take a step forward to learn how to use crystal reports but I heard that on a website they are viciously slow. Is that true or is there a way around that with coding?

2.) I have been using Access reports through Visual Basic 6.0 with the following code - thanks for the tremondous help of everyone on this website:

appAccess.OpenCurrentDatabase SERVER & "disp-1_be.mdb"
appAccess.DoCmd.OpenReport "oalog", acPreview
appAccess.Visible = True

The reports work great UNTIL I came accross a situation where the report is based off of the data entry of the user. oalog is a monthly report and in the query it automatically pulls the current month with the following query:

SELECT oalogallmonths.ctsbranch, Count(oalogallmonths.Amount) AS [Total Of Amount], oalogallmonths.GivebyName, oalogallmonths.United, oalogallmonths.Mayflower, oalogallmonths.Other, oalogallmonths.Tord, oalogallmonths.CURRENTDATE, oalogallmonths.Amount, oalogallmonths.Month1, oalogallmonths.ORDER
FROM months, oalogallmonths
WHERE (((months.monthID)=[oalogallmonths].[Amount]))
GROUP BY oalogallmonths.ctsbranch, oalogallmonths.GivebyName, oalogallmonths.United, oalogallmonths.Mayflower, oalogallmonths.Other, oalogallmonths.Tord, oalogallmonths.CURRENTDATE, oalogallmonths.Amount, oalogallmonths.Month1, oalogallmonths.ORDER
HAVING (((oalogallmonths.Amount)=11;

If you notice the records are pulled HAVING the 11th month in there.

If I want the user to ENTER the month I know that I must change the last line to:

HAVING (((oalogallmonths.Amount)=[ENTER MONTH]));

But a user might type January or 12/2003, etc...

so I made a combobox named ListMonth of the 12 months.
Then I made the change from:

HAVING (((oalogallmonths.Amount)=11;

HAVING (((oalogallmonths.Amount)=ListMonth.ListIndex + 1));

The only problem is that I keep getting a message box asking for ListMonth.ListIndex + 1.

My question is in the above code that defines appAccess.DoCmd.OpenReport "oalog"...
is there a way to change the RecordSource of the report to pull from my own query instead of the Access Query?


Crystal Reports - Upgraded To 8.5, Now Reports Written In 8.0 Wont't Work!!!
My reports are crashing when I run them on a machine with CR8.5, but they work fine on cr8.0. They crash inside the .DiscardSavedData Routine.

Does anyone know why or what I can do...

I call the report.Printout routine and right after I call the
.DiscardSavedData. The report is still printing out in debug mode.

Please help. Is my syntax wrong. The help file says I can only use Printout and DislcardSavedData in "formatting idle" mode. I don't know what this this???? The .PrintOut routine works but not the discardsaveddata.


Any help is appreciated.


How To Use Crystal Reports To Make The Dynamic Reports?(I Can't Use The Design Expert To D
  How to use Crystal Reports to make the dynamic reports?(I can't use the design expert to design the report,because the data source with different fields is unknown in design time.)
     Hello all!
     I use the dynamic generating MS Access table as the Data Source of Crystal Report.
How to use the Crystal Reports to display the data of the dynamic generating MS Access table?
     Thanks All!

Edited by - on 12/17/2003 9:37:59 PM

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.SQLQueryString = strSQL

frmReportViewer.CRViewer1.ReportSource = CRReport

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"

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- 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.

I Hate Reports. Trash Crystal Reports, Access Instead?
I am creating an app which requires a copius amount of complicated reports. These reports would be an absolute breeze to do in access, simply create a query that does all the work then base the report on that. Instead of wasting time with Crystal Reports, I'd love to be able to create an access query and then run an access report based on that query from within my VB app. Now I have code that allows me to run an access report, but it seems to require that access is open on the users machine at that time. Is there any way I can achieve what I need without opening access each time ?

Crystal Reports Using ActiveX Viewer For URL Linked Reports

We have a IIS service that broadcasts a virtual directory of reports so that they can be viewed using the crystal reports ActiveX viewer through an IE browser.

I am now trying to replicate this setup on another server, the IIS service is setup and URL's created for our reports.  When they are selected the browser defaults to the Crystal Enterprise logon screen.  Where do i change the settings so that the ActiveX viewer is used in the browser to view the report?

Many thanks,


Retrieving Images In Crystal Reports And Data Reports
I am saving the image path in the database and retrieving it for display but the problem is when I want to print the image for that particular record when I am only saving the image path in the database.

If I embed the image in the database it increases the size of the database but can be used in the reports in a bounded image control.

If somebody can help me retrieve the image in a data report/crystal report by using the image path in the database that did be great.


Grouping Records In Data Reports / Crystal Reports

I want to group records in my Data Report based on 2 particular fields. Just see the example below.

Below is the Table Structure and its values

UnitID Part Quantity
1 xx 5
1 xy 10
2 xx 5
2 xy 10

Now I want to result to show the summation of quantities based on the part only.

so the result should be

Part Quantity
xx 10
xy 20

It would be fine if someone can tell me how to do this in Crystal report/ VB data reports


Excel VB And Crystal Reports
I currently have a small Excel spreadsheet that manages a small business (in regards to invoices and po's). In this spreadhseet are VB macros that run and configure and ensure data intregrity and the sort.

One feature of the spreadsheet, is that a user can create a new invoice in a worksheet. The VB code behind the creation of the invoice creates the needed fields and brackets. At this point the user can enter the products to be put on the invoice and they have the ability to "update" the current inventory on another worksheet. The VB code here allows the user to create the invoice without having to re-enter the information in the current inventory worksheet.

What I would like to happen also, is when the VB code is transfering the data from the "Invoice" worksheet to the current inventory worksheet, it will also send the information to Crystal Reports. This would allow the user to create an invoice, update the current inventory and print the actual invoice all in one final swoop.

I can design the printable invoice in Crystal, but I guess my question is, how do I get the information from VB to Crystal?

What I don't want to do, is have the user open the Cyrstal Report (the invoice) and get Crystal to just pull data from the spreadsheet. I would like to handle this through the code so the user doesn't even know what's happening....they just simply create an invoice in the spreadsheet and poof, an invoice is displayed with the correct information and they can print it.

Any help on this would be awesome. Thanks.

VB6 / Crystal Reports / Excel
I've inherited an application that uses VB6 to create a crystal report and then copy that report to Excel. It does this by using crptexcel50. (I'm assuming that means copy 5.0). I've started to run into a problem now where I think the report is to big for excel 5.0 so would I'd like to change it to use Excel 2000. I can't locate an equivalent means to copy to Excel 2000. Has anyone run into this problem before and come up with a solution?
Thank you.

Anybody Know How To Get Crystal Reports 10 Reports Working In VB Studio 6?
It seems that there are a few posts regarding Crystal Reports 10...few from me. However there are 0 responses dealing with any really developer issues. Has anybody moved to using CR10 or are you people still using 8.5 or another version. Could you tell me what version you guys are using so that I will stop posting issues about CR10

Crystal Reports, Printing Data Reports
how do you filter records in Crystal Reports using a variable? I'm using Crystal Reports ver. 4.6.1 Why does a time field shown as mm/dd/yy when it should be hh:mm? Is there an easy way to print data reports with filtering or conditions in vb?

Problem Accessing Reports In Crystal Reports 9.0 From VB
Hi.  I use the following code in a number of VB apps to execute Crystal Reports.  It has worked fine with CR 7.0 and CR 8.0.  Now, with upgrade to 9.0, code will not work.  Error message is "Unable to load report".

I've played around with some of the references and componenets for 9.0, but haven't had any success.  Anyone encountering same problem?  Any workaround without incorporating the crystal viewer?  Any help would be greatly appreciated.

Thanks.  TM.

Public Sub PrintCrystalReport(CrystalReport As Object, _
                              Optional ReportName As String, _
                              Optional criteria As String)
On Error GoTo problems
    Dim i As Integer
    Dim n As Integer
    Dim a As Integer
    Dim response As Integer
    With CrystalReport
       .Connect = "DSN=" & strCurrentServer & ";UID = crystalreports;PWD=crystalreports;DSQ=" & strCurrentDatabase
       .ReportFileName = App.Path & "Reports" & ReportName
       For i = 0 To .GetNSubreports - 1
            .SubreportToChange = .GetNthSubreportName(i)
            .Connect = "DSN = " & strCurrentServer & ";UID = crystalreports;PWD =crystalreports;DSQ = " & strCurrentDatabase & ""
       .SelectionFormula = criteria
       .WindowState = crptMaximized
       response = MsgBox("Would you like this report sent to the printer?", vbYesNo, "Send Report To Printer")
       If response = vbYes Then
          .Destination = crptToPrinter  'Print to the Screen
          .Destination = crptToWindow    'Print to the window
       End If
       .Action = 1
    End With
    Exit Sub
    MsgBox "There was an error trying to print this report.", vbCritical, "CRYSTAL REPORT ERROR"
    MsgBox Err.Description
End Sub

Problem With Crystal Reports 8.5 Chart Reports
Hi All,

I had a problem with crystal reports 8.5 chart reports.
Iam using chart reports and included in the setup. The application shows all other reports except the chart reports.
Can anyone help me in solving this problem.
Are there any specific dlls to be included into the setup for crystal report chart graphs?

Thanls & Regards

Crystal Reports : Page Total In Sub-Reports
I have Main-Report like this
The columns 1-3 are Sub-Report(1), Column 4 is Sub-Report(2) and Column 5 is field of Main Report only.

Sl.No. Name Gross(Nov) Gross(Oct) Difference




.. ..... .... ....


Total C/F Rs. .......???........???........

I want the Difference Amount of Column(3) and Column(4)for every Record. How to achieve this?

At the same time I also want the Page Total of Column(3) and (4)at the page footer of Main Report(not the Grand Total).


View Reports Made By Crystal Reports
Hi Dear Friends,
I am using Crystal Reports 9.0. I want to view the reports from Visual Basic. But it is giving error. Say my database name is internship.mdb. My report file name is report.
I bring a control to my form named Crystal Report Control, (Need any more?). I set the database name the property of the control and everything. But it is still giving error.
I write the code behind the button "cmdreport" "report.action=1" (This works in CR 5.0).
But giving error "Unable to load report". Any body can help me.



Crystal Reports..opening Reports Runtime
I want to know is there anyway where i can make a query and attach that recodset to the report .I dont know much about ttx and would like to write the code with opening a crystal report application.
I have just added a reference of Reports dll and dont want to use Crystal Report control in the project.
I have made report with ADO option.
hopefully someone helps me in this direction
Thnaking you

Reports With Only Access 2000 & Crystal Reports Without VB?

I have not had a chance to read Crystal reports literature and I have never used it but I will ask anyway . Is it possible to create reports using only Access 2000 (as the database) and Crystal Reports (8.5) without the use of Visual Basic (6.0)? If so how and does anyone have a sample code?

Copyright © 2005-08, All rights reserved