Telerik Forums
Reporting Forum
3 answers
475 views

Hi,

I have a report, where the user wants to be able to filter the data based on 2 parameters. Is it possible to make those parameters optional? The point is to be able to filter the results, but to be able to see them all as well.

Example: Let's say I have parameters Location and SalesmanId. I want to be able to filter by Location to show all the Salesmen and also to be able to set Location and SalesmanId to see only sales of the particular salesman in the location.
If I use in the SqlDataSource query condition WHERE, both parameters will be required, otherwise the query won't be valid. How to make the parameters optional? - that the query will show all salesmen in all locations, if none of the parameters is set.

Thank you in advance for your help.

Radovan

Todor
Telerik team
 answered on 09 Oct 2020
3 answers
901 views

Hello telerik team,

Can you help me with this, I need a reporting table to display (and group by name) some images, these images comes from my D.B and they are base64 strings, so I convert them to Image like this: Base64ToImage(myDBstring), this part works fine, but when i run it on my chsarp .net web project, the telerik reporting show me this error: 

An error as occurred while proccesing PictureBox 'picture1' Could not find part of the path C:\Myproyect\MyWebSite\System.Drawing.Bitmap.

 

See attached image (left is a single image box and right is the table with the error)

Note 1: I already did this with a single picture box succesfully, but now i need it in a table with two columns, Name and Image.

Note 2: I Dont use paths, i use D.B base64 images and merge them with a Dataset.

 

Silviya
Telerik team
 answered on 09 Oct 2020
2 answers
386 views

How can WPF ReportViewer display Multiple UriReportSources as one Report?

I want to diplay multiple UriReportSources (same trdp UriReportSource and same ParameterName, but varios ParameterValues) in WPF ReportViewer as one Report, wich contains this multiple UriReportSources successively.

Here is my C# Code:

ReportBook RB = new ReportBook();

UriReportSource uriRS = new UriReportSource();
uriRS.Uri = "MyYearTest.trdp";
uriRS.Parameters.Add(new Telerik.Reporting.Parameter("Year", 2018));

RB.ReportSources.Add(uriRS)

UriReportSource uriRS = new UriReportSource();
uriRS.Uri = "MyYearTest.trdp";
uriRS.Parameters.Add(new Telerik.Reporting.Parameter("Year", 2019));

RB.ReportSources.Add(uriRS)

UriReportSource uriRS = new UriReportSource();
uriRS.Uri = "MyYearTest.trdp";
uriRS.Parameters.Add(new Telerik.Reporting.Parameter("Year", 2020));
RB.ReportSources.Add(uriRS)

InstanceReportSource IRS = new InstanceReportSource();
IRS.ReportDocument = RB;
this.TRPViewer.ReportSource = IRS;

Both Objects (RB and IRS) contains 3 ReportSources.
But the WPF ReportViewer (this.TRPViewer) shows 3 times the same page, in fact 3 times the first Report of the Year 2018!

How can i display all 3 Years Reports (2018,2019,2020) as one Report in WPF ReportViewer?

Thom
Top achievements
Rank 1
 answered on 08 Oct 2020
1 answer
234 views

I am new to telerik report. I want to group data by name and address should show down to grouped property. Please find attached file that i generated from report. Please help how to get desired result that i attached.

Neli
Telerik team
 answered on 08 Oct 2020
1 answer
789 views

Is there any way of getting and editing web service datasource from report file(*.trdx, *.trdp) programmatically without using standalone Report Designer tool?

I know Report has DataSources property, but it's private. My scenario is: I generate OData query at runtime and I have to set that OData query string to the report WebServiceDataSource.ServiceUrl property value, or I have to change existed OData query and save that to data source. 

In this post suggested getting data sources through the data items(Table, List, Report parameters,...). But, for example I created data source and it's not assigned to any items yet. In this case how can I access to that data source? I still want to modify that data source which is not assigned.

Thanks,

 

Todor
Telerik team
 answered on 07 Oct 2020
3 answers
251 views

Hello everyone,

I have a question about the possibilities in the detail section:

we have multiple transports where each transport can have multiple kinds of goods and we would like to use the detail section to show both of them.

It should look like this (simplified) e.g.:


Truck A
                2 Pal. Lights
                1 Pal. Bananas
                20 Pal. Apples

Truck B
                4 Pal. Cups
                2 Pal. Gloves


