Telerik Forums
Reporting Forum
2 answers
129 views

While developing an endpoint (.NET 6 API) to export a PDF from a TRDX file ( no problems here ) I decided to publish to the test environment.

I keep getting this error :

 

2024-02-19T06:04:14.518155356Z System.MissingMethodException: Type: Telerik.Reporting.ReportSerialization.Current.ReportSerializable`1[Telerik.Reporting.Report]
2024-02-19T06:04:14.518227356Z ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
2024-02-19T06:04:14.525815894Z ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
2024-02-19T06:04:14.525839694Z ---> System.TypeInitializationException: The type initializer for 'Telerik.Reporting.Drawing.Unit' threw an exception.
2024-02-19T06:04:14.525845694Z ---> Telerik.Drawing.Contract.DrawingFactoryUnavailableException: Cannot load assembly Telerik.Drawing.Skia. Make sure it is accessible in the current application domain.
2024-02-19T06:04:14.525850094Z at Telerik.Drawing.Contract.DrawingFactory.GetFactoryBase(String factoryTypeName, String factoryAssemblyName, Boolean assemblyLoaded)
2024-02-19T06:04:14.525854594Z at Telerik.Drawing.Contract.DrawingFactory.GetSkiaInstance()
2024-02-19T06:04:14.525858494Z at Telerik.Drawing.Contract.DrawingFactory.TryResolveFromRuntime()
2024-02-19T06:04:14.525862394Z at Telerik.Drawing.Contract.DrawingFactory.ResolveDrawingFactory()
2024-02-19T06:04:14.525866094Z at Telerik.Drawing.Contract.DrawingFactory.CreateDrawingFactory()
2024-02-19T06:04:14.525869694Z at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
2024-02-19T06:04:14.525873394Z at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
2024-02-19T06:04:14.525877094Z at System.Lazy`1.CreateValue()
2024-02-19T06:04:14.525880593Z at System.Lazy`1.get_Value()
2024-02-19T06:04:14.525884293Z at Telerik.Drawing.Contract.DrawingFactory.get_Instance()
2024-02-19T06:04:14.525887893Z at Telerik.Reporting.Drawing.Unit.GetDotsPerInch()
2024-02-19T06:04:14.525891493Z at Telerik.Reporting.Drawing.Unit.ResetDpiSettings()
2024-02-19T06:04:14.525895093Z at Telerik.Reporting.Drawing.Unit..cctor()
2024-02-19T06:04:14.525898593Z --- End of inner exception stack trace ---
2024-02-19T06:04:14.525902093Z at Telerik.Reporting.Drawing.Unit.Cm(Int32 value)
2024-02-19T06:04:14.525924393Z at Telerik.Reporting.Report..ctor()
2024-02-19T06:04:14.525929493Z at System.RuntimeType.CreateInstanceOfT()
2024-02-19T06:04:14.525933093Z --- End of inner exception stack trace ---
2024-02-19T06:04:14.525936593Z at System.RuntimeType.CreateInstanceOfT()
2024-02-19T06:04:14.525940093Z at System.Activator.CreateInstance[T]()
2024-02-19T06:04:14.525943593Z at Telerik.Reporting.ReportSerialization.Current.ReportSerializable`1..ctor(IConvertersContainer converters)
2024-02-19T06:04:14.525947293Z --- End of inner exception stack trace ---
2024-02-19T06:04:14.525950893Z at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
2024-02-19T06:04:14.525954893Z at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
2024-02-19T06:04:14.525959993Z at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
2024-02-19T06:04:14.525963993Z at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
2024-02-19T06:04:14.564619278Z at System.Activator.CreateInstance(Type type, Object[] args)
2024-02-19T06:04:14.564649677Z at Telerik.Reporting.Serialization.ObjectReader.CreateInstance(Type type, String name)
2024-02-19T06:04:14.564655577Z --- End of inner exception stack trace ---
2024-02-19T06:04:14.564659977Z at Telerik.Reporting.Serialization.ObjectReader.CreateInstance(Type type, String name)
2024-02-19T06:04:14.564663977Z at Telerik.Reporting.Serialization.ObjectReader.CreateInstance(Type type)
2024-02-19T06:04:14.564668077Z at Telerik.Reporting.Serialization.ObjectReader.ReadObject(Type type)
2024-02-19T06:04:14.564672077Z at Telerik.Reporting.Serialization.ObjectReader.ReadXmlElement(String name)
2024-02-19T06:04:14.564675877Z at Telerik.Reporting.Serialization.ObjectReader.Deserialize(IResourceHandler handler)
2024-02-19T06:04:14.564679577Z at Telerik.Reporting.XmlSerialization.XmlSerializerBase.Deserialize(XmlReader reader, IResourceHandler resourceHandler)
2024-02-19T06:04:14.564683477Z at Telerik.Reporting.XmlSerialization.XmlSerializerBase.Deserialize(Stream stream, IResourceHandler resourceHandler)

