Telerik Forums
Reporting Forum
3 answers
496 views

My environment

  1. Telerik Report Designer, v16.2.22.914, Target Framework: NET 6.0
  2. database: PostgreSQL
  3. data provider: Npgsql version: 6.0.7
  4. 1 database table named 'facilities' with columns:
    • billing_month: timestamp
    • facility_id: varchar(16)
  5. 1 report parameter defined as
    1. name: BillingMonth
    2. type: DateTime
    3. Value: 6/1/2019
  6. 1 data source defined as
    1. name: facilities
    2. sql: "select billing_month schema.facilities where billing_month = @BillingMonth"
  7. 1 data source parameter defined as:

    1. name: @BillingMonth

    2. DbType: DateTime2

    3. value: = Parameters.BillingMonth.Value

  8. 1 design time parameter defaulted to

    1. name: @BillingMonth

    2. Constant Value: 6/1/2019

The Issue

When I click "Execute Query" on the preview data source results screen in the configure SQL Data Source wizard am presented with an error such as: Can't write CLR type System.String with handler type TimestampTzHandler or Can't write CLR type System.String with handler type TimestampHandler.

If I dismiss the error and hit "Finish" Data explorer will not show the data fields but instead displays the same error with a rather long stack trace.

Interestingly enough, the report may still work, but design time assistance is unavailable. For example I cannot drag data source fields to the report. To validate I created another data source for the list of unique billing months, assigned that to "AvailableValues" of the BillingMonth report parameter, and set Visible to True. I can then select from an appropriate month in the report Preview and run the report.

My Question

What is the appropriate format to specify a DateTime constant value in the design time parameters window of the Configure SQL Data Source wizard?

Previously, when we were targeting oracle specifying M/D/YYYY worked fine but as we're retargeting PostgreSQL we find ourselves with this mystery.

 

 

 


Dimitar
Telerik team
 answered on 07 Nov 2022
3 answers
341 views

Hello,

I have a project in .NET Framework 4.6.1 with a web page that use a ReportViewer telerik control. To make everything clearer i have to change the parameter section from ListView to ComboBox. I'm using the library Telerik.ReportViewer.Html5.WebForms v.14.1.20.618 for reporting, while the rest of the projecxt is Telerik for AJAX.

Mi first question is: can you confirm me that with this setting i can activate the ComboBox?

The second question is: how can i do that? In ReportViewer I can't see the element Parameters also after adding in the project the file jquery-3.3.1.min.js

Thanks

Dimitar
Telerik team
 answered on 07 Nov 2022
1 answer
559 views

I have a dataset that is returning one row, with a field called [Percent of Total] the field is formatted like 0.75 (representing 75%)

I want to use this value in a pie chart with the pie chart filled 75% of the way, but I can't seem to figure out how to achieve this.
The chart builder in Telerik is not very user friendly...

Todor
Telerik team
 answered on 04 Nov 2022
1 answer
223 views
We are creating reports with the Web Report Designer (hosted on IIS as ASP.NET Core app) and display the reports with the Angular Report viewer. One requirement is to to show a list of all files in a folder (located at a file server) which is defined by a report parameter. E.g. if the report parameter is "42" a list of all files in the folder "//fileshare/objects/42" are displayed in the report. Is there a way to create reports with this capability with the web report designer or any other report designer tool?
Dimitar
Telerik team
 answered on 03 Nov 2022
1 answer
282 views

Hi, support

 

I want to create a report viewer server and send a request from the website to url.

C:\Program Files (x86)\Progress\Telerik Reporting R2 2022\Examples\CSharp\.NET 6\Html5IntegrationDemo
I'm taking that into consideration
When I type http://localhost:51863/index.html, the screen appears, and the leaflet about the product is http://localhost:51863/goodsPop, and the information about people is http://localhost:51863/employee. I wonder what to do in this case.

            {
                endpoints.MapRazorPages();
                endpoints.MapControllers();
            });
            app.MapControllerRoute(
                name: "default",
                pattern: "{controller=Home}/{action=Index}/{id?}"
            );
            app.Run();
Should I add it to the Program.cs part like the code above and create a controller separately? Or is there any other way?



Also, we are going to send jsonData to the url in post format, and in this case, I wonder how to receive the value in the report viewer server and deliver it to the report.

And there are Html5IntegrationDemo and ReportingRestServiceCorsDemo in the folder of Net6, what is the difference between the two projects?


Todor
Telerik team
 answered on 03 Nov 2022
