Rave Reports and Intraweb? - delphi

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

Related

Delphi translation project EResNotFound

I am working on the development of a large management application that I am translating with the tools provided with Delphi (language DLL).
When I run the translated version, I have an EResNotFound exception when I want to run my reports.
Some components of the report generator used in the application are inherited from a TForm. And the DFM of the components are not recovered by the translation tool.
Unfortunately, it is not possible to change the report generator and the editor has still not responded to my support request.
How can we get around this problem? Has anyone ever faced this problem?
Thanks in advance.
Regards.

Convert Crystal Reports to FastReport for Delphi XE4

My company just switched from using Delphi 2007 to Delphi XE4, and now we want to move from Crystal Reports to FastReport. However, we have over 200 reports that need to be converted. I know there was an "official" converter available on the FastReport website but it doesn't seem to be available for Delphi. Is there any other converting tool available to do that? Or is there a way to get my hands on the original mythical converter for Crystal to Fast Reports?
You can download the FastReport converters from Fast Reports here:
http://www.fast-report.com/en/download/public_download/fr5.vcl/Converters.zip
It includes RptToFr3.exe which can do the conversion. I don't see any documentation outside of forum posts on the subject though.
The archive continues the following
FastReport.Bars.dll
FastReport.dll
FastReport.Editor.dll
FrxToFr3.exe
RdlToFr3.exe
RptToFr3.exe
You can find the documentation here:
https://www.fast-report.com/en/download/documentation/

Alternative to TXMLDocument?

Recently we upgraded our code from Delphi 2009 to Delphi XE and updated our Indy components (not sure if this is relevant).
But ever since then we have had errors on Windows Server 2003 machines when loading and saving XML files.
XMLDoc.LoadFromFile()
XMLDoc.SaveToFile()
The DLL msvcrt.dll is much smaller on Windows Server 2003 (300kb or so) compared to over 600kb on other operating systems... So its missing something in that file and its causing the error...
Does anyone know how to fix this? Or is there an alternative to TXMLDocument that I can try?
By default, TXMLDocument/IXMLDocument is just a wrapper around the MSXML COM interfaces when running on Windows platforms. Neither TXMLDocument nor Indy use the _ftol2_sse() function, or even link to msvcrt.dll. Something else in your project is at fault.
msvcrt.dll is (part of) the Microsoft Visual C++ Runtime. I think you got an older (or maybe even newer) version of this runtime that doesn't include this function.
Now you'll have to find out where this function is called. Do you link obj files with your project or use (other) 3rd party dll's?
To answer the last part ("is there an alternative?"), you might want to check out Jedi Code Library's TJclSimpleXML class. It does not require any external DLL, is quite fast, and is very easy to use. Besides, these days JCL and JVCL are a must-have anyway if you code in Delphi.
http://wiki.delphi-jedi.org/wiki/JEDI_Code_Library is their page I believe. I hear in seattle you can get it through IDEs integrated package manager.

How to debug a delphi 2006 clientDataSet if at all possible

Over the last few days we have seen random access violations being raised on Delphi 2006 using the ClientDataSet when loading an XML block but the errors disappear when using CodeGear 2007 rad Studio.
I have a strange feeling that this is going to come back and haunt us in the future.
So, how can I debug the xml load procedure for a clientdataset.LoadFromStream method?
I can see it is defined in dbclient.pas but I cannot seem to find the xml processing section.
JD
I don't know if you've tried this already, but it's entirely legal (and supported) to use the Delphi 2007 version of midas.dll with a Delphi 2006 application. Since Embarcadero did fix some DataSnap bugs in Delphi 2007, there is some possibility that the errors you are seeing are caused by a Delphi 2006 bug. It is worth a try to substitute the 2007 version of midas.dll with your Delphi 2006 application and see if the errors go away. It might not fix the problem, but it will save you a lot of trouble and frustration if it does.
it been a while since ive been on 2006 but if i remember right
turn on debug packages then you should just be able to step into it
As far as I know the LoadFromStream cannot be used to load XML files, the data in the stream should be in the internal format used by the client dataset. Try setting the XMLData property instead.

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

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.)

Resources