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




Maximize Crystal Report Print Preview


How can I maximize Crystal Report Print Preview window automatically.
my code is :
Code:
crListCompCoRep.PrintReport
help pls. Thanks.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Crystal Report : Preview Or Print In C++ Builder
Drear All !

How can I preview or print a CR report in C++ Builder 5 using Crystal Report Engine ?

Thanks.
Hiep

Crystal Report Current Record Print Preview
Dear Guru

i want to ask some theing aboput crystal report
i want to ask that how can i get the print report of the current record which is on the form of the VB how can i get the reprt of the current record by using crystal report
like i have just to filed on my form Name and EmpID
the dat is from Sql server by using ADO
i have a next button and also attache the Crystal report of the same table
suppose
now the data on the for is
Name :johns
Empid= 1234
how can i get the same report by using crystal report
Thanks

Print Preview In Data Report?
is there any way on how to have a print preview from in data report??
if there are any ways, can u teach me how?. tnx

Print Preview Using Access Report On VB
I saw this code in one of the threads. i tried it but it doesn't work perfectly. What I am trying to do is to print preview the report i have in Access. this code will only flickers or flash the report form in sec then gone. can somebody help me, what is wrong or why the report doens't stay to view?





visual basic code:--------------------------------------------------------------------------------
Public Sub RunAccessReport(strDB As String, strReport As String, _
Optional strFilter As String = "", Optional strWhere As String = "")
'===============================================================================================
Dim AccessDB As Access.Application

Set AccessDB = New Access.Application
AccessDB.OpenCurrentDatabase strDB
AccessDB.DoCmd.OpenReport strReport, acViewPreview, strFilter, strWhere
AccessDB.Visible = True
Set AccessDB = Nothing

End Sub

code above thanks to IROY55


thank you very much.

Maximize Crystal Report TTX (RESOLVED)
I am using COM cpeaut32.dll to activate a crystal report developed using TTX. How can I maximize the report viewer window when this is invoke. See code used. Report is already running.

--------
Dim app_crw As CRPEAuto.Application
Dim crw_Database As CRPEAuto.Database
Dim crw_Tables As CRPEAuto.DatabaseTables
Dim crw_Table1 As CRPEAuto.DatabaseTable
Dim crw_report As CRPEAuto.Report

Set app_crw = CreateObject("crystal.crpe.application")
Set crw_report = app_crw.OpenReport(strReport)
Set crw_Database = crw_report.Database
Set crw_Tables = crw_Database.Tables
Set crw_Table1 = crw_Tables.Item(1)
crw_Table1.SetPrivateData 3, rst

On Error GoTo CreateErr
If bln_PrintMode Then
crw_report.PrintOut
Else
Set crw_View = crw_report.Preview
Set crw_Window = crw_View.Parent
End If
--------

How To Maximize Crystal Report Screen ?
I am viewing Crystal Report through using
Automation Server in VB6.0 with the codes
below.

With crpReport
.Preview
End With

When .Preview is called, report is displayed with minimized screen.

How can I maximize the screen of the
report ?

Is it through PrintWindowOptions?
Is there any website that has a list of all
the functions in CPREAuto?

Where can I find what does
PrintWindowOptions does or any other API
that I call

But most importantly how do I maximise the report when Preview is called without manual intervention?

I have posted this question in Crystal101 forum too but no reply.
Please let me know if the above is not clear

Thanks in advance.


 

Crystal Report Preview
when I send a report to the printer using:
CrystalReport1.PrintReport
it prints ,but after I would like to preview the report,is that possible?

Thank you and have a nice work

Preview Crystal Report
i have problem , when i use crystal report ,in my
computer it's a good report, when i use the other
computer to preview it, the report become trouble,

Data Report Print And Preview In Landscape
Any known how to set the Data Report as landscape? Thank you in advance.

How To Preview In Crystal Report During Runtime?? HELP!!!
I am using Visual Basic 6.0 and Crystal Report 8.5
Currently, i am saving and printing the report without having any preview for user to see.

