logo
Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
ScriptMonkey  
#1 Posted : Friday, January 12, 2024 7:09:05 PM(UTC)
ScriptMonkey

Rank: Newbie

Groups: Registered
Joined: 1/12/2024(UTC)
Posts: 2
Canada

Thanks: 1 times
Hey all, I'm having issues with data table views/params and could use some help from an experienced eye (this is my first SEAL adventure). We're using V6.1 for now as we're unable to use .Net core just yet.

The first issue is that not all of my view parameters are being passed to the template when using the default Data Table template. I'm trying to enable scrolling on the datatable and have a value set for Vertical Scrolling, Pagination, Scroll Collapse, and Scroller but they don't make it to the actual dom upon rendering.

Screenshot of View Parameters for this Data Table

Code:

    $(document).ready(function () {
        var dt = $('#dt_22594073-30fb-4852-8d58-40bb523f6fdd8efd4f17c7924f0ea8f897d305f6322c');
        try {
            if (dt != null && true && !false)
            {
                var dto = dt.dataTable({
                responsive: true,
                ordering: true,
                paging: true,
                lengthMenu: [[10, 25, 50, 100, 500], [10, 25, 50, 100, 500]],
                pageLength: -1,
                info: true,
                searching: true,
                processing: true,
                order: [],
                serverSide: true,

                        ajax: function(data, callback, settings) {
                            getTableData($(this), "c0a0c013245942ef87c4694206677b06", $(this).attr("viewid"), $(this).attr("pageid"), data, callback, settings);
                        }
                                });
            }

            $('.dataTables_filter input[type="search"]').css(
                { 'width': '90px', 'display': 'inline-block' }
            );
    }
    catch (e) { };
    });


I thought perhaps I could get it working using params via a custom template, but as soon as any modification is made to the custom template I get javascript errors due to what appear to be faulty parameters checks. A few of the issues I see are..


  • ScrollY value not being rendered
  • scrollCollapse rendering false
  • The: @if (view.GetValue("data_tables_fixcolleft") != "0" || view.GetValue("data_tables_fixcolright") != "0") is somehow evaluating to true when both are set to 0 (which causes invalid javascript resulting in no render at all)


Code:

        var dt = $('#dt_99521dcb84324a86ba90f93403789ae8'); //test
        try {
            if (dt != null && true && !false)
            {
                var dto = dt.DataTable({
                dom: "",
                responsive: true,
                ordering: true,
                paging: true,
                lengthMenu: [[5,10,25,50,100,500, -1], [5,10,25,50,100,500, "All"]],
                pageLength: -1,
                info: true,
                searching: true,
                processing: true,
                order: [],
                serverSide: true,
                
                scrollX: false,
                scrollCollapse: false,

                    fixedColumns: {
                        leftColumns: ,
                        rightColumns: 
                    },
                                                                
                        ajax: function(data, callback, settings) {
                            getTableData($(this), '8aaa03621a314d0fb0c1f5f454e4a6b4', '4dfa12a0-02a4-4871-9863-ca5837e359b2', 'e7ae4d87f96f4fad849d355ff9f19c25', data, callback, settings);
                        }
                                });
                initNavCells('8aaa03621a314d0fb0c1f5f454e4a6b4', '[viewid="4dfa12a0-02a4-4871-9863-ca5837e359b2"]');
            }


Here's the full default custom template I've been using: Data Table View Template

Things I've tried....

  1. Grabbing a fresh data table template from the V6.1.0.0 github (I diff'd the one I was working with and it was identical)
  2. Confirming that I am running report designer V6.1.0.0


If need be, I may end up creating a custom free view template from scratch (I may have to to enable multi-column sorting.. need to do some more research) and duplicating/modifying for each data table we need, but it sure would be nice to be able to use the provided parameters.

Thank you for your time and assistance :)

Edited by user Friday, January 12, 2024 9:31:25 PM(UTC)  | Reason: duplicate text

epf  
#2 Posted : Wednesday, January 17, 2024 2:20:29 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,208
Switzerland

Thanks: 14 times
Was thanked: 205 time(s) in 198 post(s)
Hi, I have just try you custom default template and it works fine without any issues...
You may try it also from the "Report Designer" application.
I looks like your environment is not standard, so it is difficult to debug this.
thanks 1 user thanked epf for this useful post.
ScriptMonkey on 1/18/2024(UTC)
ScriptMonkey  
#3 Posted : Thursday, January 18, 2024 5:46:43 PM(UTC)
ScriptMonkey

Rank: Newbie

Groups: Registered
Joined: 1/12/2024(UTC)
Posts: 2
Canada

Thanks: 1 times
It does indeed work from the report designer but not within our report server project, good call to check that. I've inherited this stuff.. looks like I need to do some debugging from the ground up. Thank you for pointing me in the right direction.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.