Several datasets in the same band
Alex,
In the FR2.5x it was possible to print given of several datasets in the same band.
In the FR3 an error appears --> "Field not found".
I am trying to print a certificate of course conclusion.
Therefore I am using an only band
How to decide this?
Marcos
In the FR2.5x it was possible to print given of several datasets in the same band.
In the FR3 an error appears --> "Field not found".
I am trying to print a certificate of course conclusion.
Therefore I am using an only band
How to decide this?
Marcos
Comments
I installed version FR3.02 and I compiled the project, but the problem continues.
Perhaps it is not understanding as to make this in the FR3, therefore I go to explain my situation.
I have a Master-Data Band and two datasets selected Company and Employees.
In the band, I placed dataset main as Employee and have some on fields to dataset Company.
Now in the FR302 the error does not appear, but the data also are not printed.
Question: I must use another type of band? Please, it helps me.
Marcos
I am with the same problem when use two dataset different.
"Field not found"
Edson Martins
I made the tests with DBDemos and functioned.
But when I use Firebird does not function.
I can send it an example with the database Firebird?
Marcos
use same table
leave field settings
drop masterdata band association with table and set row count to any number
control opening and closing table manually from external code
the error is back
it follows the steps below to reproduce the error:
1) Open in project time the tables of the FR3Demo.
2) Click "Run" the FR3Demo in the Delphi.
3) Select "Simple List", Selects report datasets Order, Customers.
4) In the Master Data it modifies the field "Address" for "OrderNo".
5) Click "Preview", the report and will be generated the error.
This always occurs that the table or dataset already with is opened.
Marcos
I'm using CBuilder 5 and ADO dataset access to MS SQL Server, so this problem is unlikely to related to DB engine so much as it is a more fundamental design problem.
It's acting like auxcillery datasets, ie. ones that are not being used to control report generation or flow, are not being properly resolved.
By accident the fixes that I was sent earlier is not in FR3.02. Will be added in FR3,03 I hope.
function TfrxDBDataset.GetDisplayText(Index: String): String;
var
i: Integer;
begin
if not FInitialized then
Initialize1;
if DataSetActive then
if Fields.Count = 0 then
Result := FDS.FieldByName(Index).DisplayText
else
begin
i := Fields.IndexOf(Index);
if i <> -1 then
Result := TField(Fields.Objects).DisplayText
else
begin
Result := frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' +
Index + '"';
ReportRef.Errors.Add(ReportRef.CurObject + ': ' + Result);
end;
end
else
Result := UserName + '."' + Index + '"';
end;
function TfrxDBDataset.GetValue(Index: String): Variant;
var
i: Integer;
begin
if not FInitialized then
Initialize1;
i := Fields.IndexOf(Index);
if i <> -1 then
Result := TField(Fields.Objects).Value
else
begin
Result := Null;
ReportRef.Errors.Add(ReportRef.CurObject + ': ' +
frxResources.Get('dbFldNotFound') + ' ' + UserName + '."' + Index + '"');
end;
end;
I am thankful for the fast solution.
Now it functioned correctly.
Best Regards
Marcos
For some reports I need this option. (Complicated invoices and so on)
Maybe it has something to do with the fact that a databand is linked to only one datasource and other bands are not.
Maybe it is better just to link the fields to the datasource not considering the band they are on ?
Is there a way to get this working ?
JDekker
DataField will have to be used in DataBands, not in header or footer bands.
For this they exist in the FR3, six levels of bands of data.
Regards
Marcos
I hope I am miss-reading your last post prmas.
Which of the examples of reports FR3 uses given in pageheader and pagefooter? None!
For this we use Databand.
It is clearly that he would be excellent to be able to make this in FR3.
But, I do not find that this is unacceptable.
Regards
Marcos
Think of the application of corporate letterhead and you will understand why the lack is unacceptable in a report writer intended to meet corporate needs.