Is there a way for previewing the report such that, (for example, Name or Company) can i assign the value to the Formula that i have created in the reports and then preview it "live"? As in, for example, if the focus is lose on the "Name" field, then the preview will show the value of Name immediately?

I am trying to use CRViewer for this. But i am encountering problems. How to pass value of the name to the Formula in the report?

Is there a method in doing this?

Any help is greatly appreciated.
Alan

Crystal Report Preview Problem
In the old days using CR 4.6, if I preview a report by using .Action = 1
it seems that the main program will continue only after I shutdown the preview window (correct me if I am wrong)
but in CR7.0, the program continue running even after I executed .Action = 1
This cause trouble since my program is going to terminate after viewing the report

Do anybody knows how I can pause my program when CR is running?

Thanks

Crystal Report Preview Window From VB
More or less, I have the following code:

Sub Command1_Click

CR.ReportLayout = .....
CR.Action = 1
Unload Me

End Sub

in my visual basic, whenever I run it, it has the Crystal Report preview window flash and then the program (include the preview window) terminated.

How I can display the preview window, and until the user close the preview, and then my vb unload the form(end the program)

Thanks

Detect Print Of Access Report From Preview Mode?
Is there a way to detect when a user has printed a report from Access 2002 when the report is in Preview mode? I need to do this from within Access. Thanks for any assistance.

Disabling Print Option In Date Report Preview
Is it possible to disable the print/export option in data report or crystal report on preview?

If possible pls let me know... can you give me sample codes..

Thanks!

How To Make Print Preview Of Listview With Datadynamics Active Report?
Im using Datadynamics Active Report Professional Version 2, All I want to do is that I want to make report preview and print all the contents of listview (in report mode). Please tell me how to do that.
Thank you!
saracjl

Can't Start Preview Of A Crystal Report From Access
Hello,
I am trying since 2 days and have no solution..
I would like to start a preview of a Crystal Report (using Cr Developer 9) by clicking on a button in an acces 2k form. The problem is that VBA tells me that CRViewer is not defined..

I made a script for direct printing on a second button (event click) and this one works fine.

Code:
Private Sub Befehl2_Click()
On Error GoTo Err_Befehl2_Click
Dim dbs As Database
Dim qdf As QueryDef
'Variable for Crystal Report App
Dim CRXApplication As Object
'Variable for Report-Object
Dim CRXReport As Object



'Interface to Database
Set dbs = CurrentDb

'Write choice
dbs.Execute "UPDATE [dbo_T_Batch_Nr_Rapport] " _
& "SET [Batch_Nr_Rapport] = " & [Batchnr]
dbs.Close

'Create Object of Crystal Report
Set CRXApplication = CreateObject("CrystalRuntime.Application")
'Create Object of Report
Set CRXReport = CRXApplication.OpenReport("C:CIMPLICITYHMIProjectsSaCUBatchrapportBatchRapport.rpt")

'Print!
CRXReport.PrintOut True


Exit Sub

Err_Befehl2_Click:
MsgBox "Printing not possible!"

End Sub
My script for the ****ed preview:

Code:
Private Sub Befehl49_Click()
On Error GoTo Err_Befehl49_Click
Dim dbs As Database
Dim qdf As QueryDef
'Variable for Crystal Report Application
Dim CRXApplication As Object
'Variable for Report-Object
Dim CRXReport As Object

'Interface to Database
Set dbs = CurrentDb

'Ausgewählte Batchnr in Tabelle schreiben
dbs.Execute "UPDATE [dbo_T_Batch_Nr_Rapport] " _
& "SET [Batch_Nr_Rapport] = " & [Batchnr]
dbs.Close

'Create Object of Crystal Report
Set CRXApplication = CreateObject("CrystalRuntime.Application")
'Create Object of Report
Set CRXReport = CRXApplication.OpenReport("C:CIMPLICITYHMIProjectsSaCUBatchrapportBatchRapport.rpt")

