DevExpress Xtrareport unbound detail report data source - xtrareport

I'm using DevExpress Xtrareport in my report i am using three unbounded detail reports
my question
How can i set the data source and data adapter for each one of these reports by code

Related

How to use subreport across multiple reports or create parent report from subreport?

I have a Crystal Report called MainReport in Visual Studio, which also has a subreport. The contents of the subreport are the header details but now this is required across a couple of other reports.
Is there any way to re-use the subreport across other reports or a way to change it from a subreport to being its own parent report?
Any help would be great!
According to the thread save subreport as an individual report from SAP:
This option is only available in the full version of Crystal Report Designer.
It's not available in the .NET IDE Report designer.
Open the sub report and go to file ---> save subreport as and save the report in any of the location.
now you can use the sub report as the main report or inside any main report.
If this is not your requirement let me know.
As above suggest, this is the only solution. Other wise you just create a new one and then use it as a sub-report to another report.
Good to install Crystal report as per your .net framework or your IDE.

How to export multiple TdxDBGrid into an Excel worksheet?

In our application we are having different grids in a form having individual Export to Excel functionality. DevExpress do not provide the functionality to Export multiple grids into an Excel worksheet. How this can be done in Delphi 2007?
Thanks!
https://stackoverflow.com/search?q=%5Bdelphi%5D+export+excel
Exporting data from a DBGrid to Excel
Exporting grid to excel + OOXML mentions TdxDBGrid
Exporting to excel from Delphi without having excel
How can I export a DBGrid to OOXML format (Excel 2007/2010 format) without Excel installed?
ADO with XLSX files in Delphi XE
Copy TDataSet to XLS via ADO
You can start with either of those approaches and make your export routines. 1st of all you would have to decide whether you would place your different grids onto different sheets within the workbook, or into different files, or left to right in the same worksheet.
Maybe most lazy approach would be to export them to different worksheets, and after that using Excel's COM server (via Delphi TExcelApplication component) to move those sheets into one main workbook, and then close and delete all the temporary and now empty workbooks.
This would be quite non-effective approach, but might appear most easy if you already mastered built-in DevEx exporter.
Otherwise those links above have a lot of references to purchase some exporter or create one.

Crystal 8.5 has ChangeDatabaseDriver function - how to do the same in Delphi Code?

We have a very large number of reports created to use the BDE driver.
Our application has been migrated to a database that can be accessed via ODBC. All Tables, Fields etc. are comparable.
As there are many Crystal reports in existence (including some developed by/for third parties) we would like to be able to change the Database Driver used by a report on the fly at runtime, from our Delphi-7 application.
In Crystal there is a menu Item to change the driver for a report ( - and if manually converting a report this does exactly what we want.
Many Thanks in advance for your help.
In my CrystalReportWrapper I send the connectionstring of my TAdoConnection, to change the connection in the report of crystal report.
<TCrpe>.Connect.ServerName:= AServerName;
<TCrpe>.Connect.UserID:= AUserID;
<TCrpe>.Connect.Password:= APassWord;
<TCrpe>.Connect.DatabaseName:= ADataBaseName;
<TCrpe>.Connect.Propagate := False;
<TCrpe>.Connect.Test;

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

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