Several datasets in the same band

edited 12:55PM in FastReport 3.0
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

Comments

  • edited 12:55PM
    It was partially fixed in FR3.01. Finally it will be fixed in FR3.02.
  • edited 12:55PM
    Alex,

    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
  • edited 12:55PM
    Alex,

    I am with the same problem when use two dataset different.

    "Field not found"


    Edson Martins
  • edited 12:55PM
    Please send me a demo (using DBDEMOS tables is preferred). I tried and it works for me.
  • edited 12:55PM
    Alex,

    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
  • edited 12:55PM
    This has not been resolved in 3.02
  • edited 12:55PM
    I have Firebird, you can send me a demo.
  • gordkgordk St.Catherines On. Canada.
    edited 12:55PM
    Alexander it also happens with bde
    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 ;)
  • edited 12:55PM
    Gord, maybe you can send me BDE demo? Still no luck (tried with frdemo).
  • edited 12:55PM
    Perhaps it is not necessary to send the demo.

    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
  • edited 12:55PM
    They could inform me if somebody already obtained to solve the problem therefore is with the same 400 case and has about reports being converted for the new version of our system. Since already we are thankful.
  • edited 12:55PM
    This is happenning to me while accessing an already opened dataset for an application very similar to prmas.

    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.
  • edited 12:55PM
    Sorry all,
    By accident the fixes that I was sent earlier is not in FR3.02. Will be added in FR3,03 I hope.
  • edited 12:55PM
    The fix is in the frxDBSet.pas:

    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;

  • edited 12:55PM
    Alex,

    I am thankful for the fast solution.

    Now it functioned correctly.

    Best Regards ;)

    Marcos

  • edited 12:55PM
    Hi, I have a related problem that is: When I try to get a datafield in the header or the footer it is not working. (Or worse: sometimes it does work and sometimes it doesn't)

    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
  • edited 12:55PM

    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
  • edited 12:55PM
    The inability to access datasets on Page Header, Page Footer and Report Title bands is not acceptable.

    I hope I am miss-reading your last post prmas.
  • edited 12:55PM
    I am Sorry, I did not want to offend.

    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
  • edited 12:55PM
    So you are saying that just because none of the demos access data fields from header, footer or title bands that this is not a desirable feature?

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.