Telerik Forums
Reporting Forum
1 answer
142 views

So, I have a report that I can't seem to filter. I want to filter the report based on the SalesCode.

I absolutely know that SalesCode "LB040" exists, but my report is blank when I run it. If I delete the filter, the report shows all the SalesCodes.

Am I formatting it wrong? Is it in the wrong group? I've tried filtering the StopGroup, but that didn't help.

Thanks for the help!!!

 

 

 

Momchil
Telerik team
 answered on 18 Jan 2023
1 answer
148 views

Good Afternoon Telerik,

 

Currently, I have 1 report where I am searching for all the machines in the database using a parameter querying Machine OS(with values in it like Android, IPhone, Windows 10, Windows 8, etc..). It is located in a table called Assets. Here is a sample query of what I am querying. When I run the table with the only sql datasource it returns my selection on the preview data. However, when I run it on the Telerik server the parameter field on the right hand side is completely blank with no values.

SELECT

at.machine name, at.machineos

FROM assets at

WHERE at.machineos IN (:MachineOS)

 

However, when I add a new SQLDataSource with the same information above and attach the datasource under the parameter to that. It displays the values and correctly queries the data. How can I get it to retrieve the values of the first datasource without making another datasource with the same exact query?

 

(I should also mention, the database is running on a oracle server)

1 answer
417 views

Hi all

this is my first time use telerik reporting with blazor

I have an test App

With Blazor Server App and BlazorWebAssembly as Client 

i add



<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-default@latest/dist/all.css" />

 <script src="_content/Telerik.ReportViewer.Blazor/interop.js" defer></script> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   
    <script src="/api/reports/resources/js/telerikReportViewer"></script>

in wwwroot index in BlazorWebAssembly  

then add a trdp file in BlazorWebAssembly  app with sqldatasource 

then


@page "/"
@using Telerik.ReportViewer.Blazor
<style>
    #rv1 {
        position: relative;
        width: 1200px;
        height: 600px;
    }
</style>
<ReportViewer ViewerId="rv1"
              ServiceUrl="/api/reports"
              ReportSource="@(new ReportSourceOptions()
                              {
                                    Report = "inv1.trdp"
                              })"
              Parameters="@(new ParametersOptions { Editors = new EditorsOptions { MultiSelect = EditorType.ComboBox, SingleSelect = EditorType.ComboBox } })"
              ScaleMode="@(ScaleMode.Specific)"
              Scale="1.0" />

in BlazorWebAssembly   

first do i have any mestak ?

i have some error


