Telerik Forums
Reporting Forum
4 answers
639 views

 

following exception occured in .net core api:

Telerik.Reporting.Processing.Data.SqlDataSourceException: Unable to establish a connection to the database. Please verify that your connection string is valid. In case you use a named connection string from the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your application. ---> System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.

   at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
   at System.Data.Common.DbConnectionOptions.ParseInternal(Dictionary`2 parsetable, String connectionString, Boolean buildChain, Dictionary`2 synonyms, Boolean firstKey)
   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Dictionary`2 synonyms)
   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
   at Telerik.Reporting.Processing.Data.SqlCommandProvider.CreateConnection(String connectionString)
   at Telerik.Reporting.Processing.Data.SqlQueryProvider.CreateConnection()

Silviya
Telerik team
 answered on 14 Aug 2019
1 answer
137 views

I have a master report and a subreport.  The master report has a section that is assigned a data source and creates a line for each item in the data source, and one segment of that section is the subreport.  This is all done in UI, not programmatically.  The parameters are set up and sent properly, and if I just assign the parameters to a textbox in the subform, they are rendered properly.  However, I need that subreport to take a parameter and do some programmatic work, not just assign it to a field with UI configurations.  In this case, it reads a string parameter, calls other code with that string to generate more data, and uses that data to draw custom text objects on the form.

The parameter passing to a field works fine.  The code that reads does the extra building works fine.  What doesn't work is that the code in the subform is unable to read the parameters.  If I read ReportParamters[0].Value in the constructor method of the subform, it returns the default value of the parameter, not the value that shows up in the textbox.  I have tried capturing each of the raised events and testing on those points, all with the same results.  So far, it appears that the ReportParameters are not passed to the subform until all of the code-based events have transpired.  If I try to read the text-box programmatically, the value given is the formula for the parameter, not the value of the passed parameter.  Is there an event that I am missing, or is a subform just not expected to do any programmatic work with the parameters given?

Clifton
Top achievements
Rank 1
 answered on 13 Aug 2019
1 answer
283 views

Hi,

i need wrap text in tool tip TextBox. How i can do this?

 

Best reguards 

Kevin Moschella

Silviya
Telerik team
 answered on 13 Aug 2019
1 answer
920 views

// following example to create pdf from report template which created using standalone designer template

public class ReportsController : ReportsControllerBase
 {
     readonly string reportsPath = string.Empty;
        
     private IHostingEnvironment _hostingEnvironment;
        

    public ReportsController(ConfigurationService configSvc)
    {
        this.reportsPath = Path.Combine("PathWhereReportTemplatesStored", "Reports"); //concatenate the path using the OS path delimiter.
        
        this.ReportServiceConfiguration = new ReportServiceConfiguration
        {
            ReportingEngineConfiguration = configSvc.Configuration,
            HostAppId = "Html5DemoAppCore",
            Storage = new FileStorage(),
            ReportResolver = new ReportTypeResolver()
                                .AddFallbackResolver(new ReportFileResolver(this.reportsPath)),
            
        };
    }

    [HttpGet("reportlist")]
    public IEnumerable<string> GetReports()
    {
        return Directory
            .GetFiles(this.reportsPath)
            .Select(path =>
                Path.GetFileName(path));
    }
         
    //https://www.telerik.com/support/kb/reporting/styling-and-formatting-reports/details/exporting-a-report-to-pdf-programmatically
    [HttpGet]
    public IActionResult createPdf()
    {
        string fileName = "report_" + DateTime.Now.Ticks + ".pdf";

        // https://docs.telerik.com/reporting/report-sources-viewers
        var uriReportSource = new Telerik.Reporting.UriReportSource();
        
        // Specifying an URL or a file path
        uriReportSource.Uri = reportsPath + "\\reportTemplate.trdp";    // report template designed using standalone report designer
        
        // Optional, pass param values to report, Adding the initial parameter values
        uriReportSource.Parameters.Add(new Telerik.Reporting.Parameter("param1", "value"));
        uriReportSource.Parameters.Add(new Telerik.Reporting.Parameter("param2", "value"));

        ReportProcessor reportProcessor = new ReportProcessor();

        RenderingResult result = reportProcessor.RenderReport("PDF", uriReportSource, null);     

        // to write pdf on disc, omit if not required
        using (FileStream fs = new FileStream("PathWhereYouWantToWritePdfOnDisk" + "pdfName.pdf", FileMode.Create))
        {
            fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
        }    

        return File(result.DocumentBytes, "application/pdf", fileName);    // in case , user clicks on link and download report
    }

 }

Silviya
Telerik team
 answered on 13 Aug 2019
2 answers
328 views

We are working on a report feature in our web app, and we are not sure if we need to be using Reporting or the Document processing.

I have attached the report template that I am trying to create in our application to this thread as an example. There are some simple tables as well as some indent formatting of data that will be needed. Our data to populate the report will be retrieved using a REST service api call.

 

I have started on making the report in the Telerik reporting, but I can only control page breaks through creating new groupings. Right now I have individual pages in the group headers and footers. Is this normal for creating a report that has to have page breaks?

 

Another issue I have run across is the ability to export the report as a word document and having the user fill in sections on their own. This is hard to do with the report tool because the sizes of the text boxes are fixed sizes when they get exported, which can cause the users not enough room to enter their text.

 

What are the main differences between the Reporting tool and Document Processing? I have noticed that the Reporting tool has more capabilities to display data in an appealing way, but that isn't really needed for this report.

 

Peshito
Telerik team
 answered on 12 Aug 2019
2 answers
426 views
Hello there,
Hope I can explain what I am encountering on my end and someone could help me out.

I am working on a report where I want to display employee details along with the educational background like his/her college or university. When I use just table in the detail section to display the employee educational details it shows all records for every employee like it should i.e 2 records for an employee but when I use textbox above the table to show the name, fathername, phone for employee it shows the record on 2 pages one for university and then for college thinking it as 2 different employees though it should move to the second page only when employee is other than this one. I hope you can understand what I want to say.

Can anyone help me out ?
Todor
Telerik team
 answered on 12 Aug 2019
1 answer
1.1K+ views

I am attempting to add the Angular Report Viewer to and ASP.NET Zero project.

 

When I add
import { TelerikReportingModule } from '@progress/telerik-angular-report-viewer';
to the app.module.ts

I get the following error when starting the app.
core.js:1601 ERROR TypeError: $.blockUI is not a function
    at Object.abp.ui.block (abp.blockUI.js:20)
    at Object.abp.ui.setBusy (abp.spin.js:47)
    at Array.<anonymous> (root.module.ts:27)
    at ApplicationInitStatus.push../node_modules/@angular/core/fesm5/core.js.ApplicationInitStatus.runInitializers(core.js:3166)
    at core.js:4740
    at _callAndReportToErrorHandler (core.js:4883)
    at core.js:4738
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
    at Object.onInvoke (core.js:4071)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)

It seems related to this issue, https://support.aspnetzero.com/QA/Questions/6156.

 

Has anyone had any luck getting the angular report viewer working with ASP.NET Zero?

Silviya
Telerik team
 answered on 12 Aug 2019
3 answers
462 views
Hi, I am looking the possibilities of Telerik to make some "Formulas" (Standalone Report designer).

I am not talking about to make a simple "Hello Mr John Smith", but some of my fields in my database need to be "decrypted".

For example (stupid example just to be understandable) if I have a field CarDetails, and the field is made as the following :

<CarModel>;<CarCountry>;<CarYearOfFabrication>...

I need to use Splits, Count() etc... functions. In my case this is for some matrix, I need to know the dimension of the matrix, and make easy calculations between their fields.

Is this kind of stuff possible in Telerik?I am used to Crystal Reports where I do it without problem, but I wish to change to Telerik, if this kind of job is possible

Thanks in advance
Silviya
Telerik team
 answered on 12 Aug 2019
8 answers
985 views
Hi,

is it possible to create a PDF file from telerik reporting automatically, not export it. I want to create the PDF file with it and save it to the servers disk space, for later usage.

Thanks and best regards,
Thomas
Neli
Telerik team
 answered on 08 Aug 2019
5 answers
1.6K+ views

Hello,

 

I have a question about border style in dynamic table. See atach file. I need border only last row ( border the lower edge of the last dynamic line) Can this be set?

 

 

Adrián Petráš

Ivan Hristov
Telerik team
 answered on 06 Aug 2019
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?