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

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

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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.

Crystal Reports Exporting Options
Is it possible to choose which files types(PDF, Word, etc) a user has access to when exporting a report in Crystal Reports through vb code?

To be more specific, in crystal reports there is an export option that contains file types. I would like to be able to limit these types of files through vb code if possible.

Exporting Crystal Reports To PDF Options??? - Doozy..

I'm currently exporting successfully to PDF from crystal reports 10 to PDF using options:

Report.ExportOptions.FormatType = crEFTPortableDocFormat


All is well but I would like the PDF I export to be mono colour (ie black and white) not greyscale.

Is there an option I am missing? or is it even possible...?

I'm out of ideas..

Thanks for any suggestion..

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.

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?

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

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.

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

Problems With Export Options Y CR8.5 & VB6
Hi,I have an app in VB6, using CR8.5. When I get a report and try to send by e-mail export option, i receive the following

message : Windows has detected a problem with this application ............and should close (options : Send Report Error or Don't send). After that the application abort.
Could someone help me? I have no idea what could be happening. Please help me.

Setup Report Export Options
I have a VB6 application that uses crystal reports 8 to display data from a db. I'd like to change the default export directory displayed when a user selects the export button in the report viewer. Is there a way to do this? This option seems to be available in VB.Net but not VB6.

Any help will be greatly appreciated,



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 Report, Runtime Options
Would anybody tell me how I can specify the database (access mdb) location during runtime?

I read the help but I cannot understand.

My situation:

I design the report, when the mdb is in one directory.
During runtime, the mdb is in another directory.

How I can tell crystal report where is the new directory?

Please help!

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

Export Reports
i am trying to export my datareport to both text and html files through code. i am getting it to work however, nothing is aligned correctly. it seems that i must make the width of my datareport smaller in order for it to fit properly in a text file. is there any other way around this? i would like to be able to export to different file formats without having to make my reports smaller.

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.

Export Many Reports To Only One File.
Pls help!

If I have many reports can I export it into only one file (for example, We have report named report1.rpt and we export it into the rich text file name rtfTest.rtf. Then we have another report named report2.rpt, can we append it into rtfTest.rtf)

Thanks in advanced.

Export Many Reports To Only One File.
Pls help!

If I have many reports can I export it into only one file (for example, We have report named report1.rpt and we export it into the rich text file name rtfTest.rtf. Then we have another report named report2.rpt, can we append it into rtfTest.rtf)

Thanks in advanced.

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


Export To PDF From VB6.0 Code &amp; Cyrstal Reports 8.5

Originally Posted by brucevde
This is what I use.

VB Code:
Private Sub ExportReportToPDF(ReportObject As CRAXDRT.Report, Byval FileName As String, Byval ReportTitle As String)        Dim objExportOptions As CRAXDRT.ExportOptions     ReportObject.ReportTitle = ReportTitle        With ReportObject        .EnableParameterPrompting = False        .MorePrintEngineErrorMessages = True    End With        Set objExportOptions = ReportObject.ExportOptions        With objExportOptions        .DestinationType = crEDTDiskFile        .DiskFileName = FileName        .FormatType = crEFTPortableDocFormat        .PDFExportAllPages = True    End With     ReportObject.Export False End Sub  Private Sub Command1_Click()        Dim objCrystal As CRAXDRT.Application    Dim objReport As CRAXDRT.Report        Set objCrystal = New CRAXDRT.Application        Set objReport = objCrystal.OpenReport(ReportFileName, 1)    '...code to set report parameters, login information etc...        ExportReportToPDF objReport, "M:TestingBeds.pdf", "Beds Held" End Sub

As I can easily to click a button inside the CR viewer which loaded to a VB form and it can export either to PDF / EXCEL / WORD or email LOCALLY. However, the button just no response when I click it when the same program running inside a Termainl server which installed the CR10 components. Do I need to write the above codes to the program to do it....


Export To PDF From VB6.0 Code &amp; Cyrstal Reports 8.5
Is it possible to export Crystal Reports 8.5 output generated through vb6.0 to PDF format ?
I have Acrobat Adobe Professional 7.0 installed on my machine.

Thanks in Advance

Please Help Me: Export Multiple Reports By One Email
Below is the code to export a crystal report by email:

Dim Report1 As New CrystalReport1

Report1.ExportOptions.DestinationType = crEDTEMailMAPI
Report1.ExportOptions.MailToList = ""
Report1.ExportOptions.MailSubject = "Crystal Report"
Report1.ExportOptions.FormatType = crEFTCrystalReport70
Report1.Export (False)

I'd like to attach several reports in one mail. Does anyone know how to do it? Please help me!



Export Multiple Reports By One Email
Below is the code to export a crystal report by email:

Dim Report1 As New CrystalReport1

Report1.ExportOptions.DestinationType = crEDTEMailMAPI
Report1.ExportOptions.MailToList = ""
Report1.ExportOptions.MailSubject = "Crystal Report"
Report1.ExportOptions.FormatType = crEFTCrystalReport70
Report1.Export (False)

I'd like to attach several reports in one mail. Does anyone know how to do it? Please help me!



Export Reports To Pdf - Multiple Files
I have large SQL Server database (many tables) that has to go to multiple MS Access reports, pdf files, different filenames generated by field from the database table.

Macros cannot do the job, of course. I started with VB.

Made connection string.

I made loop that can choose (for example) cities for pdf filenames (which I take from a table).

For each city it has to make a single report and send it to a pdf file.

Making report is not so complicated, but - how to send it to a pdf printer (one of printers from the list of printers, without a must to configure (for example) cutepdf as a default printer), and how to send the filename for it?

Any good tutorial for this that includes VB code?

Copyright © 2005-08, All rights reserved