Debugging hotkey: Shift+Alt+D (when application has focus)
blazor.webassembly.js:1 blazor Loaded 8.85 MB resourcesThis application was built with linking (tree shaking) disabled. Published applications will be significantly smaller.
blazor.webassembly.js:1 
        
       crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: $(...).telerik_ReportViewer is not a function
      TypeError: $(...).telerik_ReportViewer is not a function
          at Object.createReportViewerWidget (https://localhost:44398/_content/Telerik.ReportViewer.Blazor/interop.js:8:26)
          at https://localhost:44398/_framework/blazor.webassembly.js:1:3942
          at new Promise (<anonymous>)
          at Object.beginInvokeJSFromDotNet (https://localhost:44398/_framework/blazor.webassembly.js:1:3908)
          at Object.w [as invokeJSFromDotNet] (https://localhost:44398/_framework/blazor.webassembly.js:1:64232)
          at _mono_wasm_invoke_js_blazor (https://localhost:44398/_framework/dotnet.5.0.17.js:1:190800)
          at do_icall (wasm://wasm/00aba242:wasm-function[10596]:0x194e4e)
          at do_icall_wrapper (wasm://wasm/00aba242:wasm-function[3305]:0x79df9)
          at interp_exec_method (wasm://wasm/00aba242:wasm-function[2155]:0x44ad3)
          at interp_runtime_invoke (wasm://wasm/00aba242:wasm-function[7862]:0x12efff)
Microsoft.JSInterop.JSException: $(...).telerik_ReportViewer is not a function
TypeError: $(...).telerik_ReportViewer is not a function
    at Object.createReportViewerWidget (https://localhost:44398/_content/Telerik.ReportViewer.Blazor/interop.js:8:26)
    at https://localhost:44398/_framework/blazor.webassembly.js:1:3942
    at new Promise (<anonymous>)
    at Object.beginInvokeJSFromDotNet (https://localhost:44398/_framework/blazor.webassembly.js:1:3908)
    at Object.w [as invokeJSFromDotNet] (https://localhost:44398/_framework/blazor.webassembly.js:1:64232)
    at _mono_wasm_invoke_js_blazor (https://localhost:44398/_framework/dotnet.5.0.17.js:1:190800)
    at do_icall (wasm://wasm/00aba242:wasm-function[10596]:0x194e4e)
    at do_icall_wrapper (wasm://wasm/00aba242:wasm-function[3305]:0x79df9)
    at interp_exec_method (wasm://wasm/00aba242:wasm-function[2155]:0x44ad3)
    at interp_runtime_invoke (wasm://wasm/00aba242:wasm-function[7862]:0x12efff)
   at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__15`1[[System.Object, System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
d.printErr @ blazor.webassembly.js:1
d.preRun.push.window.Blazor._internal.dotNetCriticalError @ blazor.webassembly.js:1
w @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.5.0.17.js:1
$do_icall @ 00aba242:0x194e4e
$do_icall_wrapper @ 00aba242:0x79df9
$interp_exec_method @ 00aba242:0x44ad3
$interp_runtime_invoke @ 00aba242:0x12efff
$mono_jit_runtime_invoke @ 00aba242:0x118e5f
$do_runtime_invoke @ 00aba242:0x79d42
$mono_runtime_try_invoke @ 00aba242:0x12982
$mono_runtime_invoke @ 00aba242:0x10ec2b
$mono_wasm_invoke_method @ 00aba242:0x108e48
Module._mono_wasm_invoke_method @ dotnet.5.0.17.js:1
call_method @ dotnet.5.0.17.js:1
(anonymous) @ dotnet.5.0.17.js:1
endInvokeJSFromDotNet @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
Promise.then (async)
beginInvokeJSFromDotNet @ blazor.webassembly.js:1
w @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.5.0.17.js:1
$do_icall @ 00aba242:0x194e4e
$do_icall_wrapper @ 00aba242:0x79df9
$interp_exec_method @ 00aba242:0x44ad3
$interp_runtime_invoke @ 00aba242:0x12efff
$mono_jit_runtime_invoke @ 00aba242:0x118e5f
$do_runtime_invoke @ 00aba242:0x79d42
$mono_runtime_try_invoke @ 00aba242:0x12982
$mono_runtime_invoke @ 00aba242:0x10ec2b
$mono_wasm_invoke_method @ 00aba242:0x108e48
Module._mono_wasm_invoke_method @ dotnet.5.0.17.js:1
call_method @ dotnet.5.0.17.js:1
set_task_result @ dotnet.5.0.17.js:1
(anonymous) @ dotnet.5.0.17.js:1
Promise.then (async)
js_to_mono_obj @ dotnet.5.0.17.js:1
d.preRun.push.window.Blazor._internal.getSatelliteAssemblies @ blazor.webassembly.js:1
w @ blazor.webassembly.js:1
_mono_wasm_invoke_js_blazor @ dotnet.5.0.17.js:1
$do_icall @ 00aba242:0x194e4e
$do_icall_wrapper @ 00aba242:0x79df9
$interp_exec_method @ 00aba242:0x44ad3
$interp_runtime_invoke @ 00aba242:0x12efff
$mono_jit_runtime_invoke @ 00aba242:0x118e5f
$do_runtime_invoke @ 00aba242:0x79d42
$mono_runtime_invoke_checked @ 00aba242:0xf65d
$mono_runtime_try_invoke_array @ 00aba242:0x10e831
$ves_icall_InternalInvoke @ 00aba242:0xed492
$ves_icall_InternalInvoke_raw @ 00aba242:0xecf57
$do_icall @ 00aba242:0x194ddb
$do_icall_wrapper @ 00aba242:0x79df9
$interp_exec_method @ 00aba242:0x44ad3
$interp_runtime_invoke @ 00aba242:0x12efff
$mono_jit_runtime_invoke @ 00aba242:0x118e5f
$do_runtime_invoke @ 00aba242:0x79d42
$mono_runtime_try_invoke @ 00aba242:0x12982
$mono_runtime_invoke @ 00aba242:0x10ec2b
$mono_wasm_invoke_method @ 00aba242:0x108e48
Module._mono_wasm_invoke_method @ dotnet.5.0.17.js:1
call_method @ dotnet.5.0.17.js:1
(anonymous) @ dotnet.5.0.17.js:1
callEntryPoint @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
a @ blazor.webassembly.js:1
Promise.then (async)
u @ blazor.webassembly.js:1
a @ blazor.webassembly.js:1
Promise.then (async)
u @ blazor.webassembly.js:1
a @ blazor.webassembly.js:1
Promise.then (async)
u @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
r @ blazor.webassembly.js:1
g @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
n @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1
(anonymous) @ blazor.webassembly.js:1

 

regards

arkan
Top achievements
Rank 2
Iron
 answered on 18 Jan 2023
1 answer
238 views

We have an application (Windows Forms), that we have had to set DPI to UNWARE. The reason we have to set DPI to UNWARE, is our application behavior is weird when we set Aware or Aware Per Screen, as controls move, text gets truncated, dropdowns shrink, etc .   With that said, setting DPI to UNWARE, this solves the problem with all the win forms, however, this caused all our reports to have issues. All our reports are being shrunk on the page, with a huge amount of white space to the right and bottom of the page.  This is totally unacceptable to our customers as a lot of our report are designed to work for mailings and/or on pre-printed paper.   Our only solution, at this time, is to have our customers "SAVE AS PDF" and open the PDF and print from there.  Printing to PDF results in the same issue that is explained above.  

Now, we have played around with ways of setting DPI UNWARE and DPI AWARE, but we have been totally unsuccessful in getting our software to work as intended.  We set DPI Aware, reports work fine, but Win Forms are all messed up.  Set DPI Unware, Winforms are fine, but reports are an issue.   

 

Any help would be greatly appreciated.

 

Thank You

Dimitar
Telerik team
 answered on 16 Jan 2023
1 answer
106 views
I have a report that has a report a grouping.  In that report grouping, I want to only display specific fields based on the page number. The page number is resetting for that group. However, the Items in the group header do not seem to see the page number change, so I can't use that.  I thought about using a field in the result set, but that is not either.   This is a pretty complex report, and I could use some help on this, as I don't write reports all the often.
Todor
Telerik team
 answered on 11 Jan 2023
1 answer
254 views

Hello,

I've created a report in standalone report designer with custom function. And saved it in trdp format.

I added a custom function and connected the assembly as described in this manual.

In the report editor, I see my function and use it, however when I try to use this report for printing, my function becomes unavailable.

public class BaseReportBook<TModel> : ReportBook, IDisposable
{
    public virtual byte[] CreatePdf(TModel model, ReportTypeEnum reportType)
    {
        var reportPackager = new ReportPackager();
        using var sourceStream = File.OpenRead(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Reports", reportType.GetDescription()));
        var report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);

        report.ItemDataBinding += new EventHandler((sender, e) => Report_ItemDataBinding(sender, e, model));
        InstanceReportSource reportSource = new InstanceReportSource();
        reportSource.ReportDocument = report;
        ReportSources.Add(reportSource);

        ReportProcessor reportProcessor = new ReportProcessor();
        var instanceReport = new InstanceReportSource();
        instanceReport.ReportDocument = this;
        RenderingResult result = reportProcessor.RenderReport("PDF", instanceReport, null);

        if (result.Errors.Length > 0)
            throw new Exception(string.Join("\r\nError: ", result.Errors.Select(s => s.Message)));
        return result.DocumentBytes;
    }

    private void Report_ItemDataBinding(object sender, EventArgs e, TModel model)
    {
        Telerik.Reporting.Processing.Report item = (Telerik.Reporting.Processing.Report)sender;
        item.DataSource = model;
    }

    protected override void Dispose(bool disposing)
    {
        base.Dispose(disposing);
        GC.SuppressFinalize(this);
        GC.Collect();
    }
}
reportType.GetDescription() returns the name of the report (e.g. test.trdp)

 

The report is successfully generated, but it does not see my function. Although they are in the same assembly.


When viewing the preview in the editor, the function works:

 

Here is the function itself:

public static class CustomFunctions
{
    [Function(Category = "Images", Namespace = "Extension", Description = "Images")]
    public static Image GetLogo() => new Bitmap(Properties.Resources.logo);
}


Dimitar
Telerik team
 answered on 29 Dec 2022
1 answer
478 views

Hi Support team, 

Currently, Telerik reads the appsettings.json file to get the connection string. Here we have 3 different servers for DEV , staging and production environements and we also have Multiple appsettings files. see attached screenshot. 

For Code, we have already written code that for the DEV server, all configs are read from the appsettings.Dev.json file and for the staging server all configs are read from appsettings.staging.json.

 

Now, what happened when we are creating a pdf file from Dev server from Code, It read appsetting.json file for the connection string that's wrong connection string for DEV server. so, Wrong data occupied and report is not made properly.

Could you please share any solution for my issue? 
Please note that we can't edit appsetting.json file each and every time we deploy code. 

Dimitar
Telerik team
 answered on 29 Dec 2022
1 answer
375 views

Hello,

I have one table and I am getting values to display from sql data source.

I am displaying only some of values using filter and grouping of data, but I am getting wrong sum as it is taking from data source.

what should I do to get sum of only displayed values.

 

Thanks in advance.

1 answer
164 views

I am trying to add HtmlTextBox to my report. After double clicking on the HtmlTextBox, instead of opening the html editor, an error message appears (0dCthJrV8O.png).
And after that it is not possible to delete any element of the report (see screenshot Telerik.ReportDesigner.Net_t7UHZP4wr4.png).

Also, after closing the editor, another error appears (see screenshot IpCUql4RY4.png).

Version: 16.2.22.1109

Dimitar
Telerik team
 answered on 28 Dec 2022
1 answer
192 views

Hi,

Arabic reports work well on Windows, but when the app is published to Docker, the report viewer shows the correct report, but when printing or exporting PDF, the report is drawn from left to right with incorrect format and layout.

Here is an example of a Docker PDF

, but this is the correct report on the Report Viewer

Todor
Telerik team
 answered on 22 Dec 2022
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?