Tracing Errors

PixelPointerPixelPointer Vaughan, Ontario
edited 10:10AM in FastReport 3.0
When working with Fast Reports, is there a way to trace errors within a report. I am an end user of the Fast Reports control, not the programmer. I keep recieving an error saying that I am using an invalid field, but it does not show me where it is picking up this error. ;) ;)

Any assistance would be appreciated. If you need more details, please let me know.

Thank you.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    if you are writing script on the code page run the script from the runscript button in the code window it should stop with the cursor positioned at the error.
    ;)
  • PixelPointerPixelPointer Vaughan, Ontario
    edited February 2006
    Thanks, GordK. IThat is where I run it from, and at the end of the report, I get an error message, "Unknown variable or datafield", and it happens to be named the same as the first item in my first grouping.

    I actually had some code in the obp event of the footer of my first grouping,
    procedure gfSummaryGroupOnBeforePrint(Sender: TfrxComponent);
    begin
           Set(<extSGRevenues>, Sum(<Price>));
           Set(<extSGProfitDollars>, Sum(<ProfitDollars>));
    end;
    
    then decided that I needed to use the report totals, so I moved the code into the obp event of the Report Summary.
    I actually had some code in the obp event of the footer of my first grouping,
    procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);
    begin
           Set(<extSGRevenues>, Sum(<Price>));
           Set(<extSGProfitDollars>, Sum(<ProfitDollars>));
    end;
    
    After that, the error appeared, but it does not make sense to me. When I run the script, all I get is a message box, with one OK button. After I press it, all I see is the report itself.
  • gordkgordk St.Catherines On. Canada.
    edited 10:10AM
    in the summary band it no longer nows what or where "price" is
    aggregates need to know what they are aggregating as all the databands have finished processing

    the reason it worked in the footer is that it was in a logical place
    the full syntax of the sum function is
    sum(datafield or varname,bandname,1)
    where bandname is the name of the databand where the datafield or var is located
    the integer parameter indicates what type of agrregation: running total, include non visible records.
  • PixelPointerPixelPointer Vaughan, Ontario
    edited 10:10AM
    Ah. Yes, that makes sense. I should have thought of that myself, but then I wouldn't have used this excellent forum. :-)

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.