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




How To Use CRViewer?


Hi All,

I need to view the reports in the child windows. But,
How to use CRViewer ?
How to link CRViewer to CR file?

Thanks and best regards,

Amaraa




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Crviewer
hi can anyone help me? my CRVIEWER does not Print the reports? i dont see any error on my program. it does not even initialize the printer, im using crystal report v8.0

THANKS

CRViewer 8.5
Hi,
Trough VB application when i am calling CRviewer Report all the DATA'S r comming perfectly.. problem is all the objects which have in reports its comming with the Tooltips.
for eg.. Normal Caption showing == Text Object,
Fields it is showing the table name and fileds name...
I want to remove the Tooltips

In Crystal Report === File->Option->Layout->Show Tool Tips in Preveiw it is UNCHECKED... but still it is comming.

Thanks in advanced

CrViewer
How can I programatically set the toggle Group Tree to be off? It defaults to being on.

Crviewer
Hy,
I am working with crystal report 8.5, I want to be able to catch the field I am working with.
I am beeing able to catch the name of the field and the text in side, but what I want is to catch the field its's self.
Because what I want is to be able to change the fon in the minner way possible, what I mean is the following.
Suppose in a report I have the field fbname.

I have the opporunity to do the following:
report.fbname.font.italic = true and so on.
this is great for a particular case whae I know the field.

If I want to generalize, I want to catch the field, I am beiing able to catch the field name, at the click in the crviewer as follow:
Report.Database.Tables(1).Fields(Field).DatabaseFieldName
but this return the field name, not the field itself, and it's not logic to check for the field name, and sent the corresponding field each time.

I hope I was clear, sorry if it was long, but trying to be as much clear as possible.

Thanks for your help.

CRViewer
I need to pass the SelectionFormula and/or GroupSelection Formula similar as using the Crystal Control but now with the CRViewer, How may I do this????

How To Use CRViewer
hi all.
i have a problem for using CRViewer in my application.
how to use CRViewer on VB.6
Database : M. Access
thanks

CRViewer And VB
I am using the CRAXDRT.dll and the Crystal Report Viewer control (crviewer) to view a crystal report object which is connecting to my SQL database via a native connection (the report runs off a stored procedure). The reports were running ok last week but now any report that has parameters receives the following error message when I try to view the report (after passing the parameters):

"Server has not yet been opened"

