Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Access Violation here

edited April 2004 in End User
It happens when:

When printing a report wich have search criterias, and it?s loaded from
the the system where the user have access to the report generator.

When you clear the search criterias, works just fine.


Can u help?


Marcelo

Comments

  • edited April 2004
    It?s happening at this procedure, where is marked:

    procedure TdaQueryDataView.AutoSearchFieldChangeEvent(Sender: TObject);
    var
    lbReset: Boolean;
    lField: TppAutoSearchField;
    lCriteria: TdaCriteria;
    lFieldOperator: TdaCriteriaOperatorType;
    begin
    lbReset := False;

    lField := TppAutoSearchField(Sender);
    lCriteria := TdaCriteria(lField.Criteria);

    /*****************************************/
    /**** ACCESS VIOLATION AT THE IF **********/
    /*****************************************/
    if (lCriteria.Field.FieldName <> lField.FieldName) then
    begin
    CreateCriteriaForAutoSearchField(lField);

    lbReset := True;
    end

    else
    begin

    if (lCriteria.Value <> lField.SearchExpression) then
    begin
    lCriteria.Value := lField.SearchExpression;

    lbReset := True;
    end;

    lFieldOperator := ppOperatorTodaOperator(lField.SearchOperator);

    if (lCriteria.Operator <> lFieldOperator) then
    begin
    lCriteria.Operator := lFieldOperator;

    lbReset := True;
    end;

    if (lCriteria.Field.ShowAllValues <> lField.ShowAllValues) then
    begin
    lCriteria.Field.ShowAllValues := lField.ShowAllValues;

    lbReset := True;
    end;

    if (lCriteria.Field.Mandatory <> lField.Mandatory) then
    begin
    lCriteria.Field.Mandatory := lField.Mandatory;

    lbReset := True;
    end;

    if (lCriteria.Field.AutoSearch <> lField.Enabled) then
    begin
    lCriteria.Field.AutoSearch := lField.Enabled;

    lField.Free;

    lbReset := True;
    end;

    end;

    if (lbReset) then
    begin
    FQueryOutOfSync := True;

    FSQL.Modification;

    Report.Reset;
    end

    end; {procedure, AutoSearchFieldChangeEvent}


  • edited April 2004

    This is not a known issue nor can I reproduce it here. Please provide
    specific steps to reproduce the error or create a simple example project
    using standard Delphi components, ReportBuilder, and DBDemos. Email in zip
    format to support@digital-metaphors.com and we can run it in the debugger.

    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.