'Report Object to CRViewer
CRViewer.ReportSource = CRXReport

'Set view-options
CRViewer.DisplayBorder = False
CRViewer.DisplayTabs = False
CRViewer.DisplayGroupTree = False

'Show buttons
CRViewer.EnableExportButton = True
CRViewer.EnablePrintButton = True
CRViewer.EnableRefreshButton = True
CRViewer.EnableZoomControl = True
CRViewer.EnableGroupTree = False

'Show report
CRViewer.ViewReport

'Wait 'til created
Do While CRViewer9.IsBusy
DoEvents
Loop

Exit Sub

Err_Befehl49_Click:
MsgBox "Preview not possible!"
End Sub
I hope someone can help me
Thank you very much!
aWAKEning

Crystal Report Preview Displays For Less Than 1 Second Then Closes
I have been working with VB and Crystal for 6 months, so am relatively new.

System I enherited is VB 6.0, Crystal 8.0.

After making extensive changes to a form, the Crystal Report displays in preview mode for a very short time then closes. There are no errors, and the report looks good (I have fast eyes). If I print directly on the printer w/o preview, the report is fine.

Other forms in the project preview correctly, just this one form immediately collapses the preview.

Can anyone give me some help? Portion of code enclosed.

When I use the original version of this form, the preview stays on screen until user prints or cancels.

Code:Public Sub PrintReportImmediately()
    
'Declare Variables
    Dim ServerName As String
    Dim PrintResult As Integer
    Dim ConnectId As Integer
    Dim intArrayEnd As Integer
    Dim intArrayIndex As Integer

    Const PRINT_SUCCESS = 0
    
    crptLetters.Destination = crptToWindow
'Main
    ServerName = ODBC_TARGET
    crptLetters.ReportFileName = REPORT_PATH & strCrystalReport
    crptLetters.PrinterSelect
    
    crptLetters.Destination = crptToWindow
    
    ConnectId = crptLetters.LogOnServer("pdsodbc.dll", ServerName, ServerName, "", "")

    'first parameter is always the client number
    crptLetters.ParameterFields(0) = objCrystalReportParmName.Field(1) & ";" & CStr(frmClientMain.CmObj.RecordId) & ";True"

    intArrayEnd = txtClfEdit.Count
    For intArrayIndex = 1 To intArrayEnd - 1
        If objCrystalReportParmName.Field(intArrayIndex + 1) <> EMPTY_FIELD Then
            If objDataType.Field(intArrayIndex + 1) = "DATE" Then
                crptLetters.ParameterFields(intArrayIndex) = objCrystalReportParmName.Field(intArrayIndex + 1) & ";" & uvSession.iconv(dtpDate(intArrayIndex).Value, "D") & ";True"
            ElseIf objDataType.Field(intArrayIndex + 1) <> EMPTY_FIELD Then
                If crptLetters.ParameterFields(intArrayIndex) = EMPTY_FIELD Then
                    crptLetters.ParameterFields(intArrayIndex) = objCrystalReportParmName.Field(intArrayIndex + 1) & ";" & txtClfEdit(intArrayIndex).Text & ";True"
                Else
                    'this is where we concatenate creditor and debt number
                    crptLetters.ParameterFields(intArrayIndex) = objCrystalReportParmName.Field(intArrayIndex + 1) & ";" & UCase(objCrystalReportParmName(intArrayIndex + 1).Field) & "*" & txtClfEdit(intArrayIndex).Text & ";True"
                End If
            End If
        End If
    Next intArrayIndex
    
    PrintResult = crptLetters.PrintReport
    If PrintResult <> PRINT_SUCCESS Then
        FileMessage = MsgBox("Print Failure " & PrintResult & ": Contact Technical Support", vbCritical + vbOKOnly, "System Error")
    End If

End Sub



Edited by - Dick Kryka on 10/8/2003 10:40:30 AM