1 answer
190 views

[Report Designer View]

[Report Explorer]

[Properties of ImageView(GoodsName)]

[Edit Expression(GoodsName)]

='<svg style="background-color:green">
    <text
        font-family="HY헤드라인M"
        fill="black" 
        x="0%" 
        y="50%" 
        textLength="100%"
        dominant-baseline="middle" 
        lengthAdjust="spacingAndGlyphs"   
    >
        '+ Fields.goodsName+'
    </text>
</svg>'

[Report Print View]

[Print View]

(When I push this Print Icon)

Hello, thank you for your reply to the previous inquiry.

I have a question while applying it.
(What I asked you before: https://www.telerik.com/forums/how-to-stretch-in-textbox)


1. Report Print View screen and Print View screen are different.
2. The green box on the Report Print View screen is the size and location of the goodsName currently set to the Report Parameter.
I'd like to stretch the goodsName in the green box. It's okay if the letters are crushed, so is there a way to put the letters in the green box exactly like this?


Dimitar
Telerik team
 answered on 03 Nov 2022
1 answer
207 views

I have a report that has been around for years and it only was SQL database-fed text information, one of which was an indicator result. 

I have since updated the application to include the ability to take photo of the indicator and save the binary data into the database, as well as any text response.

Now I need to update my report to show an image if there is one, or show the text response if there is no image - all in the same cell/column.

Firstly, do I just grab and send the binary data for the picturebox in the report's table, and how do I show either the image (if not null) or the text in the same cell on each row?

thanks in advance.

1 answer
750 views

I have a .NET 6 solution with a reports project that is .NET Framework 4.8 using Telerik Reporting version R1_2022_SP1_16_0_22_225.

On this line of code in the report designer, which is for a picturebox in the report

this.pictureBox1.Value = ((object)(resources.GetObject("pictureBox1.Value")))

it's throwing an exception -> 

BinaryFormatter serialization and deserialization are disabled within this application. See https://aka.ms/binaryformatter for more information.

This url indicates the problem was fixed in the Telerik Reporting R1 2021, but I am getting the exception.

BinaryFormatter serialization and deserialization are disabled within this application is thrown in .NET5 - Telerik Reporting

I've tried the workaround below but that also does not work and I still get the exception.

<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>

 

 

 

Ivan Ivanov
Telerik team
 answered on 01 Nov 2022
1 answer
674 views

Hi all,

I have a report using the designer.  I attached a JSON data source in the report, just for structure usage purposes:

{
	"Data": [
		{
			"OrganizationId": "",
			"OrganizationUuid": "",
			"ParentOrgId": "",
			"OrganizationName": " ",
			"TotalUserCount": 0,
			"TotalDeviceCount": 0,
			"LicensedUserCount": 0,
			"ExpirationDate": "",
			"hasChildren": true
		}
	]
}

When I try to inject the actual JSON data at runtime, the report is still generated with the sample data.  Here's the lines generating the JsonDataSource:

            var data = new ReportData { Data = result };
            var ds = new JsonDataSource
            {
                Source = JsonConvert.SerializeObject(data),
                DataSelector = "$.Data",
                Name = "jsonDataSource1"
            };

Then I assign the data source to the report:

                using (var sourceStream = System.IO.File.OpenRead(_path + "\\Reports\\" + myRpt.ReportName))
                {
                    var reportPackager = new ReportPackager();
                    report = (Report)reportPackager.UnpackageDocument(sourceStream);

                    var dtsrc = new ObjectDataSource();
                    dtsrc.DataSource = myRpt.GenerateReport(_parameters);  // this is the JsonDataSource from above
                    dtsrc.Name = "jsonDataSource1";
                    report.DataSource = dtsrc;
                }

When I render the report, the data is not injected, it just shows the single sample record from the designer.  If I inject the actual JSON in the designer and do a preview, the report looks correct, so my guess is that I'm not doing this correctly.  Any help would be greatly appreciated.

Regards

Dimitar
Telerik team
 answered on 31 Oct 2022
1 answer
128 views

Hi, 

I have a column in a table (textbox) which contains numbers. They can have 1 or 2 digits and from 0 to 3 decimals. For example,: 100, 10.024, 25.3 . I would like to align all numbers at the decimal seperator for a nice design. 

The only option I found is Style>TextAlign of the textBox, but this does not achieve the desired result.

Thanks in advance.  

Justin
Telerik team
 answered on 27 Oct 2022
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?