-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FindRow in "Library - Report Dataset" (131007) yields a different result on BC14 than on BC18 #30
Comments
The fix on BC18 (and beyond) would be:
But to not deviate too much from code release with the book we could make a combination of the release code and the fix:
|
Additional issue: column naming in report 101 and the copy (50000) of it are not exactly the same. |
Build pipelines have been run and completed succesfully. |
Henrik Helgesen saw a flaw in the new code:
What if Row[1] and Row[2] are both -1, meaning that the row was not found? To tackle that the code should be changed to:
|
When writing the 2nd edition I ran into this issue and reported it on the BC yammer group as following (on April 23, 2021 at 11:55 AM):
Has there been a change in the implementation of the
FindRow
method inLibrary - Report Dataset
?I am asking as I was using the return value to verify if the relative offset between two columns in my dataset was changed. In my book it did that like this:
This worked as a charm. Now that I am working on the second edition and run this code on BC18
Row[1]
andRow[2]
always get the value 0 assigned, so, the AreEqual errors.In the last (almost) two years I did not take the time to dive into this only to pick it up again today, writing:
Testing reports hasn't been a focus to me in the recent past, only as part of the training I provide. And the workaround has been to not check the row offsett between tags in the XML formatted dataset. For example (see also test example 8 in chapter 8 of my book):
The major flaw in this approach is that I do/can not test the relation between the two tags, i.e.
Customer__No__
andCustomer_Lookup_Value_Code
. They could be in the dataset, but unrelated. So, the workaround is a not very robust approach. I would rather tests like above (the initial code example).Contrary to my intial statement it appears that
Row[1]
andRow[2]
are found, but have the same value, in my case 66.But on BC14 (just retested it)
Row[1]
andRow[2]
are not the same. In my exampleRow[1] = 3
andRow[2] = 16
, making the delta between the two 13But on BC18 and beyond (and maybe also on BC15 and higher) row is apparently not the meaning of row in BC14.
So, on BC 18 I should not tests on a delta of 13, but a delta of 0 to be sure that am checking two related tags, i.e. two fields of the same record.
The text was updated successfully, but these errors were encountered: