Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATEOBJECT("?????????") For Crystal reports 8.5

Status
Not open for further replies.

AVAS

Programmer
Jan 10, 2003
16
CY
Hi

I am Developing a New Application in which i use Crystal Reports 8.5 as my reporting tool.

To create a new instance of Crystal Reports From VFP7.0 in order to preview or print a report i use the CREATEOBJECT Function/Command. I Have established this with the use of one of the following Lines:
1. oCR = CREATEOBJECT("crystalRuntime.Application")
2. oCR = CREATEOBJECT("crystal.crpe.Application")

What's the difference between the two?
Which One to use and why?


Tnx
 
AVAS

I believe the difference is that Crystal became a full COM object with the advent of version 8.x , and it is refered to in a different way.
oCR = CREATEOBJECT("crystalRuntime.Application")

This will expose more functionality then this:

oCR = CREATEOBJECT("crystal.crpe.Application") && For verison7 and lower.

If you take a look at this article (From Craig Berntson), you will notice he suggests using the "application" model.

This article also explains the difference.
Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Avas,

Use the first one. The other one is for backward compatibility only.

Also, to preview the report, you will have to instantiate a report viewer object. If you get stuck doing that, come back.
Mike Lewis
Edinburgh, Scotland
 
I have used the first one but know i have a problem with previewing the report could you pls help me?

i prefer doing it programmatically

examples would be Appreciated

Regards
AVAS
 
AVAS

You seem to be asking the same question in two different threads.
For code samples go here : Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top