Program Problem Needs Fixed Fast!! Please Help {Access Report Print Preview}
I have a program that has a couple problems that have to be fixed yesterday.

I need to get the program to do a print preview or page setup (be able to specify which pages they want to print, like pages 23-31 of 45 or page 27 of 45) Can anyone help me with code that does this without giving them access to the whole database.

The code that i am using currently is:


If txtSpot.Text = "" Then
Else
'Set index property required for seek
datMachine.Recordset.Index = "spotnumber"

'Seek a record in the task table to see if the spot number exists
datMachine.Recordset.Seek "=", txtSpot.Text
If datMachine.Recordset.NoMatch = True Then
MsgBox "Please enter a valid machine spot number"
txtSpot.SetFocus
Save = False
Action = vbDataActionCancel
Exit Sub
End If
lblspot.Caption = txtSpot.Text
datDate.Recordset.Edit
datDate.Recordset.Update
End If

If Timer1.Tag = "" Then
Timer1.Tag = "4"
Timer1.Enabled = True
Exit Sub
End If

'Prints the Task Report from Access to the users default printer
Dim objAccAppl As Access.Application
On Error GoTo ErrorHandler
If txtSpot.Text = "" Then
Set objAccAppl = GetObject("C:dp283dp283.mdb")
objAccAppl.DoCmd.OpenReport "task", acViewNormal
Else
Set objAccAppl = GetObject("C:dp283dp283.mdb")
objAccAppl.DoCmd.OpenReport "task2", acViewNormal
End If
Timer1.Tag = ""

Exit Sub
ErrorHandler:
MsgBox "Please make sure that the printer is on, has paper and is not currently in use"


I can do a print preview with this code:

'added changes to test for print preview
'***************************************
'Set objAccAppl = GetObject("C:dp283dp283.mdb")
'objAccAppl.DoCmd.OpenReport "task", acViewPreview
'objAccAppl.Visible = True
'
'If vbOK = MsgBox("Continue with print?", vbOKCancel) Then
'Else
' Unload Me
' End
'End If
'
'objAccAppl.DoCmd.OpenReport "task", acViewNormal
'
'objAccAppl.Quit acQuitSaveNone
'Set objAccAppl = Nothing
'***************************************
'end of changes

but it lets you do a print preview in Access of the report that is selected. But this also lets them roam free in the database. The can close the selected report or hit design view or any other things that you can do if you just double clicked on the actual database. I only want them to be able to see the report and then pick a page or range of pages to print from.

Another problem that I am having is:

The problem is that when it prints, it first prints the report very about 3 inches by 2 inches in the top left corner. It is the full page and everything is correct but it just prints the whole page really small in that corner. On the second try of printing the report it prints fine. Is there any fix for this?


PS
I was told that this problem is supposed to be in a printer forum? I cannot find a forum dedicated to periphals or printers, so I am posting here. If you know where I am to move this thread please e-mail me or pm me.

Thanks for all of your help,
Richard

Passing And Displaying Formatted Report Criteria To MSAccess Print Preview
Hi all,

I'm attempting to preview a report using MSAccess Run-Time Onlyfrom Visual Basic 6.

I have report criteria like:

UserName = "Barry"
FromDate = "2003 08 04"
ToDate = "2003 08 04"

strRptName = "Time Card"

strWhere = "UserName = 'Barry' and FromDateNum = 37837 and ToDateNum = 37837

strFilter = "" 'no filter

intDisplay = acPreview

objAccess.DoCmd.OpenReport strRptName, intDisplay, strFilter, strWhere

On the Time Card report I have a control named "FormattedReportCriteria".

I want to pass my formatted criteria text the "FormattedReportCriteria" control:

User: Barry
From: August 4, 2003
to: August 4, 2003

Does anyone know how?


Could I get anyone to acknowledge that they understand this question?

Preview Current Data From Vb Form To Crystal Report
hi..i need a little help here. i want to priview and print record which i enter the parameter or primary key in visual basic form and crystal report will display only data that match the parameter. how to do that? can u help me..
i use sql server as my database and crystal report 9.

