Hi to all,
I'm trying to create a solution console that it has generate a DOCX file from my report.
I'm using this code, but on row 34 it gives me an error "DOCX rendering format is not available."
I have already add these dll:
01.public class ReportHelper02.{03. public static Bundle SaveAsWord(string fileName, Bundle pBundle)04. {05. Bundle bundle = new Bundle();06. 07. try08. {09. //Create new CultureInfo10. var cultureInfo = new System.Globalization.CultureInfo(pBundle.Get(2).ToString());11. 12. // Set the language for static text (i.e. column headings, titles)13. System.Threading.Thread.CurrentThread.CurrentUICulture = cultureInfo;14. 15. // Set the language for dynamic text (i.e. date, time, money)16. System.Threading.Thread.CurrentThread.CurrentCulture = cultureInfo;17. 18. Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();19. 20. // set any deviceInfo settings if necessary21. System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();22. 23. 24. Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();25. 26. // reportName is the Assembly Qualified Name of the report27. typeReportSource.TypeName = "MyReportName";28. typeReportSource.Parameters.Add("Par1", pBundle.Get(1).ToString());29. typeReportSource.Parameters.Add("Par2", pBundle.Get(3).ToString());30. typeReportSource.Parameters.Add("Par3", pBundle.Get(4).ToString());31. typeReportSource.Parameters.Add("Par4", pBundle.Get(5).ToString());32. typeReportSource.Parameters.Add("Par5", pBundle.Get(6).ToString());33. 34. Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("DOCX", typeReportSource, deviceInfo);35. 36. //string fileName = result.DocumentName + "." + result.Extension;37. string path = System.IO.Path.GetTempPath();38. string filePath = System.IO.Path.Combine(path, fileName);39. 40. using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))41. {42. fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);43. }44. 45. bundle.Add(1, true);46. bundle.Add(2, filePath);47. }48. catch (Exception ex)49. {50. bundle.Add(1, false);51. bundle.Add(2, ex.Message);52. bundle.Add(3, ex.StackTrace.ToString());53. }54. 55. return bundle;56. }57.}I want to be able to stop the execution of the ReportProcessor.PrintReport() and throw a custom error when the printer is unavailable (e.g: disconnected from the server) because instead of doing that the method is trying to find the printer and it freezes. if that's not possible a way to exit the method (timer?) would be good as well.
Regards,
Gaston.

Hello
I am trying to integrate reports in my Winform application but visible I am missing a step:
My application is a Winform application using an EntityFramework to manage the data (stored in y SQLServer database)
I have created a form with a Reportviewer in my project
In visual studio I have created a report (named rptStartList.vb) that has the datasource : rptEntityDataSource [Telerik.Reporting.EntityDataSource]
and the entityDatasource as a proper connectionstring, context ad contextdatamember. The report displays correctly the underlying data in preview
Now I need to "associate" this report to the report Viewer. I have read everything I found, but have failed to understand, in particular I do not understand how to
"Add reference to the class library that contains your reports in the windows form application." found in : https://docs.telerik.com/reporting/winforms-report-viewer-manual-setup
and how to create this class library and what is in it
Can you guide me on how to procee, clearly I am missing a, probably simple, step ....
Thanks in advance
P.S. should you have a complete sample application with the same environment I would appreciate greatly
Hello everyone,
I´m using the html box to list the general terms and condtions of a customer.
While doing so i noticed that the size of the number of the list item does not match the size of the text that follows.(see pic.)
Is there a possibility to set the size of the number of the list item to same es the following text?
(btw. if you use the size xx-small on a list item the designer crashes)
Good day!
Trying Angular reporting with Asp.net core 3.1. Build in our application to try how it would work in our envirnoment. When I'm running application out of docker it all works fine. But as far i'm trying to run in in docker-compose with redis for cach it allways failed on registering new Angular client () it returns 400 response. Due to known isues it might be wrong connection to redis, but I have added random number input in redis and connection works fine.
CustomReportServiceConfiguration:
public class CustomReportServiceConfiguration : ReportServiceConfiguration { /// <summary> /// Инициализирует новый экземпляр класса <see cref="CustomReportServiceConfiguration"/>. /// </summary> public CustomReportServiceConfiguration( IReportSourceResolver reportSourceResolver, ConnectionMultiplexer connection) : base() { var redisStorage = new RedisStorage(connection); var guid = Guid.NewGuid(); redisStorage.SetString(DateTime.Now.ToString("dd-MM-yyyy HH:mm ") + "testKey-" + guid, "testValue-" + guid); HostAppId = "ArmCod"; Storage = redisStorage; ReportSourceResolver = reportSourceResolver; } }Configuration:
services.AddScoped<IRegionReporting, RegionReportingService>(); //-Controller for reporting serviceservices.TryAddScoped<IReportSourceResolver>(sp => new UriReportSourceResolver( Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "Reports")));services.AddScoped<ConnectionMultiplexer>(x=> ConnectionMultiplexer.Connect("redis:6379"));services.AddScoped<IReportServiceConfiguration, CustomReportServiceConfiguration>();
Compose file:
version: '3'services: web: depends_on: - "redis" build: context: . dockerfile: ./src/Dpc/AdministrationPortal/Stf.WebApp/Dockerfile ports: - "9901:80" links: - "redis" redis: image: redis:latest ports: - 6379:6379 volumes: - ./redis.conf:/redis.conf command: [ "redis-server", "/redis.conf" ]
So when it run from Visual Studio in localhost envirnoment all fine, when redis work in docker and app in localhost all work fine. But when both (app and redis) runs in docker, reporting always failed with 400 error upon trying to register new client with post request at api/RegionReporting/clients in same time '/formats' works fine.