Telerik Forums
Reporting Forum
1 answer
729 views

I have tried to change USA MM/dd/yyyy format to Finnish dd.MM.yyyy and also add time part in HH:mm:ss to html5 web form page. I have tried it with editing datetime parameter editor customization from these links guidance:

https://docs.telerik.com/reporting/html5-report-viewer-howto-custom-parameter-editor

https://www.telerik.com/forums/report-parameter-datetime-picker-format-on-ui#WWhMNlOLgEODawH80sWuzg

https://docs.telerik.com/kendo-ui/api/javascript/ui/datetimepicker

but format is still MM/dd/yyyy when displayed and no time possible to select or set

 

 

My project is mainly copy from your html5 web form example where I have added script part is next:

<script type="text/javascript">
    $(document).ready(function () {
       $("#reportViewer1")
           .telerik_ReportViewer({
               reportServer: "~/",
               parameterEditors: [
               {
                   match: function (parameter) {
                      return parameter.type === "System.DateTime";
                  },
 
                  createEditor: function (placeholder, options) {
                      $(placeholder).html('<input type="datetime"/>');
                      var dateTimePicker = $(placeholder),
                                           parameter,
                                           valueChangedCallback = options.parameterChanged,
                                           dropDownList;
 
                      function onChange() {
                          var dtv = this.value();
                          if (null !== dtv) {
                              dtv = myadjustTimezone(dtv);
                          }
                          valueChangedCallback(parameter, dtv);
                      }
 
                      return {
                          beginEdit: function (param) {
                              parameter = param;
 
                              var dt = null;
                              try {
                                  if (param.value) {
                                      dt = myunadjustTimezone(param.value);
                                  }
                              } catch (e) {
                                  dt = null;
                              }
 
                              $(dateTimePicker).find("input").kendoDateTimePicker({
                                  format: "dd.MM.yyyy HH:mm:ss",
                                  parseFormats: ["MM.dd.yyyy", "HH:mm:ss"],
                                  change: onChange,
                                  value: dt
                              });
 
                              dropDownList = $(dateTimePicker).find("input").data("kendoDateTimePicker");
                          }
                      }
                  }
               }]
           });
    });
 
    function myadjustTimezone(date) {
        return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds()));
    };
    function myunadjustTimezone(date) {
        return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
    };
</script>

 

Regards

Harri

Todor
Telerik team
 answered on 20 Mar 2020
1 answer
450 views

I've been struggling to get reports running in ASP.NET Core.  

I have the demo and it works.  It is a Core 2.2 app.  I've tried to add it in to my app which is a 3.1 app nothing is going well.

I started with the beautiful "Cannot access the Reporting REST service" error. Reading through tons of things I figured out my reports controller is giving an error.

So now I'm trying to get /api/reports/formats to display properly.  I'm hoping if I can get this working, the rest will fall in to place. It work in the demo, but I get:

InvalidOperationException: Property 'JsonResult.SerializerSettings' must be an instance of type 'System.Text.Json.JsonSerializerOptions'.

Can anyone give me a pointer in the right direction?

Al
Top achievements
Rank 1
 answered on 19 Mar 2020
1 answer
326 views

I have created a Telerik reporting application with MVC. I was able to publish and deploy the Application to one of the Azure server.

Now my Question is, how to edit or modify a report from the server using Stand Alone Report designer and publish it back to the server?

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 18 Mar 2020
10 answers
610 views

Hello,

I'm currently trying to create a line chart programmatically and was successfully able to do so. However I noticed that in certain cases, the smooth line type produces odd results. When the x-axis has a date scale and 2 points are too close to one another, depending on the y-axis values the line will sometimes curve backwards (see the black line in the smooth_line attachment). I'm using a cartesian coordinate system as recommended by your documentation. I've attached images of the chart using both straight and smooth line types. The data is the same, only the line type is different. We have not had this issue creating similar line charts in kendo jquery ui or kendo angular. We would like to use the smooth line type (instead of the straight) for our reporting charts. Is there way to prevent this issue from happening, or is there a different coordinate system that we can use to achieve the desired results? Please advise. Thanks!

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 18 Mar 2020
3 answers
277 views

     I have a page that has 5 separate tabs. The first tab is set to active so it will load first. The Telerik Report is on the 5th tab so it will not load automatically. It will only load automatically if it's the first tab. I've tested this by setting the tab with the report as the first tab and it will load just fine.

