My-FyiReporting icon indicating copy to clipboard operation
My-FyiReporting copied to clipboard

[WIP] Fix Runningvalue error with scope in function

Open Copilot opened this issue 6 months ago • 0 comments

Fix for RunningValue function scope parsing issue

  • [x] Understand the issue - RunningValue function with scope parameter fails with "scope must be a constant" error
  • [x] Locate the bug in Parser.cs - scope detection logic incorrectly identifies the aggregate function as the scope for RunningValue
  • [x] Implement fix to handle RunningValue's unique 3-parameter structure (expression, aggregateFunction, scope)
    • Skip first comma when detecting scope for RunningValue (between expression and aggregate function)
    • Skip DataSet scope validation for RunningValue as it typically uses group names, not DataSet names
  • [x] Build and validate the fix - builds successfully
  • [x] Create tests for RunningValue with and without scope parameter
  • [x] Run tests to ensure no regressions - all RunningValue tests pass
  • [x] Verify with example file (DrilldownTest.rdl) - successfully parses without error
  • [ ] Run codeql_checker to verify security
  • [ ] Document the changes
Original prompt

This section details on the original issue you should resolve

<issue_title>Runningvalue always give error with scope</issue_title> <issue_description>Hi.

I try to use the Runningvalue function, but always give the same error : failed to parse: Sum function´s scope mut be a constant. I try different scope names , no luck :

=Runningvalue(Fields!debito.Value,Sum,cuenta) =Runningvalue(Fields!debito.Value,Sum,Details_cuenta) =Runningvalue(Fields!debito.Value,Sum,"cuenta") =Runningvalue(Fields!debito.Value,Sum,"Details_cuenta") =Runningvalue(Fields!debito.Value,Sum)

My group is called cuenta.

I am doing something wrong?

PD : Example provided in the package gives me the same error. Thanks </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes majorsilence/My-FyiReporting#144


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot avatar Oct 19 '25 19:10 Copilot