Stand-alone report preview through RDC/ActiveX Crystal Reports XI - delphi

I'm porting an application from Crystal Reports 8 to Crystal Reports XI in Delphi 5, using the RDC/ActiveX interface.
In Crystal Reports 8, I was able to bring up the crystal reports default report viewer window for a report like so:
RptInvoicing.Destination := 0; // To: window
RptInvoicing.Action := 1; // Execute
However, this does not fly with CR XI. Printing and exporting I've figured out to work like this:
crReport.PrintOut(True);
...
crReport.Export(True);
But I haven't been able to find anything relevant to show the default preview window. I've tried implementing my own using the report viewer component, but it has a lot of problems like locking up when resizing, freezing and crashes, so it's not a viable solution for a production app.
Even the official support forums weren't of help, I only got a nasty answer to go look at the manuals, which I've been through several times and can only refer to as bad. It's not every day you see such bad documentation for an enterprise product. I found nothing relevant to this in their manuals, so I'm led to think their own staff have no idea about this either.
So I'm hoping someone here could tell me if the default report viewer still exists in CR XI, and if it does, how to invoke it? If it doesn't, is using the report designer component really the only solution to create one?

I recently had the same problem, and described the solution here. I am using Delphi 2007, but since the code involves calls to an external ActiveX DLL, it should work for you too.

From their documentation:
Craxddrt.dll (Crystal Reports ActiveX
Designer Design and Runtime Library)
is a unified object model that
combines the runtime capabilities of
the Craxdrt.dll (Crystal Reports
ActiveX Designer Run Time Library)
with the design time capabilities of
the Craxddt.dll (Crystal Reports
ActiveX Designer Design Time Library).
Craxddrt.dll will replace Craxddt.dll
for versions 8.5 and up. Both the
Craxddrt.dll and the Craxdrt.dll
contain all the objects and associated
methods, properties, and events needed
for creating, opening, exporting,
saving, and printing a report at run
time. In addition, Craxddrt.dll is
either used with the RDC ActiveX
Designer when designing reports at
design time, or used with the
Embeddable Designer when designing
reports at run time. See “Embeddable
Crystal Reports Designer Control
Object Model” on page 343 for more
information.
Note: The RDC ActiveX
Designer is only available in
Microsoft Visual Basic.
Prior to
version 8.5, the Craxdrt.dll would be
distributed with an application. Now
the developer has a choice of two
automation servers to distribute.
Craxdrt.dll is backwards-compatible
with previous versions and contains
all the features introduced in this
version. Use the Craxdrt.dll for any
client-side application that does not
contain the Embeddable Designer, or
use it for any server-side
application. Craxddrt.dll is
apartment-model threaded, but is not
thread safe, and can only be used in a
client-side application. Although the
Craxddrt.dll is a fully functional
automation server for the RDC, and can
work in any client-side application,
it will increase the install size.
Therefore, it is recommended that you
only use Craxddrt.dll with the
Embeddable Crystal Reports Designer
Control.

I can't say anything about Delphi, but in VB we are using CRViewer ActiveX Control. Using it is straightforward - you put viewer control on form and assign RDC object to it. This is covered in CR help somewhere. (I can't look at code ATM to provide working exmples.)

Related

Is there any Delphi Open Source project that Implement a basic IDE structure?

I have written a framework for Android and Windows, and got some tool that draw the forms and scripting that run on both enviroments. Just another solution like thousands.
What I want to do now is using Delphi (Xe2 in my case) to write an IDE like Delphi itself. That I could manage source files in a project and have forms. I have much of it already on DevExpress components. But I was wondering if there is anything that I could reuse to not invent the wheel again.
Certanly the drawing form should be necessary to have changes for my particular case, however it being capable of drawing forms with buttons, text, those common controls we find in majority of the platforms.
Right now I am using Balsamiq Mockup to draw and export xml to my compiler to integrate on the framework, it is nice, because it is a great drawing product, howeve there is a need to have all that IDE properties integrated and the need to put events on each control, for that an IDE all in one solution is better.
TMS Scripter -> I have found this commercial package, that comes with basically everything I need, scripting (I need VB but with different flavor, I believe it could be changed), form designer, project management, etc... It is very nice indeed. However I would like to hear of open source solutions
How about Lazarus? I think that's free, and it certainly has an extensive IDE.
http://www.lazarus.freepascal.org/
It's not a Delphi Open Source IDE, but I think it is free for use and feature rich:
MS Visual Studio Shell
what-is-the-visual-studio-shell-standalone-shell-good-for
RemObject use it for there tools. So it fits also for Delphi.