The application runs off of one database but the reports run off of a different database (don't know if that makes a difference to anyone). Like I said, reports that do not have parameters, run just fine...it's only the reports that have parameters to be passed that error out. I have tried using the SetLogOnInfo method of the tables object as well as the LogOnServer method of the database object and neither work. I also have tried modifying the reports to use an ODBC connection or an OLE DB connection but I receive the same error. Can anyone help me out with this?

Crviewer
Hy,
I am working with crystal report 8.5, I want to be able to catch the field I am working with.
I am beeing able to catch the name of the field and the text in side, but what I want is to catch the field its's self.
Because what I want is to be able to change the fon in the minner way possible, what I mean is the following.
Suppose in a report I have the field fbname.

I have the opporunity to do the following:
report.fbname.font.italic = true and so on.
this is great for a particular case whae I know the field.

If I want to generalize, I want to catch the field, I am beiing able to catch the field name, at the click in the crviewer as follow:
Report.Database.Tables(1).Fields(Field).DatabaseFieldName
but this return the field name, not the field itself, and it's not logic to check for the field name, and sent the corresponding field each time.

I hope I was clear, sorry if it was long, but trying to be as much clear as possible.

Thanks for your help.

CRViewer
Is there a way to expand the zoom combo box on the CRViewer control to hold 3 numbers such as 100%? Presently, when you choose 100%, all you see is 00%.

Use Of CRViewer
what is the use of control - CRViewer ?

Crviewer Control
Im trying to make a report and i was told to add a crystal report to the project but.. i cant find where the control is to add. any help?

Crviewer.dll,crystl32.ocx
Does anyone know where can i get these files? or can someone post them? Thanks.

crviewer.dll
crystl32.ocx

CRViewer Problem
HI to everyone. I have a problem with crviewer. The exact problem is that I am not able to connect it with the report I have made in Crystal Report. I can use a crystalreport controler but it shows the report in a diferent window. What I want is to display the report as a MDI child form.
PLZ Help me.
Thanks in advance and have a nice day.
PS: Because I had a problem with uploading my program you can download it from:

http://www.geocities.com/netvirusus/...stalReport.zip

CRViewer Question
Hi folks,

I have generated crystal reports which can be grouped a number of ways. The problem is, is that each grouping has its own form with the CRViewer so I have four or five forms that show the same data, but grouped differently. This is making the App excessively large so I want to be able to show the report from one viewer to cut down the number of forms.

My theory is that I should be able to assign a report to the viewer programmatically but this is proving not quite as simple as it sounds. I am using CR 8.5, VB 6.0 SP5, and the DataEnviroment to crearte the recordsets.

Any help would be greatly appreciated.

Crviewer Refresh?
I have problem with my vb program using crviewer to display crystal report, i cannot refresh the the content of the report. please help thanks

Working With The CRViewer
Ok, i've done my research everywhere I could think possible, including searching this entire forum. I've tried MSDN's website, VB Help....nothing appears to have my answer, in fact, it is the most basic part of using Crystal Reports and viewing them from what I can tell

How do I get the Crviewer to work.....in previous projects I used Snapshot Viewer to view all my reports, but that was because all the reports were already in Access....

We are using SQL Server to hold our database, i'm connecting using ADO, and i'm in the process of learning Crystal Reports to do all the reporting.....how in the world do you simply show a simple report that has been generated in Crystal. I don't care about passing parameters at this point, there is plenty of help out there concerning that....

I as under the assumption that you simply do something like this:


Code:
CRViewer1.ReportSource = "C:ReportsReport1.rpt"
CRViewer1.ViewReport

but I get a Type mismatch error when i do that.....someone please help

How To Close Crviewer?
hy, i'm new with crystal report v8. I use vb6 sp6 with cr v.8
i use a crviewer to show my report but after i execute

crviewer1.viewreport

the close button is always disabled so i can't close the crviewer form.
I can i solve this problem?
thanks

CRViewer Print
Can anyone help.

I am using the CRViewer to show my reports.
When in the viewer i want to be able to print to any printer.
However when i select the print icon from the viewer it does not give me the option to change the printer.
Is there any way i can capture the click of the print icon and put in a call to a print dialogue ?

Thanks

Ian.

Reporting With CRViewer In VB App
I have a little problem with crystal report 8.5 using vb 6.0 application.
This is my code :

Dim crxapp as new craxdrt.application
Dim crxrep as craxdrt.report

set crxrep=crxapp.opernreport(app.path & "/myrep.rpt")
crviewer1.reportsource=crxrep
crviewer1.viewreport

My problem is how to build this application in client side without install
the crystal report application? Because if the crystal report is not installed
the error is "ActiveX could't create the object". Thank's.

CRViewer And Query
I'm new to programming and VB 2005 and have a few questions....

1. I'm trying to write a program in VB2005 with CRViewer. I can get CRViewer to display the to display the table in the Access database, but I would only like to dsiplay a select record.

2. Is there a way to use VB2005 to copy a field to another field. Example, copy CurrentTime to OldTime.

Thanks,
Tony

Crviewer & Some Properties
using cr7 with vb6
report is working, but two small problems
1) i can not get the crviewer 'form' to maximize unless i click the resize button - i would think the code within the 'with - end with' would do it'
2) the form that contains the crviewer report - how do i change the name
it now is called 'form1' and how do i hide the controls(close,max,min)
my code is:
With CRViewer1
.Top = 0
.Left = 0
.Height = 10815
.Width = 15360
.EnableCloseButton = False
.EnablePrintButton = True
.EnableStopButton = False
.EnableGroupTree = False
.EnableRefreshButton = False
.EnableGroupTree = False
.ViewReport
Do While .IsBusy
DoEvents
Loop
.Refresh
End With

thanks in advance,

otom

Crviewer Problems
Hey all

I have an issue with the CR references in my application. I am trying to just run a small app that calls the CR viewer and display a report. Of course, on my machine since I have all the correct .dll and such do to having CRX on my machine, it is no problem. But on a clean testing environment i am getting the crviewer.dll not correctly registered error. Now initially this was thought to be a deployment issue but I am afraid I may not have the correct references in place. With the viewer I am using the CR viewer control with is the .oca(which i assume comes with the crviewer.dll). Also I am using the CR ActiveX Designer Run Time Library 10.0 as CRX is the version I have on hand.

My question is this: Is there another reference that is needed in order for this to actually work on a non CR loaded machine? I do assume that this is possible to do on a machine not running Crystal. If this is not true, how would I go about setting the application up to pull the CR info from the server that the program is hitting anyway so the viewer will work as intended.

Thanks