Crystal Report... How To Print Crystal Report Using PrintDocument??
Hi.. I need help greatly... there's an issue which required me to make use of the PrintDOcument Object to print this crystal report..Instead of the pre defined printer button on the crystal report viewer..???Can anyone teach me HOW to print crystal report using the print document??it just seems to can't capture the crystal report for printing.... ANd how do i make use of the PrintPage Event???

What's Logon Parameter To Oracle Server With Vb To Print Report With Crystal Report
Hi all,

How to write a log on parameter to oralce server with using vb to print a report that using crystal report

is it crystalreport1.connect = "Dsn=servername;uid=username;pwd=password"

and how to use the selectionformula

Show Print Dialog When Printing Report With Crystal Report
Hi there,

In my code when I press on the printing button I want it to show the printing dialog to choose printer and tray which I will print out.

My code like this:

Public Report As CRAXDRT.Report
Set Report = crxApp.OpenReport(App.path & "Data
ptBDM.rpt")
Report.PrintOut true

With these code it only let me choose from page to page not for printer and tray.

Thanks a lots.

Using Print Engine API To Print Crystal Report From VB
I am trying to run a Crystal Report (ver 7) from a VB app (ver 6) using the
Print Engine API.
The report links to tables in an Oracle (ver 7.3.4) database via ODBC.
I use VB to collect the parameters to pass them to the report.
All seems to work fine until the end of this code when I try to display the
report.
The report window opens momentarily, then closes.
The last MsgBox reports an error code of 599.
I have been able to determine that apparently I need to Logon to the server.
However, there is not enough documentation on how to use PELogonServer or
PESetNthTableLogOnInfo.
Can someone enlighten me or at least point me to some decent reference
material?

'''### copy of code ###'''
Dim txtValu(2) As String
txtValu(0) = txtSDate.Text
txtValu(1) = txtEDate.Text
RptName = App.Path & "SO_003.rpt"

ParamInfo.StructSize = PE_SIZEOF_PARAMETER_FIELD_INFO
valueInfo.StructSize = PE_SIZEOF_VALUE_INFO

Handle = PEOpenEngine
job = PEOpenPrintJob(RptName)
ParamNum = PEGetNParameterFields(job)
For i = 0 To (ParamNum - 1)
Result = PEGetNthParameterField(job, i, ParamInfo)
valueInfo.valueType = PE_VI_DATE
valueInfo.viDate(0) = Year(CDate(txtValu(i)))
valueInfo.viDate(1) = Month(CDate(txtValu(i)))
valueInfo.viDate(2) = Day(CDate(txtValu(i)))
Result = PEAddParameterCurrentValue(job, ParamInfo.Name, _
ParamInfo.reportName, valueInfo)
If Result = 0 Then
ErrorNum = PEGetErrorCode(job)
MsgBox "The call PEAddParameterCurrentValue failed"
MsgBox "The error code is: " & ErrorNum
End If

Next i
Handle = PEOutputToWindow(job, RptName, 0, 0, 520, 520, 0, 0)
If Handle = 0 Then
ErrorNum = PEGetErrorCode(job)
MsgBox "The output cannot be sent to the window"
MsgBox "The error code is " & ErrorNum
Else
Handle = PEStartPrintJob(job, True)
If Handle = 0 Then
ErrorNum = PEGetErrorCode(job)
MsgBox "An error occurred while trying to start the Print Job."
MsgBox "The error code is " & ErrorNum
End If
End If



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~

Crystal Report, Print 3 Diff Copies Of A Report
Dear Friends

I am using crystal report 8 in visual basic 6, back end access 97. I want to print 3 copies of Invocie. Like first copy should be marked as "Original" Second "Accounts" and third "Record Copy".

I tried a lot but could not succeed. Please check out this

Zubair Khan

Print A3 Report In A4 Size For Crystal Report
Hi, i do have a hugh report designed for A3 paper, how could i get it printed on an A4 size paper?
i.e. the overflown portion is printed on a second A4 paper.

any suggestion is appreciated

Print An A3 Report On A4 Paper For Crystal Report
Hi, i do have a hugh report designed for A3 paper, how could i get it printed on an A4 size paper?
i.e. the overflown portion is printed on a second A4 paper.

any suggestion is appreciated

Help Crystal Report Print Stock Report
I am using Visual Basic 6.0 and Crystal Reports 8.5 for my Stock project.
I would like to ask how to produce the following report :

Date     Invoice Item     Quantity Metric
--------------------------------------------
01-09-04 A     A001     1500 Kilogram
02-09-04 B     A001     100 Gram
     ----------------------------------
     Subtotal :        1 Ton
             500 Kilogram
             100 Gram
     ==================================

03-09-04 C     B001     20 Piece
     ----------------------------------
     Subtotal :         1 Dozen
             8 Piece
     ==================================

I already have these functions to convert the values :

Function ConvertToSmall(Item, Quantity, Metric)
     ConvertToSmall(1500100, grams) 'For Item A001
End Function

Function ConvertToLarge(Item, SmallQuantity)
     ConvertToLarge=Array(3,2) -> (1,Ton), (500,Kilogram), (100,Gram)
End Function

These functions can also be used for the B001 with
the metric conversion (Dozen, Piece, Gross) = (12,1,144) in which
1 Dozen = 12 Piece, 1 Gross = 12 x 12 = 144 Piece.

And does the 8.5 version support the bar-code printing?

I would really appreciate if anyone could help me.
thanks

Print Preview Access Report In Vb 6 Without Access
I 'd like to have a print preview of my access report. i know how to print but i can't display it without opening access. it has to be able on a system without access. i hope this is posible

this is the code to print it:

Private Sub Command1_Click()
Dim appAcc As Object

Set appAcc = GetObject("g:gip kilometervergoedingkilometervergoeding.mdb")

appAcc.DoCmd.OpenReport "adreskm"
End Sub

pc-er2920

Print Crystal Report..!
How can I print 2 copies of report per 1 page..?
Help me plz!
Thanks!

Crystal Report Do Not Print
Using Crystal Report 8.5

I have no problem printing on my program while I was testing it and even when I have package and setup to my pc. I setup to another computer and there are no error in Installation. Problem occur when I tried to print, the printer icon shows on system tray then suddenly gone. There were no error message but it did not print anything. Please see codes below.

CrystalReport1.Reset
CrystalReport1.Destination = crptToPrinter
CrystalReport1.DataFiles(0) = App.Path & "myDatabase.mdb"
CrystalReport1.Password = Chr(10) & "myPassword"
CrystalReport1.ReportFileName = App.Path & "myReport.rpt
CrystalReport1.DiscardSavedData = True
CrystalReport1.PrintFileType = crptCrystal
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1

I guess it was only printing in my PC because I have Crystal Report. I’m also thinking that I might be needing some files or DLL’s of Crystal Report.

Any help will be highly appreciated.

Thanks

Print A Crystal Report From Vb
before i used crystal report
i had access report and printed it from vb withinh the prog with preview button on a form
is there a way to do this with crystal report
hope i have given enough info but newbie to this
cheers
Doug
this is the code i used

Code:Private Sub Command1_Click()
Const strLcREPORT_NAME As String = "race"
Const strLcFilePathName = "C:pigeonsirds.Mdb"
    Me.Command1.Enabled = False
Set udfMvAccess = New Access.Application
udfMvAccess.AutomationSecurity = 1
' Open Database
    udfMvAccess.OpenCurrentDatabase (strLcFilePathName)
    ' Open Report
    udfMvAccess.DoCmd.OpenReport strLcREPORT_NAME, acPreview
    ' Ensure Report Is Visible
    udfMvAccess.Visible = True
    Me.Command1.Enabled = True
End Sub


vb6 and access 2003
also newbie
may the force be with you

Edited by - dougvcd on 7/25/2005 11:01:12 AM

Best Way To Print With Crystal Report 8.5 + VB6
Good day,

This is my first post and hopefully some experts can solve my issue:

My friend is using Crystal Report 8.5 to create the reports (.rpt) and he is using Active Data Source (ADO) to select the records. E.g. Customer Information data from Table_Customer.

In my VB project, I will provide a customer information maintenance screen and a print button that allows the user to key in the customer code, read, update the information and print the amended record. I am using ADO connection and recordset to retrieve and update the records.

When I tried to Crystal Report component on my form, i found that I cannot use the ADO recordset as my Crystal Report Data Source. As I found another solution from the CR website and these are the codes that I am using :

    Dim CRXApplication As New Craxdrt.Application
    Dim CRXReport As Craxdrt.Report
    Dim CRXDatabase As Craxdrt.Database

    Set rsRecord = New ADODB.Recordset
    strSQL = "SELECT * from Customer where Cust_Id = " & "'" & txtCustID.text & "''
    Set rsRecord = cnADO.Execute(strSQL)
 
    Set CRXReport = CRXApplication.OpenReport(App.Path & "Customer.rpt", 1)
    Set CRXDatabase = CRXReport.Database

    CRXDatabase.SetDataSource rsRecord, 3, 1
    CRXReport.PaperSize = crPaperA4
    CRXReport.Database.SetDataSource rsRecord, 3, 1

    frmPrint.CRViewer1.ReportSource = CRXReport
    frmPrint.CRViewer1.ViewReport
    frmPrint.Show

My Questions :

1) There is no "Preview" option for CRXReport. I have to use the CRViewer in order for me to preview my report. Anybody know is there a setting/option to do that ?

