#1 2015-12-16 14:22:12

georgeCh
Member
Registered: 2014-11-12
Posts: 16

Column Width in Preview and Dashboard

Is it possible to keep the width of the columns set in execute report section? or just simply set it so that it automatically goes to optimal width or even just to the fixed width?

I have a number of reports that i want to show in the dashbord that contain 5-7 columns and i always have to scroll horizontaly in order to see my results although they might be just number or small text (ie 5-10  characters).
Html View in dashboard gets much closer the optimal column width based on the contents, however it looks quite simple/unfriendly and more importantly does not have paging... smile

Offline

#2 2015-12-16 14:58:28

Arno Mittelbach
datenwerke
Registered: 2012-02-14
Posts: 690

Re: Column Width in Preview and Dashboard

Hi George,

nice suggestion. I am afraid, there is currently no way to set the width of the preview view for the dashboard. I've created a feature request to see whether we can work that in somehow.

Cheers
-Arno

Offline

#3 2015-12-16 16:38:46

georgeCh
Member
Registered: 2014-11-12
Posts: 16

Re: Column Width in Preview and Dashboard

Thank you Arno,

In that case ... should I just refer myself to the post of HTML styling?

http://forum.reportserver.net/viewtopic.php?id=466

Offline

#4 2015-12-16 17:09:25

Arno Mittelbach
datenwerke
Registered: 2012-02-14
Posts: 690

Re: Column Width in Preview and Dashboard

That would be one way to work around it. Maybe a nicer solution for the dashboard is to use a custom HTML dadget and render the report with some java script library. You can export the report via the following URL

http://SERVER:PORT/reportserverbasedir/reportserver/reportexport?id=39&format=json&download=false

The format property allows you to specify to have the report, for example, output JSON. I haven't tried this but this should give you directly the format that, for example, Dynatable (http://www.dynatable.com/) expects.

Cheers
-Arno

Offline

#5 2015-12-17 07:58:54

Arno Mittelbach
datenwerke
Registered: 2012-02-14
Posts: 690

Re: Column Width in Preview and Dashboard

Hi George,

just to add. You can get paging also implemented on the server side with URL export. The following script (this functionality will be included with the upcoming version) will look for url parameters "page" and "pagesize". Thus, &page=2&pagesize=50 as part of the URL would give you the records 51 to 100.

import net.datenwerke.rs.core.service.reportmanager.engine.config.ReportExecutionConfig
import net.datenwerke.rs.core.service.reportmanager.engine.config.RECSinglePage
import net.datenwerke.rs.core.service.reportmanager.engine.hooks.ReportExecutionConfigFromPropertyMapHook

def HOOK_NAME = "PAGED_EXPORT"

def callback = [
  parse : { report, req, props -> 
    HashSet<ReportExecutionConfig> configs = new HashSet<ReportExecutionConfig>();                           
    try{
      if(props.containsKey("page")){
        int page = Integer.parseInt(props.get("page")[0]);
        def pageconfig = new RECSinglePage(page);

        if(props.containsKey("pagesize")){
           int size = Integer.parseInt(props.get("pagesize")[0]);
	       pageconfig = new RECSinglePage(page, size);
        }
        configs.add(pageconfig);
      }
   } catch(RuntimeException e){}
   return configs;  
  }
] as ReportExecutionConfigFromPropertyMapHook
                                       
GLOBALS.services.callbackRegistry.attachHook(HOOK_NAME, ReportExecutionConfigFromPropertyMapHook.class, callback)

Cheers
-Arno

Offline

#6 2017-06-08 20:28:18

bpeikes
Member
Registered: 2016-10-29
Posts: 51

Re: Column Width in Preview and Dashboard

I've tried to use the URL on our server, but I get a 404 from our server.

Arno Mittelbach wrote:

That would be one way to work around it. Maybe a nicer solution for the dashboard is to use a custom HTML dadget and render the report with some java script library. You can export the report via the following URL

http://SERVER:PORT/reportserverbasedir/reportserver/reportexport?id=39&format=json&download=false

The format property allows you to specify to have the report, for example, output JSON. I haven't tried this but this should give you directly the format that, for example, Dynatable (http://www.dynatable.com/) expects.

Cheers
-Arno

Offline

#7 2017-06-12 10:26:26

edulid
Administrator
Registered: 2016-11-01
Posts: 413

Re: Column Width in Preview and Dashboard

Hi bpeikes,

then the URL is incorrect. Have you forgot the "reportserver" part? It may be appear double in your installation. Example: http://SERVER:PORT/reportserverbasedir/reportserver/reportserver/reportexport .. .

Regards,
Eduardo

Offline

#8 2017-06-12 11:27:06

bpeikes
Member
Registered: 2016-10-29
Posts: 51

Re: Column Width in Preview and Dashboard

Eduarto,
  No I used the "reportserver" part. I'll try doubling it up though. How do I check to see what the URL should be?

Ben

Offline

#9 2017-06-12 19:31:33

edulid
Administrator
Registered: 2016-11-01
Posts: 413

Re: Column Width in Preview and Dashboard

Hi Ben,

well just try it. In the docs and in the forum you see this URL:
http://SERVER:PORT/reportserverbasedir/reportserver/reportexport?id=39&format=json&download=false

The basedir is sometimes "reportserver", sometimes other, depending on your installation. If it is "reportserver", you will have: http://SERVER:PORT/reportserver/reportserver/reportexport?id=39&format=json&download=false

Cheers,
Eduardo

Offline

Board footer

Powered by FluxBB