…..

The problem is that in SQL we have no other possibility to join the tables so that the result looks like see att..

This will transform in multiple lines:

Truck A
                2 Pal. Lights
Truck A
                1 Pal. Bananas
Truck A
                20 Pal. Apples

Truck B
                4 Pal. Cups
Truck B
                2 Pal. Gloves

I also tried to use a table or a list Item but both would show all results for each entry.

Truck A
                2 Pal. Lights
                1 Pal. Bananas
                20 Pal. Apples
                4 Pal. Cups
                2 Pal. Gloves

Truck B
                2 Pal. Lights
                1 Pal. Bananas
                20 Pal. Apples
                4 Pal. Cups
                2 Pal. Gloves

Is there any possibility with another item, format, filter,group ..anything to get one row for each truck and with the goods for this one?

 

 


Neli
Telerik team
 answered on 07 Oct 2020
1 answer
482 views
I’m trying to pass in a list of integer IDs from within C# by setting a Telerik.Reporting.ReportParameter.Value.  I have tried a number of combinations of object types, from passing in a string of comma separated values to passing in an IEnumerable of Integers to no avail.  I have tried using the Array function on Designer side, but no matter what combination I try, I’m receiving an error that the value for WidgetIDList is invalid.  I was wondering what the object should look like that I set in the C# code, and what I should set the Value in the Telerik Report Designer for the parameter that will be passed to the stored procedure to generate results.  I’ve gone over the notes on the website over and over, and looked at a few articles on workarounds posted here, and still haven’t been able to determine a solution.  I would try to pass a string of comma separated values, but our UI relies on the AvailableValues to be set so that it can populate a dropdown list in our UI for the user to select from.  I'm wondering if that's what's causing the issue, the validation not liking what I'm passing. Thanks for your assistance.

Parameter being passed in
Name: WidgetIDList
AllowBlank: False
AllowNull: False
AvailableValues: dsGetAllWidgetNames [Telerik.Reporting.SqlDataSource] (This is a SQLDataSource that uses a connection string to call a stored procedure to populate the values.)
DataSource: dsGetAllWidgetNames [Telerik.Reporting.SqlDataSource]
DisplayMember: = Fields.WidgetName
Filters: (No Filters)
Sortings: (No sorting)
ValueMember: = Fields.WidgetID
Mergeable: True
MultiValue: True
Name: WidgetIDList
Text: Widget
Type: Integer
Value:
Visible: True

Parameter to be passed to Stored Procedure to generate results
@WidgetIDList: Telerik.Reporting.SqlDataSourceParameter
DBType: AnsiString
Name: @WidgetIDList
Value:
Neli
Telerik team
 answered on 05 Oct 2020
1 answer
180 views

Hi.

My report contains a table that is expected to not fit on a single page so it has KeepTogether set to false. It also has ColumnHeadersPrintOnEveryPage set to true. 

In print preview or when rendered as DOCX or PDF the table splits correctly, i.e. a blank row is drawn at the end of the first page indicating that the table continues on the next page. 

When rendered into PPTX however (which is the target format for me) the blank row gets drawn at the start of the next page instead. It would not be that much issue without table headers repeating on every page. With them it looks quite confusing.

Neli
Telerik team
 answered on 02 Oct 2020
3 answers
462 views

Hello everyone,

is there any possibility to automatically sort the parameters in the report explorer? I know you can sort manually if you use the 'edit parameter' function but i would need an automatic way.

Regards

Todor
Telerik team
 answered on 02 Oct 2020
5 answers
329 views

Hello.

 

I have a normal report and when I click to see the next page this error occurs :

 

Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.
   at Telerik.ReportViewer.WebForms.StreamManager.GetHtmlPage(Int32 pageIndex)
   at Telerik.ReportViewer.WebForms.ReportPageOperation.WriteHtmlPage(StreamManager streamManager, Int32 pageIndex)
   at Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Request information:
    Request URL: .... Telerik.ReportViewer.axd?instanceID=0cdcda6604764ba2a837581cedb1ae5f&optype=Report&PageIndex=1&RenderID=312cd5f978ca4b8baf48ad45439e270e&RenderingFormat=HTML5
    Request path: /Telerik.ReportViewer.axd

 

Any idea?

Matthew
Top achievements
Rank 1
 answered on 30 Sep 2020
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?