2024-02-19T06:04:14.564687177Z at Telerik.Reporting.XmlSerialization.ReportXmlSerializer.Deserialize(Stream stream)

 

Is this error related to the Trial version or is there anything else?

Dimitar
Telerik team
 answered on 20 Feb 2024
1 answer
216 views

I wish to integrate a telerik report viewer into a blazor application (I am using Dot net 6.0).. I have set up a Reporting Server also using Dot net 6.0
I wish to use Oracle db as the data Source of my application
I have tried the following steps

1.Opened the default Telerik.ReportDesigner

2.Clicked on new and added the datasource

3.Selected Sql Data Source

4.Clicked on build new connection and selected OracleClient Data Provider

5.Chose build option

6. In the Data Source clicked on change and selected  .Net Framework Data provider for Ole Db (as the other one is shown as deprecated)

7. Filled the feilds and when cliked on test connection, it is showing " The  'MSDORA' provider is not registered on the local machine"


I looked into the issue and tried shifting to Telerik.ReportDesigner x86 application

I followed the same steps as above and when i clicked on "test connection", it is showing an error  "Oracle client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version on 7.3.3 or later client software installation.Provider is unable to function until these components are installed"

which application should i use and is there any solution to get rid of this error
Kindly provide as solution for this
I am using Oracle Db version "Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production"

my connection string is like "Data Source={111.111.1.11:2222};User Id={useid};Password={pass}"

1 answer
241 views

Hi,

I'm migrating my solution from Dot Net Framework to Dot Net Core 6. On Local Dev Machine which is running on Windows, the reports are getting generated without any issues, but when the same is run in a Docker Container it fails with the following exceptions.

 

 

 

 