CRVIEWERLibCtl.CRViewer
Hi,

I have a project in VB 6.0. At the time of loading it gives an error:

Line 13: Class CRVIEWERLibCtl.CRViewer of control CRViewer1 was not a loaded control class.

Can anyone let me know the cause and the solution also. I have registered the CRViewer.dll but do not have Crystal Report installed.

Regards
DP

Need To Clear My CRViewer
I preview my report and it has a quantity of 20 on it. I decide to change this quantity. So I close the report and I change the quantity to 15. I preview the report again but the quantity is still 20. I am saving the data before I preview. I am also setting the CReport object to nothing when I print or Close the preview screen.
I am using VB v6, Crystal 8.5 pro, MS Access 2000. I am using ODBC drivers to link my Crystal report to the Database.

The only thing that works is when I exit and reload my application .... not an ideal solution. Any ideas??

Code:
Private Sub Preview()

Call cmdSave_Click

Set CReport = CApp.OpenReport(Startup.AppPath & "data1.rpt")

CReport.EnableParameterPrompting = False
CReport.DiscardSavedData
CReport.ReadRecords

With CRViewer
.ReportSource = CReport
.ViewReport
.Visible = True
.DisplayGroupTree = False
.ZOrder
.Zoom 75
.Top = 0
.Left = 0
.Height = ScaleHeight
.Width = ScaleWidth
End With

cmdHide.Visible = True
cmdHide.Left = Me.ScaleWidth - cmdHide.Width - 500
cmdHide.Top = 0
cmdHide.ZOrder

End Sub

Private Sub CRViewer_PrintButtonClicked(UseDefault As Boolean)

UseDefault = False
CReport.PrinterSetup Me.hwnd
CReport.PrintOut True
Set CReport = Nothing

CRViewer.Visible = False
cmdHide.Visible = False

End Sub

Private Sub cmdHide_Click()

Set CReport = Nothing
CRViewer.Visible = False
cmdHide.Visible = False

End Sub

Using Crviewer With Crystl.ocx
Every time I try using the Crviewer and the Crystl.ocx on the one form I get an automation error.
i.e.
Code:
Private Sub optPreview_Click()
On Error GoTo Err

Screen.MousePointer = vbHourglass

Set CReport = CApp.OpenReport("C:DelpacQteSupp.rpt")
CReport.Database.Tables(1).Location = "C:delpacDelpac.mdb" 'Crashes here
CReport.RecordSelectionFormula = "{QuoteHdr.QuoteNo} = " & txtQteNo.Text

CRViewer.ReportSource = CReport
CRViewer.ViewReport
CRViewer.Visible = True
CRViewer.ZOrder
CRViewer.Zoom 75
CRViewer.Top = 0
CRViewer.Left = 0
CRViewer.Height = ScaleHeight
CRViewer.Width = ScaleWidth

Screen.MousePointer = vbDefault

cmdHide.Visible = True
cmdHide.Left = Me.ScaleWidth - cmdHide.Width - 500
cmdHide.Top = 0
cmdHide.ZOrder

frmSend.Visible = False
optEmail.Value = False
optFax.Value = False

Err:
If Err.Number <> 0 Then
MsgBox "Error " & Str(Err.Number) & " " & Err.Description, vbCritical + vbOKOnly
Err.Clear
End If

End Sub

Private Sub Option1_Click()

Crystal.ReportFileName = "C:DelpacQteSupp.rpt"
Crystal.DataFiles(0) = "C:delpacDelpac.mdb"
Crystal.SelectionFormula = "{QuoteHdr.QuoteNo} = " & txtQteNo.Text
Crystal.PrintFileName = "C:DelpacQuotationRequest.rpt"
Crystal.Destination = crptToWindow
Crystal.PrintReport

End Sub


Individually both commands work, but if I try one after the other I get an Automation Error. I presume that this is because I didn't nullify (if that's a work) the crystal object in both, but how do I do this?

Sorting Crviewer
hi to all
i am using crviewer control to show the reports.

can any one help me how to add the Sort filed through vb code.

Thnaks

ADO COnection With CRViewer
Hi,

I have a problema with an app at work we are developing. This app has a form witha CRViwer that we call every time the user request to print a report from.

The problem is that in order to no to generate a run time error, before we open the report we close the ADO connection and after de form with the CRviwer is closed we re-opened.We use an Informix database with conn.CursorLocation = adUseClient

Is this correct? is there a way to open the reports without closing the connection?


Thanks in advance

DLLs For Using CRViewer.DLL
Hi All ,

