Telerik Forums
Reporting Forum
1 answer
197 views

Hi,

We have a scenario where we need to render the report in multiple worksheets(sheets) within a excel (xlsx) file. We are successful in generating such report when rendered through the desktop client and also in Report Viewer, but when trying to generate the file using  Telerik.Reporting.Processing.ReportProcessor.RenderReport() method, the data is not splitted in to two sheets. Everything is rendered in single sheet.

The way I am rendering the report is simple - 

            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            var manager = new ReportConnectionStringManager(connectionString);
            ReportSource reportSource = manager.UpdateReportSource(uriReportSource);

            var result = reportProcessor.RenderReport("XLSX", reportSource, null);

and in the report design, we are using SplitWorksheetOnPageBreak property.

 

Please help us in achieving what we want. Is there any other way to render the report.

 

Thanks,

Jyothi

Dimitar
Telerik team
 answered on 24 Aug 2023
1 answer
183 views

Hi every one,

I have to, only show PDF in download list in angular report viewer, I found this list returned from this api

https://docs.telerik.com/reporting/embedding-reports/host-the-report-engine-remotely/rest-api-reference/general-api/get-available-document-formats

I also found answer in

https://www.telerik.com/forums/180100-export-only-in-pdf-format-possible

and to setup Telerik configurations

https://docs.telerik.com/reporting/doc-output/configure-the-report-engine/overview

My question is, I follow above link to setting up Telerik configuration in appsetting.json but still unable to show only PDF as my purpose, does any one have any example of json file or I missed something else.

Thanks and appreciate.

Momchil
Telerik team
 answered on 24 Aug 2023
1 answer
117 views

I want to get the Height of the TextBox on the right of my Vertical Line. I was thinking of using Bindings and Value but I dont know how I can do it.

Momchil
Telerik team
 answered on 24 Aug 2023
1 answer
669 views

Hi,

I have report xml data previously produced with Telerik Windows Designer in my database. That is the xml version of the report.

For example:
<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Report Width=\"6.5in\" Name=\"test\" xmlns=\"http:// schemas.telerik.com/reporting/2021/1.0\">\r\n <Items>\r\n <PageHeaderSection Height=\"1in\" Name=\"pageHeaderSection1\">\r\n <Items>\ r\n <TextBox Width=\"1.2in\" Height=\"0.2in\" Left=\"2.7in\" Top=\"0.4in\" Value=\"test\" Name=\"textBox1\ " />\r\n </Items>\r\n </PageHeaderSection>\r\n <DetailSection Height=\"2in\" Name=\"detailSection1\" />\r\n <PageFooterSection Height=\ "1in\" Name=\"pageFooterSection1\" />\r\n </Items>\r\n <PageSettings PaperKind=\"Letter\" Landscape=\"False\" ColumnCount=\"1\" ColumnSpacing= \"0in\">\r\n <Margins>\r\n <MarginsU Left=\"1in\" Right=\"1in\" Top=\"1in\" Bottom=\"1in\" />\ r\n </Margins>\r\n </PageSettings>\r\n <StyleSheet>\r\n <StyleRule>\r\n <Style>\r\n <Padding Left=\"2pt\" Right =\"2pt\" />\r\n </Style>\r\n <Selectors>\r\n <TypeSelector Type=\"TextItemBase\" />\r\n <TypeSelector Type=\"HtmlTextBox\ " />\r\n </Selectors>\r\n </StyleRule>\r\n </StyleSheet>\r\n</Report>

I want to be able to design and send such xml content to web report designer.
Converting to json format, deserizale etc. I tried many methods but without success.

Error:
Uncaught (in promise) SyntaxError: Unexpected token '<', "<?xml vers"... is not valid JSON

Some methods I've tried:

var xml = (XmlReportSource)sourceReportSource;
var reportInstance = this.DeserializeReport(xml);
var ss = this.DeserializeReport(xml);

XmlDocument doc = new XmlDocument();
doc.LoadXml(result);
var json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc, Newtonsoft.Json.Formatting.None, true);

I would be very happy if you could help with this.
enjoy your work.
1 answer
74 views
buen dia, necesito ayuda, quiero programar un boton para que telerik me mande un reporte periódicamente, pero no se como hacerlo ayudenme porfavor 😞
Dimitar
Telerik team
 answered on 23 Aug 2023
1 answer
780 views

We have many Telerik reports that are fed from SQL Server stored procedures, some of which pull from columns with a type of decimal(38,18) (SQL's max). The system that interacts with these reports uses C# and we limit the values for those columns to 28 significant figures (C#'s max).

 

For example, these values would not be supported by our system:

  • 12,345,678,901.123456789012345678 (11 LHS digits + 18 decimals = 29 total digits)
  • 12,345,678,901,234,567,890.123456789 (20 LHS digits + 9 decimals = 29 total digits)

 

While these would be:

  • 12,345,678,901,234,567,890.12345678 (20 LHS digits + 8 decimals = 28 total digits)
  • 1,234,567,890.123456789012345678 (10 LHS digits + 18 decimals = 28 total digits)

 