I have already tried installing the required libraries which are mentioned in this post but the same persists

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 46555
RUN apt-get update \
    && apt-get install -y --allow-unauthenticated \
        libc6-dev \
        libgdiplus \
        libx11-dev \
    && rm -rf /var/lib/apt/lists/*

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS setup
WORKDIR /src
RUN dotnet restore "SampleProject/SampleReports.csproj"
COPY . .

FROM setup AS build
WORKDIR "/src/"
RUN dotnet build "SampleReports.csproj" -c Release -o /app/build


FROM build AS publish
RUN dotnet publish "SampleReports.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "SampleReports.dll"]

Other information that I would like to add are that my solution uses direct references to Telerik dlls.

Dimitar
Telerik team
 answered on 05 Apr 2023
1 answer
341 views

I have a web application that consists of an API hsoted in Azure functions and a front end as Blazor wasm hosted in Azure blob storage as statis site.

I need to add a report for users so that each user see their own data based on data passed to the report.

1) Can reporting be used with Azure functions?

2) If yes, any sample code to guide me?

Dimitar
Telerik team
 answered on 28 Mar 2023
1 answer
232 views

While rendering report got Error like this Error loading the report viewer's templates. (trvTemplateUrl = 'https://abcdf.com/api/reports/resources/templates/telerikReportViewerTemplate-16.0.22.225.html/').  when i try this same telerik reporting from other domain it's working only this domain it gave this error. and network it shows like CORS error. we don't know where to allow all the domain address.       In Asp.net we have this config to enable CORS          



  services.AddCors(c =>
            {
                c.AddPolicy("AllowOrigin", options => options.AllowAnyOrigin().AllowAnyHeader().WithExposedHeaders("X-total-count")); 
                c.AddPolicy("ReportingRestPolicy", corsOptions => corsOptions.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
            });



            app.UseCors("ReportingRestPolicy");
And We noticed that if i try to run domain1 with chrome and domain2 with Edge. both domains are working.  In same browser which domain i run first that works. If i try to run next domain it gives error.
0 answers
36 views

Hi all,

Some times we are getting above attached errors when generating reports. after pressing refresh button the report will load correctly. we are using .net 6 app to show the report viewer.

 

Are there any solutions to fix my issue. If any one want more information please comment below..
Thank you

 

Mail
Top achievements
Rank 1
 updated question on 21 Jul 2022
0 answers
213 views

Say I have a list of object and I want a field to show one specific value from those objects.


public class Data
{
  public List<Obj> Objects { get; set;}
}

public class Obj
{
  public string Name { get; set;}
  public int Id { get; set;}
}

 

Data reportData = [

     {Name: abc, Id: 4 },

     {Name: def, Id: 5 }

]

I want to show the Name (in a textbox) where Id = 5. How do I do that?

 

I tried doing it with a user function where I pass the array but it throws an error when I try to cast object back to Obj class that (webservice.jsonObject can't be cast to Obj class). If I can't cast the object to Obj class, how am I supposed to filter it?

Miftaul
Top achievements
Rank 1
 asked on 12 May 2022
0 answers
70 views

I'm trying to achieve something in a report, and I'm getting nowhere and beginning to wonder whether I'm doing this all wrong.

As a data source for my report, I have a CLR object; It has the following structure (specifically the Bundle object):

 public class Bundle
    {
        public uint BatchId { get; set; }
        public uint BundleId { get; set; }
        public List<BundleItem> Items { get; set; } = new List<BundleItem>();
    }

    public class BundleItem
    {
        public uint CheckNo { get; set; }
        public string ReceivedFrom { get; set; }
        public string Bank { get; set; }
        public string Memo { get; set; }
        public decimal Amount { get; set; }
        public ushort AccountNo { get; set; }
        public string AccountDescription { get; set; }
#if NET6_0
        public DateOnly ContribDate {get;set;}
#else
        public string ContribDate { get; set; }
#endif
        public ushort PaymentType { get; set; }
        public DateTime EntryDateTime { get; set; }
    }

I'm able to instantiate that object, and want to pass it off to a report to render; it's a complicated scenario regarding how that CLR object is instantiated, so I'm not able to use something like a SqlDataSource, so I'm assuming the correct data source type to use is an objectDataSource. That side of things so far is working (as best as I can tell):

I need to build two different reports from this data: one that aggregates the BundleItems (contained in the Items property), and one that displays the list of BundleItems and their fields. I can drag-drop [= Fields.BatchId] and [= Fields.BundleId] to the report designer (I'm using VS integrated designer) and that works fine. I'm binding the datasource to the report via:

BundleReport report = new ();
report.DataSource = (object)_detailsList;
ReportViewer1.ReportSource = report;
ReportViewer1.ViewMode = ViewMode.PrintPreview;
ReportViewer1.RefreshReport();

That causes the report to open and display successfully. Success so far! 

The problems I'm having are related to the List<BundleItems>; no matter what I do the ReportViewer is just (I'm guessing) calling .ToString() on the list and getting back the type name. This has left me to wonder if I'm trying to do something that's just not supported; is there a way for me to visualize a List<BundleItem> in a report directly? Does it have to be done via a sub report? I'm feeling lost - and wondering if I'm just trying to achieve something that it's not really designed for (I know the old ReportViewer WinForm control hated working with anything other than DataSets).

Any guidance is greatly appreciated!

0 answers
283 views

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

 

 

 

 

 

 

0 answers
68 views

Hi,

I would like to select multiple rows in grid and than by clicking on custom action to pass them on to report and show them as available values for report parameter.

Are there any working examples of this behavior? I'm using ASP.NET Core UI, working on .NET 5.0.

Stefan
Top achievements
Rank 1
Iron
 updated question on 27 Dec 2021
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?