2) How do I pass a text string to Crystal Report ? E.g. The customer is a guy then I will send "Mr. " else "Madam". Do I need to create a text object in Crystal Report ? What is the syntax to pass my string value to that particular text object.

3) This is a only a simple recordset and if I have a recordset that is selected from 2 tables then how do I pass the recordset to Crystal Report ?


May be the way that I am using now cannot be used to solve all the issues that I have faced. Is there a better way of doing these things ?


Many thanks,
Yang

Can Not Get A Crystal Report To Print
Can you think of any reason (beyond the obvious), as to why a Crystal Report that
works fine from the Crystal Reports Application(ver 4.6) refuses to print inside of a visual Basic
application(VB 5.0) using the PrintReport method?

I Used a line like this... CrystalReport1.PrintReport .... to attempt to print.

It "seems like it should be extremely straight forward and I've looked at many examples
and followed them without success.

Also, where can one get a newer versin of Crystal reports?

Thanks

What Is The Best Way To Print A Crystal Report
I am trying to print a report designed in crystal reports to print the contents of a database. I use the code


Private Sub cmdPrint_Click()

crReport.Action = crRunReport

End Sub


given in a book, but I get an error. Where am I going wrong and how do I rectify it

Problem With Print, Page Setup, And Print Preview In A Text Editor...
Yes, I have another question.

