Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 29 total
Thread FastReport
Fri, Jul 1 2011 4:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando

Being a lazy sod - do you have any examples of creating a report dynamically? I would need to add a title, and allow for multi-line columns.


Roy Lambert
Fri, Jul 1 2011 6:10 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

If what you need is a simple tabular general layout to show data directly
from Queries/Tables, you can do it using a Cross-tab object, using the
technique illustrated in the manual/demos. Look for "Printing TTable and
TQuery" in the Programmer's Manual and the corresponding demo at
FastReports\FastReport 4\Demos\PrintTable. There are also demos for printing
arrays, stringlists, etc.

If you need more complex dynamic layouts, you can do that by accessing the
report objects from Delphi code at runtime.
Look for "Creating a report from code" and "Access report objects from a
code" also in the Programmer's Manual.

The documentation is not brilliant, and English is worst than mine, but
readable Smiley.
Despite that, it’s a very good report generator.

--
Fernando Dias
[Team Elevate]
Fri, Jul 1 2011 6:17 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

I can also send you some code from my applications showing how I did it, if
you think you need it, but I don’t have it where I am today, I can only send
it to you tomorrow.

--
Fernando Dias
[Team Elevate]
Fri, Jul 1 2011 9:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando


Code would be most appreciated. I was wading my way through the user manual to start with, but I've found the sections you referred to in the programmers manual.

I'm lucky in that I only have a couple of reports to convert from FreeReport - tried it their way and it just doesn't work. Also the data extraction part of the usereporting facility is already in place "all" I need to do is generate the FastReport layout.

Roy Lambert
Sun, Jul 3 2011 4:37 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando


No need for your code Smiley

The manual is good, and producing something in the designer and then looking in the dfm gives me all I need (so far)

Roy Lambert
Wed, Jul 13 2011 10:18 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando


I'm struggling with FastReport's support so I thought I'd ask you.

I'm producing a simple tabular report using the BIFF export filter and I get a couple of blank columns in the spreadsheet. The report fields all butt up against one another using the procedure below

procedure AddField(Fld: integer);
begin
 Memo := TfrxMemoView.Create(DataBand);
 Memo.CreateUniqueName; // .Name := 'Col' + ReportData.FieldDefs[Fld].DisplayName;
 Memo.DataSet := gReport;
 Memo.DataField := ReportData.FieldDefs[Fld].DisplayName;
 Memo.SetBounds(hPos, 0, ColWidths[Fld], LineHeightSet);
 Memo.HAlign := haLeft;
 Memo.StretchMode := smActualHeight;
 Memo.WrapText(True);
 hPos := hPos + ColWidths[Fld];
end;

The spreadsheet columns go A-H and its D & F that have nothing - no title or anything.

Roy Lambert
Wed, Jul 13 2011 1:59 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

> I'm struggling with FastReport's support so I thought I'd ask you.

Yeah, its very different from Elevate Software support Smiley.

> I'm producing a simple tabular report using the BIFF export filter and I get a couple of blank columns

I have zero experience with that filter, I'm using frxXLSExport to export to excel, I dont know if i can be of any help. Anyway, columns D and F correspond to what data types in the Datasource?

--
Fernando Dias
[Team Elevate]
Thu, Jul 14 2011 2:46 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Fernando

>> I'm struggling with FastReport's support so I thought I'd ask you.
>
>Yeah, its very different from Elevate Software support Smiley.

Mmmmm.

>> I'm producing a simple tabular report using the BIFF export filter and I get a couple of blank columns
>
>I have zero experience with that filter, I'm using frxXLSExport to export to excel,

I tried that and it just stuffed Excel - had to reboot the PC.

>I dont know if i can be of any help.

At least you make more sense than FastReport Smiley

>Anyway, columns D and F correspond to what data types in the Datasource?


Nothing - there's no column in the underlying dataset, they've just been added in for some reason. This is the latest reply from fastReports

<<1. Blank columns (D and F) appear because blank rows are not merged into a single blank cell. This is a peculiarity of an internal algorithm. However, this doesn't affect the whole xls file appearance.>>

I shall be investigating further.

Roy Lambert
Thu, Jul 14 2011 3:56 AMPermanent Link

Malcolm Taylor

Hi Roy

Sorry been a bit mobile the last few weeks.

I have largely given up on the FR export to xls.  
From my experience, and understandably, FR tries to do a wysiwyg job
and unless you design specifically for xls by making sure cells' share
the same left and right values for every row, think
headers/groups/footers/etc, it quickly becomes a real mess.

Where I *have* to export to xls, I sometimes export to a csv file and
then import into Excel and edit the result.  Seems a long way round but
it gives me a better result - not good for end users.  Or I just use
SMExport rather than FR.

But FR is good for printing and PDF, and even RTF

Malcolm
Thu, Jul 14 2011 11:39 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Roy,

I use frxXLSExport all the time and I never had problems with it.
But it seems to me that this issue isn't related to the filter used but with the report itself.

> Nothing - there's no column in the underlying dataset, they've just been added in for some reason.
>This is the latest reply from fastReports
>
> <<1. Blank columns (D and F) appear because blank rows are not merged into a single blank cell. This is a
> peculiarity of an internal algorithm. However, this doesn't affect the whole xls file appearance.>>

I don't understand their answer either.
Let me dig for a report I made a few months ago that, as far as I can remember, also adds columns dynamicaly, as yours. I'll let you know as soon as I can find it.

--
Fernando Dias
[Team Elevate]
« Previous PagePage 2 of 3Next Page »
Jump to Page:  1 2 3
Image