i have developed some reports using Crystal Reports 8.5 .
these reports are actually called / invoked from a Lotus Notes Application.
The system employed to view thses from Notes is - thru the use of Activex Component - CRViewer.DLL which is embedded on one Lotus Notes Form..
then a background agent is passed the rpt file name and obtains a handle to the report application object...and finally invokes the report inside the report viewer ActiveX control.
Now this works absolutely fine !! - touchwood
What i need now is what all dlls and / or ocx files do i need on some other machine (NOT HAVING Crystal Reports Software Installed on it) to be able to view the reports inside the Viewer Activex Control ??
This is a Key Issue here because the majority of users would be just plain-users (Who Do not need Crystal Reports installed on their workstations)... but just need to view the data from Notes Database ....

Thanks in Advance,
Aditya Pendse
aditya_pendse@yahoo.com

CRVIEWER Files
I am trying to get the dll's and OCX's for crystal report. I am looking at an old application and it uses crviewer which I don;t have on my machine. I cannot seem to find these files on the net. Where can I get them from?

how can I install them?

Many thanks

Two Tasks: MDI And CRViewer
Hi,
i'm making a programm in which different reports can be shown by a CRViewer. As i'm using CR8 there is the "Memory Full "-Error if I want to change Reports during runtime in a SDI. So i decided to use MDI to display my reports. For every report a MDI-window with a CRViewer will be created. As I never worked with MDI before here's a quiet easy task: How can I find out when a childwindow become the active winow and which childwindow it is.
My second question question is heavier (if they were easy to solve i would to it on my own ;-)): When i'm loading a reportfile twice or moretimes in differen childwindow by the second loading or each following loading i'm getting databaseerrors from the CRViewer which tells me that i cannot access the tables. How can i avoid this error even if the report file is loaded by an other instance of CRViewer in my prog?

greetings

akademos

Using CRViewer And CRPEAuto In VB
I need help!!! I nearly tried everything!
Is there any possibility to connect a CRPEAuto.Report object with an CRViewer Control?

Akademos

Crsystal Report Crviewer
i am facing problem in refreshing the report using CRviewer
i have tries most of the methods save data with report unchecked,setting logoninfo,but nothing seems to work.

the report simply does not refresh.

the database is set dynamically to a new database during runtime.

i am stuck with this .
help please...
roopa

Print Icon In CRViewer Does Nothing?
Hi,

Can anyone help me?

I'm developing a VB6 application that uses Crystal Report viewer to view the reports.

But when I click on the Printer icon, it shows me the pages and number of pages that I want to print. But when I click on the Print button, it does nothing?????

Do I need to put in some code?

And where do I put the code?

Thanks

PS: please answer this question as I'm in desperate need of an answer.

Thanks

Crystal Report 8, CrViewer
Can anybody share me the code how to use crViewer? I'm currently need to use crystal report 8. I know the way to do it in crystal report 6 but crystal report 8 is obviously different with crystal report6.

Another thing is that, using crystal report 8 in VB, during the application runtime, is there any code to refresh the report everytime I click a button?

Thanks in advance!

CRViewer With Different Report Sources?
Hi

Is it possible to assign during runtime, with various report sources to a single CRViewer?

When I tried to do it, I am getting error!
CRviewer91.reportsource = CrystalReport1 '--Ok
CRViewer91.refresh

CRviewer91.reportsource = CrystalReport2 '--Error
CRViewer91.refresh

What went wrong?

Crystal Report With CRViewer
I want to know that how can i view crystal report in VB...
I have installed Crystal Report 8.0 and vb 6.0..
I require few lines of code fo this.......
Plz send me the required code...
thanx

File Not Found (CRViewer)
Hi everyone

I have designed a Crystal Report (8.5) using ADO Connectivity. It contains a subreport. I can the report at design time. But when I try to view it thru VB6 code using crviewer, it shows error "File Not Found".

Help please.

Thanks in advance.

Print CRViewer Code
I want to print crviewer using printer setup in visual basic 6, but in crviewer.printrepot, name of printer not same, how to solve this case?

Crviewer.dll Not Correctly Registering
Hey all

I used Inno to compile a program because i was having a few issues with the P&D (yea, yea...i know, heh) but while installing the program runs smoothly, one of the clients machines is kicking out this error when trying to access the report viewer:

Component 'crviewer.dll' or one of its dependencies not correctly registered: a file is missing or invalid.

What could be causing this? It seems to work most everywhere else I've installed it so it makes the program work only in certain places.