Previously we were using 2016 R3 version and using the command:

$("[data-command='telerik_ReportViewer_refresh']").first().click();

This never gave us issues. We recently upgraded to 2020 R1 and now this command will not work. Is there a way to refresh the page manually by JQuery?

 

 

Braden
Top achievements
Rank 1
 answered on 16 Mar 2020
3 answers
280 views

Hello,

We currently have a picture box on our PDF report that we want to open in a new tab / window on click but it is not working.

The designer file looks like this

            // 
            // pictureBox1
            // 
            navigateToUrlAction1.Url = "= MapLocation(Fields.UniqueId)"; // This calls and returns a url and is working fine
            navigateToUrlAction1.Target = Telerik.Reporting.UrlTarget.NewWindow; // Added this manually just in case, when using the designer and choosing New window under Link target it does not add this line, I assume its default behavior?
            this.pictureBox1.Action = navigateToUrlAction1;

 

We have tried to set the url to just http://google.com but same results.

Todor
Telerik team
 answered on 16 Mar 2020
2 answers
148 views
I have a dataset of products I'm trying to graph from a web service. When using the date field (which is a unix timestamp) as the category and the count of IDs as the values it's providing the incorrect results, even when I set the base unit to days/months/years etc. When I use another field other than date, the count returns what it should (as displayed in the difference between the two graphs in the screenshot). I've experimented with changing the groupings via the ToString() method on the date however it is producing inconsistent results. Any advice on what might be causing this?
Lachlan
Top achievements
Rank 1
 answered on 12 Mar 2020
1 answer
14.3K+ views
When I try to open the designer in visual studio I get the following error:
Value cannot be null. Parameter name: instance

I tried reinstalling the latest version of reporting but that did not fix it.

The designer worked before, the error began happening randomly one day.

Any suggestions?



Todor
Telerik team
 answered on 12 Mar 2020
7 answers
1.1K+ views

i followed the attachment in this post to create an object datasource. now i have to pass ten parameters into the datasource for getting some data from a query with almost one billion rows if not applied parameters. since i need to reuse existing infrastructure i have to use the method in our data layer project to get data. so adding dynamic object datasource is a must. how will i pass these parameters to the object datasource

also i would like to know if there is any way to pass all these 10 parameters as a model so i can forward the model from our webapi controller?

Todor
Telerik team
 answered on 11 Mar 2020
4 answers
522 views

Hello,

This is a thread that continues from the following post: https://www.telerik.com/forums/filter-graph-data

To give a default value to a graph, I have used this expression in the report parameter:

= AddMonths(Last(Fields.wDate), -12)

The above displays the past 12 months of data on a graph which has 5 years (60 months) of data.

However, the data that I have does not include weekends and public holidays. So in scenarios such as:

Latest date (Last(Fields.wDate)) is 2nd March 2020, and the 12 month previous data is from 2nd March 2019. 2nd March 2020 is on a Monday so data is recorded, but 2nd March 2019 was on a Saturday hence there is no data on it, which results in an error saying 'Missing or invalid parameter value. Please input valid data for all parameters.'

Is there a way where, if the -12 value is on a weekend or public holiday, it picks the data closest to it, for e.g. 4th March in this case. Or alternatively a function where I just get the latest year's worth of data by default? I have tried = Today().AddMonths(-12) but it also has the same issue.

I have also attached a screenshot of my report parameter.

Thank You

Kunal
Top achievements
Rank 1
 answered on 10 Mar 2020
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?