We're running into some "Conversion overflows" errors with numbers that have <= 28 significant digits, which after troubleshooting we found to be occurring in Telerik's internal SQL processing, specifically in the System.Data.SqlClient library. Which has this ticket logged: https://github.com/dotnet/SqlClient/issues/95

 

Our system uses Microsoft.Data.SqlClient, which correctly handles truncating trailing zeros.

 

Is there any option for Telerik using the Microsoft.Data.SqlClient library rather than the System.Data.SqlClient library or any other workaround available for this issue? 

 

Here is the full stack trace:

System.OverflowException: Conversion overflows.

   at System.Data.SqlClient.SqlBuffer.get_Decimal()

   at System.Data.SqlClient.SqlBuffer.get_Value()

   at System.Data.SqlClient.SqlDataReader.GetValues(Object[] values)

   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.ReadValues(IDataReader reader)

   at Telerik.Reporting.Processing.Data.SqlDataEnumerable.GetEnumerator()+MoveNext()

   at Telerik.Reporting.Processing.Data.LazyList`1.LazyListEnumerator.MoveNext()

   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)

   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)

   at Telerik.Reporting.Processing.Data.SeedDataAdapter.Execute(IEnumerable`1 data)

   at Telerik.Reporting.Processing.Data.ResultSetAdapter.Execute(IEnumerable`1 data)

   at Telerik.Reporting.Processing.Data.MultidimentionalDataProvider.Execute(MultidimensionalQuery query)

   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.GetDataCore(IDataSource dataSource, MultidimensionalQuery query, IServiceProvider serviceProvider, EvalObject expressionContext, IProcessingContext processingContext)

   at Telerik.Reporting.Processing.Report.GetDataCore(IDataSource dataSource, MultidimensionalQuery query)

   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.ResolveData(String processingId, InMemoryState inMemoryState, MultidimensionalQuery query, Func`1 getDataCore, EvalObject expressionContext)

   at Telerik.Reporting.Processing.Report.ResolveData()

   at Telerik.Reporting.Processing.Report.ProcessItemCore()

   at Telerik.Reporting.Processing.Report.ProcessItem()

   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()

   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)

Dimitar
Telerik team
 answered on 23 Aug 2023
2 answers
238 views

Hi support team,

Currently I have 3 reports called A, B, C with format *.trdp

I used CustomReportResolver to bind datasource for these reports. The problem is I have to use if else condition to know which report is A or B or C to get and bind correct data to the report. Imagine I have 100 reports it will be nightmare for me.

Do we have any way to resolve this or any way to get data source at run time for Standalone Report except the way I described above ?

NOTE: Before I used Visual Studio Report Designer and use NeedDataSource event in each report to get data for them now I have this issue when migrate to Standalone Report Designer.

Example Code:

public ReportSource Resolve(string reportId, OperationOrigin operationOrigin, IDictionary<string, object> currentParameterValues)
{
    var reportPath = Path.Combine(this.ReportsPath, reportId);
    var reportPackager = new ReportPackager();

    Report report = null;
    using (var sourceStream = File.OpenRead(reportPath))
    {
        report = (Report)reportPackager.Unpackage(sourceStream);
    }

    if (reportId == "A")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportA();
        }        
    }
  else if (reportId == "B")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportB();
        }        
    }
else if (reportId == "C")
    {
        if (operationOrigin == OperationOrigin.GenerateReportDocument)
        {
            report.DataSource = GetDataForReportC();
        }        
    }

    return new InstanceReportSource
    {
        ReportDocument = report
    };
}


Thanks

Amr
Top achievements
Rank 1
Iron
 updated answer on 23 Aug 2023
2 answers
121 views
I have a report where I define multiple values to be auto-selected in the Report Parameters value Array. All the items in the Array are selected at report run time but one. I can select the one item on the fly, but I cannot figure out why it is not automatically doing it. The string in question is "RA1".  I am adding the report and screenshots.
Michael
Top achievements
Rank 1
Iron
Iron
 updated answer on 21 Aug 2023
1 answer
92 views

Hi,

I have a ReportViewer in WPF where I display a Report Book with Bookmarks.

I have set DocumentMapVisible="False" but still the ReportViewer srtarts with visible DocumentMap.

Do I have to set another value?

Because I set the Report Source programmatically I have also tried to set the DocumentMapVisible to false there again but it changes nothing.

Nikolay
Telerik team
 answered on 17 Aug 2023
1 answer
91 views

Hi,

I have a Report Book with multiple Reports and each of them with multiple subreports.

Each Main-Report (the reports directly in the Report Book) has a BookmarkId set.

If I click on one of the bookmarks in the Document Map (or later in a PDF, it's the same behaviour), it jumps not the the beginning of the first page of the report but a bit scrolled down.

It seems to where the Detailsection begins.

 

So my question:

Is it possible to jump to the Pageheader instead somehow?

 

Greetings
Benedikt

 

Momchil
Telerik team
 answered on 17 Aug 2023
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?