Thanks,
tibor

Help Required In CrViewer Control
Dear Friends

I want to view my data in CRviewer control but i dont how to do it, please advice me in this regard.


Thanks


Zubair Khan

How To Connect To Oracle 8.0 From CRViewer
Hello all,

How can we connect to Oracle 8.0 database from our CRViewer control through code? I know to connect to MS Access. Can anybody tell me similar kind of procedure for Oracle?

Thanks in advance
Satya

***Resolved****printing Within VB6 Using App Crviewer
I have a number of reports in my vb6 app. I'm using Crystal version 8.5 dev. When the user views the report I want him to be able to print it from within VB6 app. When I click the Print button on the viewer it shows a window with my default printer which is what I want it to do but when I then click ok nothing happens at all. However if I pull up the same report outside of the vb app. The print button works just fine it shows my default printer then clicking ok it sends the report to the printer. Any idea as to what I need to do to make it work ??

Thanks for any help

Using An Emebedded CRViewer (smartviewer)
Hi!
I am trying to get an embedded Smartviewer to display a report! I am not using a data Environment to create the report, (the report is being created in Crystal Reports 7's IDE)

Here is a snippet that I am using:
--------------------------------------------
frmQCFMain.CrystalReport1.ReportFileName = "n:report.rpt"

'Display the report in the CrystalViewer
'**** This is where I would like to view the report in a Crystal Viewer (which is embedded on my form) instead of the default popup viewer window ****'

frmQCFMain.CrystalReport1.Destination = crptToWindow

'print the report
frmQCFMain.CrystalReport1.PrintReport

Any Suggestions would be appreciated!

~Sam

Close Crviewer Form
Hi all,

I am writing 3 reports to be shown by using crviewer. I wrote a form with a crviewer put on it and used as a template to display reports. When used to show a report, I pass a report to that form. It works without problems.

The problem I faced is that the reports do not close while the program ends. I used to close them one by one myself. I tried to create a new object of that form for each report and destroy them when program ends, but failed.

Does anyone know how to do it?

Thanks in advance.

Selecting Printer For CRViewer
My CRViewer control always previews using DEFAULT system printer but I want the user to change printer in previewing.

I tried using Report.SelectPrinter but it only works for printing (on paper) or exporting. It doesn't affect previewing on CRViewer control. It always uses the system default printer. Printing on paper or exporting always use correctly the printer the user selects (with SelectPrinter) but the only way to change printer for previewing is change default system printer.

My question is: How can i change printer for PREVIEWING ?

Note: this is really important because the user must have for several reasons a Generic / Text Only printer as default system printer, but he has to preview and print on a laserjet printer. In this context, after selecting printer, the preview window always uses "Device Font" instead of "Times New Roman" also if printing on paper is correct.

Many thanks in advance!

CR V10 &amp; VB6 Problem Closing CRViewer
Can anyone tell me how to Close the form that contains the CRViewer?

I've tried:-

Code:Unload Me
Unload <formname>

For nCount = 1 To CRViewer1.ViewCount
        CRViewer1.CloseView nCount        ' this fails by the way - only 1 view
Next nCount
Unload me

EnableCloseButton = True
EnableStopButton = True

The X button on the Viewer is greyed out though.

The Window File/Close and the Window X button have no effect
I've added a Close command control button (Unload me), but that has no effect.

I put a break in the Form_Load sub just in case something was forcing a reload, but that's not it.

Anyone have any idea how I can kill this blasted form without having to kill it from the Task Manager?

J.



The human brain is still the best search-engine...

Edited by - JA1 on 9/8/2005 4:49:01 AM

XI CRViewer - Activate Dependencies ???
Hi and good morning from Germany

I have problems while installing a VB6 application on a target machine.

The application includes predefined Crystal Reports that shall be called / shown on the CRViewer.

After the installation, when I try to call a report on the CRViewer an error message is shown concerning the CRViewer.

Question: Which dependecies do I need to activate in my development environment in order to provide all required dlls ???

As I sayed, predefined reports (CR XI) shall be printed, shown on the CRViewer and exportes as PDF file.

Pls excuse my "broken" English.

Thanks for your help - Lupo

Crystal Report!8 CRViewer.dll With VB 6.0
I have the following code:
    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!
    

But i need to print the report!direct to printer automaticaly, without show the preview in the screen.
I am using CRViewer.dll control.

Thanks
ilich

Crystal Report (Crviewer)
Help Me !!! How use crystal report viewer 8.01 in Visual basic 6 ? thank for answer.

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