Telerik Forums
Reporting Forum
0 answers
83 views

Hello, Im facing a problem with c# telerik report designer.  We have specified report and all columns were looking good until we add one more "Comments". So major view looks ok but all childs have moved rows into right side without any reason and column are not aligned to its parent. How to align this? picture in attachment.

1 answer
72 views

Let’s say we have the data below.

How could I put this into a table and it show only the items in each Pet/Grouping per page.    

For example:

Page 1

Page 2

Page 3

I tried making a group header for Pet, with a child of Grouping and then putting a page break at the bottom of the Grouping group but that didn’t work.  I always get the result at the bottom here.

What am I missing?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Jun 2024
0 answers
120 views

Hello

I'm using the WebDataSource component from Web Report Designer, and I want to receive data from our REST API. 

On endpoints with no auth it works fine and the data gets loaded. But when I try to use 2-step auth (get token and pass it to api), I get a popup from web data source Wizard:

Error

Could not get preview.. An error has occurred. Object reference not set to an instance of an object.

 

And the debugger shows this:

WebDesigner Warning: 0 : Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
   at Telerik.Reporting.Processing.WebServiceDataSource.ErrorParsers.ErrorManager.ParseJson(String responseContent)
WebDesigner Error: 0 : Object reference not set to an instance of an object.
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.SendCore(IWebServiceRequestSettings settings, AuthenticationHeaderValue authHeader, HttpClient httpClient, HttpClientHandler httpClientHandler)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.GetTwoStepAuthorizationHeader(WebServiceTwoStepAuthentication processedAuth)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.Request(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.GetRemoteRawData(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.get_RawData()
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceSchemaAdapter.AddDataMeasures(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.GetSchemaCore()
   at Telerik.Reporting.Processing.Data.DataProvider`1.Telerik.Reporting.Processing.Data.IDataProvider.GetSchema()
   at Telerik.WebReportDesigner.Services.ConnectionsService.GetDataModel(DataSourceInfo dsi)
WebDesigner Error: 0 : Object reference not set to an instance of an object.
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.SendCore(IWebServiceRequestSettings settings, AuthenticationHeaderValue authHeader, HttpClient httpClient, HttpClientHandler httpClientHandler)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.GetTwoStepAuthorizationHeader(WebServiceTwoStepAuthentication processedAuth)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceClient.Request(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.GetRemoteRawData(WebServiceDataSource processedDS)
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider.get_RawData()
   at Telerik.Reporting.Processing.WebServiceDataSource.WebServiceSchemaAdapter.AddDataMeasures(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.GetSchemaCore()
   at Telerik.Reporting.Processing.Data.DataProvider`1.Telerik.Reporting.Processing.Data.IDataProvider.GetSchema()
   at Telerik.WebReportDesigner.Services.ConnectionsService.GetDataModel(DataSourceInfo dsi)

Auth URL is `https://localhost:5001/api/Account/Token2` and it should return plain text string with the token.

Request body is

{
  "login": "admin",
  "password": "foobar"
}

I click next-next in the Wizard and on the last step get the error above.

Why does not it work ??

Dmitry
Top achievements
Rank 1
 asked on 17 Jun 2024
1 answer
96 views
Currently have a report setup with a summary view and detail view. The summary view can have at the most 10 pages but if they go to detail it can have anywhere from 100-5000 pages. I have scoured through the web and I cant seem to find it, but I would like to have the report set to where if they choose "Detail" view, it won't render on the page but auto go to export to excel. Is this possible? At this point it can take longer than 4 minutes to render.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 06 Jun 2024
1 answer
713 views

I have tried generating a PDF directly from my report and I have tried opening it in a viewer.  I always come back to this error.

FileNotFoundException: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

I've tried installing the package listed in Nuget, but that exact version does not appear to be available.  The versions I tried did not fix the problem.

Here is my code for generating the report...


InstanceReportSource report = new InstanceReportSource();
report.ReportDocument = new BatchReport();
report.Parameters.Add("BatchNumber", batch.ID);

ReportGenerator.DisplayPDF(report);



public static void DisplayPDF(InstanceReportSource source)
{
    ReportProcessor reportProcessor = new ReportProcessor();
    RenderingResult result = reportProcessor.RenderReport("PDF", source, 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);
        }

        Process.Start($"file://{filePath}");
    }
}

BTW, I am working on a .NET Framework 4.7.2 project.
Todor
Telerik team
 answered on 04 Jun 2024
1 answer
160 views

Hello, 

I have .trdp files that have a textbox with a culture set as 'en-US' and the format for the textbox is '{0:C2}'.

There is no such change in the file.

It was rendering negative currency values properly until I updated  Telerik. Reporting  Nuget version from  NuGet '17.2.23.1010' to '17.2.23.1114' in my .Net 7 project.

Please, guide me if I am missing something.

1 answer
76 views
Where is the code usually kept?
Momchil
Telerik team
 answered on 28 May 2024
1 answer
135 views
I'm generating a lot of reports using the ReportProcessor class and the RenderReport function to get the PDF and save it in a share drive.

private byte[] GetReport(int param)
    {
        var reportProcessor = new ReportProcessor();
        var reportSource = new UriReportSource
        {
            Uri = Path.Combine(_environment.ContentRootPath, "Reports", "Report.trdp"),
        };

        reportSource.Parameters.Add(new Parameter("param", param));

        var result = reportProcessor.RenderReport("PDF", reportSource, new Hashtable());
        return result.DocumentBytes;
    }

This works fine. But if I only run the application and get to generate the reports I get:

"An error has occurred while processing Report 'Report':
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.
------------- InnerException -------------
Format of the initialization string does not conform to specification starting at index 0."

The part that I don't understand is that if I go to the page where I have a HTML5 Report Viewer and generate and view a report from the page the error goes away.

I search a lot about this and tried different things and got nothing.

The problem might be related with the appsettings.

We have different configuration for each env and the appsettings.json is merged with appsettings.ENV.json 

I tried to put the con string in the base appsettings and worked fine.

I need a solution because I still need to have diferent connectionstrings in different enviorments and I can't reliable run the report in the viewer before generate the standalone PDF
Dimitar
Telerik team
 answered on 23 May 2024
1 answer
120 views

Hi,

We're currently investigating Telerik reporting as a replacement reporting product. There are two features we're trying to understand if there is a suitable method in Telerik.

1. Parameters driven report. We want to able to present the user with parameters before the report retrieves any data.

As an example, present a list of sites that the user can choose from and then retrieve the data for only that site in the report. I've included a link to a similar idea seen in another product.

https://developer.mescius.com/activereportsnet/demos/dynamic/parameter-driven

2. Drop down tree filter

When a report is loaded to be able to filter with a drop down tree filter similar to the Kendo component.

As an example, the user opens a report for all sites. This list contains 200 sites. After opening they want to filter to only show a small subset of those sites. The drop down tree would be ideal for this.

https://demos.telerik.com/kendo-ui/dropdowntree/index

 

Dimitar
Telerik team
 answered on 22 May 2024
1 answer
77 views

This is how i want it to look like.  I also want to populate the table without using wizard

 

Todor
Telerik team
 answered on 20 May 2024
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?