Getting Sql Connection Error while rendering the Telerik Report in ,net Core App

0 Answers 86 Views
.NET Core DataSources General Discussions Rendering Report Designer (standalone) Report Parameters
shabeer
Top achievements
Rank 1
shabeer asked on 07 Mar 2022, 06:02 PM | edited on 07 Mar 2022, 06:37 PM

Hi Friends,

 I am unable to render the  Telerik Report in the .net core App.

          ReportSource report = new InvoiceTest(); //calling from the dll
                    report.Parameters.Add("id", 1);
                    report.Parameters.Add("UserId", invoice.userId);
                
                    RenderingResult result  = reportProcessor.RenderReport("PDF", report,null);

                    if (!result.HasErrors)
                    {
                        string fileName = result.DocumentName + "." + result.Extension;
                        string path = System.IO.Path.GetTempPath();
                        string filePath = System.IO.Path.Combine(path, fileName);

                        using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                        {
                            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                        }
                    }

My error message like :

InnerException = {"Format of the initialization string does not conform to specification starting at index 0."}

your help on this would be greatly appreciated

 

 

 

 

 

 

Dimitar
Telerik team
commented on 10 Mar 2022, 12:28 PM

The "Format of the initialization string does not conform to specification starting at index 0" error can be caused by a missing or invalid connection string. Double-check if the connection string(s), used by the report's SqlDataSource component(s), is(are) copied in the application's configuration file(appsettings.json/app.config).

Also, test the connection string in a SQL management tool to ensure that it is correct.

 

No answers yet. Maybe you can help?

Tags
.NET Core DataSources General Discussions Rendering Report Designer (standalone) Report Parameters
Asked by
shabeer
Top achievements
Rank 1
Share this question
or