When I use these exact same functions (with WebBrowser.ExecWB in place of txtScrapbook.Text) in my web browser, it works perfectly. But when I use them in reference to a text box, it doesn't.

Can you tell me where the problem lies, or give me an alternative method? I have a common dialog box already for other functions, so feel free to make use of it if you need to. Thanks.

Code:Private Sub PageSetup_Click()
txtScrapbook.Text OLECMDID_PAGESETUP, OLECMDEXECOPT_DODEFAULT
'opens page setup dialog
End Sub

Private Sub Print_Click()
txtScrapbook.Text OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
'opens common dialog box prompting user to print current web page/parts of current web page
End Sub

Private Sub PrintPreview_Click()
txtScrapbook.Text OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DODEFAULT
'opens print preview dialog
End Sub

Problem In Using VB To Print Crystal Report
I am a crystal report newbies and I am writing a program that use VB6 to print some records by crystal report template. At first when there is no formula in the report. I can use the code
crOK.printReport
to print the report. However, when I change the formula in the crystal report twice, I cannot print the report out.
I have attached the copy of the testing file in this post. Can anyone help me?..
Thank you very much!!

How To Print Picture In Crystal Report
Dear All:

I stalled the image in the table with a link only(not the picture), how can I print the picture with crystal report 9.0, can someone help, thanks

