Open biztalk2022 opened 2 years ago
After stepping through the code, I was able to see that the bug exists in the GetDataSourceReference function.
After already adding the one shared datasource to the reference list, it loops through all the datasets to find additional datasource references. These datasets all point to the 1 datasource that was already added but when the program does a comparison, it does not find the reference in the list.
In the screenshot below, the Dataset contains the same datasource reference as added to "retList" above, but the Name is different. So the program gives it a new name and adds it to the datasource list "retList". It does this for each dataset that is referencing the EXACT same datasource as found in retList[0]. These additional entries should not be created.
Please update the code to fix this bug. It exists in the latest version.
I downloaded the code committed/updated on 9/22/22 and ran it.
The updates to the code have fixed the "can't find corresponding dataset" issue (#57). THANK YOU
However, 2 issues remain:
XML from Converted File
Areas of Concern Contributing to Issues:
In ConvertFileWithDataset, why is it changing the dataSetSourceName and adding a GUID?
If it retains the original remoteDataSourceName without adding the GUID, there would be no issue.
In GetDataSourceReference, it's checking for the existence of the entire dataSetSourceRef object…which will always be different b/c the names are different. Instead, it should be checking the actual dataSetSourceRef.Reference value. If it did the string value check instead of comparing the entire object, it would see that the datasource already exists in the list at Element(0).
As an example, making a change similar to the change below (not sure of correct/best syntax but this code worked) would resolve the issue of it creating a secondary data source that is exactly the same as the first…only with a different name.
Please update the code to resolve these issues.
I have tried running the migration tool on a report that contains 1 shared data source and 9 shared datasets. The original SSRS report runs fine in production. The output of the migration tool is a report that contains an embedded data source with the same name as the original shared data source, plus 9 additional data sources all with the same name - DataSource0_SQLSentry. Each data source seems to correspond with 1 of the 9 shared datasets pointing to the original shared data source. When the tool tries to upload the converted file, it obviously generates an error indicating that "Data source names must be unique within a report".
Has anyone encountered this issue?