Trouble Viewing Images? If the images appear too small or unclear, you can right-click on them and select "Open in New Tab." This will enlarge the image, allowing you to view it more easily. Alternatively, you can zoom in on the page by holding the "Ctrl" key and scrolling up with your mouse wheel.
Summary: When executing scripts in Finished Reports that rely on DLLs located outside the VDM installation folder, it’s crucial to specify the DLL’s location during the export process via the Scheduler Service. The likely root path of the required DLL corresponds to the directory where all .NET DLLs are stored.
Root Path Example: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.DataSetExtensions.dll
Error Example:
Error: The following error occurred when the script in procedure Hours_WorkedTOTAL.GetValue was executed:
There are the following errors in script(s):
line 71, column 23:
error CS1061: 'System.Data.DataTable' does not contain a definition for 'AsEnumerable'
and no extension method 'AsEnumerable' accepting a first argument of type 'System.Data.DataTable' could be found
(are you missing a using directive or an assembly reference?)
line 84, column 9:
error CS0411: The type arguments for method 'System.Linq.Enumerable.Max<TSource>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,int>)'
cannot be inferred from the usage. Try specifying the type arguments explicitly.
line 259, column 23:
error CS1061: 'System.Data.DataTable' does not contain a definition for 'AsEnumerable'
and no extension method 'AsEnumerable' accepting a first argument of type 'System.Data.DataTable' could be found
(are you missing a using directive or an assembly reference?)
line 270, column 9:
error CS0411: The type arguments for method 'System.Linq.Enumerable.Max<TSource>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource,int>)'
cannot be inferred from the usage. Try specifying the type arguments explicitly.
Why specify the DLL’s location during the export process via the Scheduler?
When exporting a report via the Scheduler, you need to specify the DLL’s location because the Scheduler doesn’t automatically recognize all necessary files. Unlike manually running a report, where dependencies might already be available, the Scheduler operates separately and needs direct access to external DLLs. If the path isn’t provided, the system may not find the required libraries, leading to errors and failed script execution.
By specifying the path, you ensure:
-
The script can successfully reference the necessary .NET components.
-
Reports execute properly without dependency-related errors.
-
The system remains stable and reliable during scheduled report exports.
Where do you specify the DLL’s location?
To specify the DLL location, open the Finished Reports Designer and access the report settings. Navigate to the XtraReport Report property called Script References, then click on the "..." button for Script References to manage the required file references.
Important Note: If the report includes subreports, repeat the process for each one.
Steps to Specify the DLL’s Location
1. Run the Report: Open and execute/run the report so that data/results from queries are generated.
2. Access Finished Reports Designer: Open the Finished Reports Designer to modify report settings.
3. Navigate to the XtraReport Report property: Click on the Report Explorer and select the XtraReport, then search for "Script References" in the search bar.
4. Specify the Script Reference Path: Click on the "..." button to modify the Script References.
5. Paste Script References: Enter / paste the paths to the files required.
Note: Ensure the file exists on your computer.
Example Path:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.DataSetExtensions.dll
6. Confirm Changes: Click OK to confirm the reference path, then save the report.
7. Re-run the Report: Execute the report again to verify the changes resolved the issue.
Conclusion
Adding the correct DLL reference resolves missing method definitions and ensures proper execution of queries within Finished Reports. If the issues persist, verify the DLL location and confirm all scripts reference the correct paths.
Comments
0 comments
Article is closed for comments.