Crystal Reports! 
Author Message
 Crystal Reports!

Hello!

  I would like to know if it is possible to create NEW
reports at runtime through my delphi app or am I just
limitted to pre-designed reports?  By NEW I mean, I would
like to be able to design a new report with the fields I
I need, specific grouping, sorting.  I want to be able to
start from scratch and build a report without hing to use
the Crystal Reports building tool. All must be done
programaticaly.

  I want to do this because I have to generate reports from
a datafile but there are so many variants of these reports
that I would just like the use to choose the fields which are
needed and then generate the report!

Ahmad

--
_________________________________________________________________________
| Ahmad Qazi                               Dept. Informatique et de     |


-----------------------------ooO-(_)-Ooo---------------------------------



Tue, 09 Feb 1999 03:00:00 GMT  
 Crystal Reports!

Quote:

>   I would like to know if it is possible to create NEW
> reports at runtime through my delphi app or am I just
> limitted to pre-designed reports?  By NEW I mean, I would
> like to be able to design a new report with the fields I
> I need, specific grouping, sorting.  I want to be able to
> start from scratch and build a report without hing to use
> the Crystal Reports building tool. All must be done
> programaticaly.

Look into using Shazam Report Wizard.  Zac Catalogs sells it for like $200+ w/source code (native delphi).
I don't know the phone # off hand but I've used Shazam in a program ALONGSIDE ReportSmith to add additional
ad-hoc functionality.

Mike Low
Parsippany, NJ



Wed, 10 Feb 1999 03:00:00 GMT  
 Crystal Reports!



Quote:
> I would like to know if it is possible to create NEW
> reports at runtime through my delphi app or am I just
> limitted to pre-designed reports?  By NEW I mean, I would
> like to be able to design a new report with the fields I
> I need, specific grouping, sorting.  I want to be able to
> start from scratch and build a report without hing to use
> the Crystal Reports building tool. All must be done
> programaticaly.

> I want to do this because I have to generate reports from
> a datafile but there are so many variants of these reports
> that I would just like the use to choose the fields which are
> needed and then generate the report!

> Ahmad

You can do this with QuickReports.

God Bless,

--

08/24/96 14:15
---------
Using: OUI PRO 1.5.0.2 from http://www.dvorak.com



Wed, 10 Feb 1999 03:00:00 GMT  
 Crystal Reports!



Quote:
> I would like to know if it is possible to create NEW
> reports at runtime through my delphi app or am I just
> limitted to pre-designed reports?  By NEW I mean, I would
> like to be able to design a new report with the fields I
> I need, specific grouping, sorting.  I want to be able to
> start from scratch and build a report without hing to use
> the Crystal Reports building tool. All must be done
> programaticaly.

> I want to do this because I have to generate reports from
> a datafile but there are so many variants of these reports
> that I would just like the use to choose the fields which are
> needed and then generate the report!

> Ahmad

Quick Reports works quite well programatically - and it is pretty
fast. FYI, I tackled the same problem recently using QR and now have a
very useful chunk of code I can drop into any application and it will
give generic run-time reporting capabilities with no coding overhead.
Here is how to start with the problem (can be slicked up from this):

1) drop the QR objects on a form then place the QRBands you would want
on the report - put labels, text items, summaries on the report.  The
idea is to put as many fields as you would want to print out as once
(but you do not need to know what these fields are at this time).  
Align as you wish vertically but no need to worry about horizontal
alignment.  Put an unused DataSource component on the form and link
report items to it (no need to populate the DataField property of
items at this time).

2) Now create a form which will be the interface to the report and put
several ComboBoxes and EditBoxes on it for:
  List of Tables
  List of Indices  (dictates print order)
  Field Filtering  
  Choice of Fields - ComboBox for each field holder placed on report
   .... other options ...

3) Loop over i,j (to max counts):

     TableComboBox.Items.Clear;
     Index := 0;
     with TTable(Session.Databases[i].DataSets[j]) do begin
           TableComboBox.Items.Add[Name];
                                                                                        TheDatasource[Index] := i;
                                TheDataset[Index] := j;
           Index := Index + 1;
     end;

when the user chooses a table name from combobox then:

Index := TableComboBox.ItemIndex;
if Index <> -1 then
         ReportSource.DataSet :=  
                       TTable(Session.Databases[TheDatasource[Index]]
               .TheDataset[Index]);

Now can populate the 'Choice of Indices Combo Boxes' with
IndexFieldNames in a similar way and let the user choose one. (store
current value so can reset it when done with the report).

Also can now populate 'Choice of Field ComboBoxes' (I add the string
'(none)' to the Items so the user can have less than the max number of
fields).

Can be as creative as wish with Field filtering interface (just put
logic in the OnFilter method of the Report).

As per formatting:

Need to programatically adjust Left properties of the Report Items to
accomodate spacing of Fields and Titles (widths can come from the
TField properties) and some logic to choose Portrait or Lanscape is
nice.  The Titles Captions can come from the TField Display Label
property. Set widths of fields to zero if '(none)' is chosen (makes
them 'invisible').

Also, Provide some button to call the Print or Preview property of the
Report.

This is just a shell but it can be slicked up real good for not much
more headaches than creating just one Custom Report.  But once you get
it going you can use it in unlimited ways (PS also try creating a
database to save settings from the interface that you can retrieve,
this way you can store your favorite 'reports' programatically).



Sat, 13 Feb 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Editing Crystal reports without Crystal Reports

2. Crystal Report, Quick Report - where to get ?

3. Delphi 2.0 and Crystal Reports Version 5 (Regarding Sub-reports)

4. Crystal Reports - Window formatting?

5. Crystal Reports and Delphi

6. Crystal Report from Delphi 4.0

7. TMemo and Crystal Reports

8. D4 and crystal reports and ODBC???

9. Deploying Crystal report with a dictionary?

10. Crystal Reports

11. Crystal Reports

12. Zachary's Crystal Reports "Deal"

 

 
Powered by phpBB® Forum Software