Is there a version of Synactis' TPDFViewer in Delphi XE

I have used the Synactis product PDF-in-the-box in Delphi 2006 projects and also a free component they had called TPDFViewer, which allows you to embed a PDF viewer in your application.
I am porting one app to XE and - having found that trying to install the TPDFViewer I had in XE did some serious damage to my installation - I'm looking for a replacement.
I have installed XE-supported trial versions of their current offerings PDF-in-the-box 4.04 and All-in-the-box 4.04 but can't see any sign of the TPdfViewer component in either. Their website FAQ implies this functionality has been replaced by functions to start Adobe Reader.
So I want a (free would be nice, but not essential) PDF viewer for Delphi XE which doesn't just chain to Adobe Reader and allows user interaction or programmatic control over zoom, page number etc.
I tried several times to find a good PDF viewer. Most of them were fake components. The best way is to embed acrobat reader dll directly into your application and command it from there.
It was 8 years ago, so I do not remember the code that I used to do this. You import the acroXX.dll file directly into Delphi, it prepares a user component for you and then you install this component directly in to your Component palette.
The worst thing in this configuration is that you have to take care of the acrobat reader dll that is installed on your clients. Any update/upgrade of the reader may cause your application to fail.

Can Delphi ClientDataSets be used in iOS Applications?

I read the Components Not Used in iOS Apps post in the Embarcadero DocWiki and was unable to tell if ClientDataSets and DataSources can be used in iOS applications. Can anyone confim or deny whether these components will work in iOS applications.
The first two items on the list you cite are the Data.DB and Datasnap.DBClient units, indicating that they are not supported for iOS applications. TDataSource comes from the former, while TClientDataSet comes from the latter.
To confirm for yourself, try using them in an iOS application and see whether you get the expected compiler error ("Cannot find unit %NameOfTheUnit% used by Project1").
Yes, both ClientDataSet and DataSetProvider can be used in iOS applications. The above answer is incorrect, regarding the Data and Datasnap namespaces. These units are cross-platform. You can see this if you pause your cursor over either ClientDataSet or DataSetProvider in the Tool Palette. Doing this displays the OSs supported by the component you are pausing over, and display for both of these components includes both iOS and Android.

how to open QuickReport in msWord

I’m using Delphi 6 and I need to enable the user to modify a Quick report with WinWord.
How can I export whatever chosen to the quick report to word file ?
Or is there any other way to build reports and export them other than quickreport?
Like third part tools?
thank you
You were probably looking for the QR Design. It is the standalone end-user report designer based on Quickreport. You can either compile it into your application or just distribute it as a standalone, separate application for printing and designing Quickreport reports. For more information about how to get a copy for your Quickreport version contact vendor.
QRDesign Screenshots
QRDesign Feature List

Rave Reports and Intraweb?

Anyone have an example of using Rave Reports (PDF output) and Intraweb ? (or even WebBroker) in delphi ?
I'm assuming you write to a memory stream and then output this to the browser.
Any help on Rave Reports/Memory Streams and Intraweb or Webbroker appreciated.
Unfortunately there are a couple of issues with RAVE in multi-threaded environments. Felix posted some code which does not fully adjust for that. Basically the demo about Rave and IW in Atozed's demos section would work though
DO NOT use Felix' alternative literally - using BDE with IntraWeb will lead to nothing but trouble. BDE is just not designed to be used in server type applications like IW.
Ultimately I recommend either FastReport or Report Builder with Intraweb - both are proven to be working stable with IW

Resources