Andy

Print Problem Using Crystal Report
Hi, all

I'm using the embedded .dsr(crystal report 8.5) within VB6,
The followint code:


private sub cmdPrt_click()
Dim rpt As New dsrCrystalReport1
rpt.PrinterSetup Me.hwnd
rpt.PaperOrientation = crLandscape
rpt.PrintOut false
end sub


when I click the cmdPrt button, the printer setup dialog comes out,
when i click OK button on printer setup dialog, my report will be
printed out, if i click Cancle button, the report still be printed.
so i want my code to be changed to

private sub cmdPrt_click()
Dim rpt As New dsrCrystalReport1
rpt.PrinterSetup Me.hwnd
if cancel button on printer setup be clicked then
exit sub
end if
rpt.PaperOrientation = crLandscape
rpt.PrintOut false
end sub


how can I get information or variable that the cancel button be clicked?
the only way I can cancel printing report is following code?

private sub cmdPrt_click()
Dim rpt As New dsrCrystalReport1
rpt.PrinterSetup Me.hwnd
rpt.PaperOrientation = crLandscape
rpt.PrintOut True
end sub

the printer setup dialog comes out first, then printer dialog comes, I
click cancel button on printer dialog. I don't want this way.


Can someone help?
Thanks

Hope

Crystal Report Datagrid Print...?
Hello...

I'm new in Crystal Reports (and VB).
I would like to print data from DataGrid trough Crystal Reports ?
Data in DataGrid are shown from SQL query with Adodc.
Any ideas?

Thank you.

Print Picture In Crystal Report
Hi,
How can i print picture in Crystal Report 9.0. i have stored my picture in database field. i m using SQL Server 2000. i want to show that picture in crystal report
thanks

How To Print Crystal Report Directly?
I usually have a form in Visual Basic 6 with CR Viewer control, where I allow the user to preview the report and then print it through the CR Viewer. The user now want to print the report directly when he hits the OK button (which do other functions as well) without needing to view the report (which he trusts will be OK anyway). Unfortunately, none of my VB books as well as my Crystal Report books teach me how to do that. Any suggestion where to start first? I am using VB 6 and CR 8.5.

Way To Print Reports Without Crystal Report
hi,
i looking for a way to print some "reports" without using the crystal report with vb6 there is any way?
thanks a lot

Crystal Report Print Page ??
I want to print specific pages in my crystal report from VB6 ?

The report has 20 pages and i want to print page number 1,5,7,9 and 11.
Is this possible ?

I need help urgently.
Thanks in Advance

Opening A Crystal Report And Print
I have a report i want to open with vb. After the report is opened i want to print it right away and then close it. Anyone know how to do this. I don't want the users to interact with crystal. Just want to open and print the report. Thanks for the help!!

Print With Crystal Report On PDF-Writer
Hi All,

does anybody know how to set filename and filepath ?

CU
Kreuzfeld

Print Button In Crystal Report
How do I Know When user click Print button on report screen.(What Event trigger when The print button was click.

Scripts To Print From Crystal Report
hi all...
can anybody help me how to print reports using crystal report.

Print 2-sided Crystal Report From VB App?
I have a VB Application that uses the Crystal Reports 8.5 OCX control to view and print a crystal report.  Currently it prints single-sided.  My users have asked if I could make it print double-sided to save paper.  Is there a way I can make the Crystal OCX control print double-sided?  (The printer can do this, BTW).

Thanks for any help you can offer.


CraigHartz

Copyright © 2005-08 www.BigResource.com, All rights reserved