Chart on a mobile device

Discussions regarding 1C:Enterprise for mobile devices with Android, iOS, or Windows Phone.

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: May 29, 2015
Company:

Hi, All!


Could you please give me an idea how to show a kind of chart depicted in the attachment on a mobile device.
The method I used works well when I run the app on PC but an attempt to call this chart on Android (either HTC One SV or virtual machine) causes the app to shut down (without any error message).

The steps I take are the following:
1)In my server infobase, I create a web-service which returns a spreadsheet document, to which I write the report (its chart option). The return XDTO package value type of the WS is ChartAnimation (http://v8.1c.ru/8.2/data/chart).
2)In the client infobase, I receive the package and on my attempt of writing it to a spreadsheet attribute of a data processor form the 1C Enterprise mobile app stops abruptly.

If I switch the return type of the WS to some other, e.g. spreadsheet XDTO package or other types of chart XDTO packages the client app doesn't stop but shows a message of type mismatch. Setting the Animation property of my chart to False neither solves the problem.

Appreciate your comments

Download Chart.png (24.14 KB)
Edited: Konstantin Frolov - Aug 10, 2015 12:49 AM
 
#2
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Konstantin!

The general idea of reports in mobile application is that you should generate a report inside the main infobase and send the generated spreadsheet document to the mobile application.

You can find an example in Mobile application demo, which is a part of Managed application demo.

Could you provide a sample configuration(s) where I could reproduce the error, so I could submit a bug to the developer team?

As for now, try saving the spreadsheet document with the chart as PDF before sending to the mobile application.

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: May 29, 2015
Company:

Timofey Bugaevsky,
thank you for a prompt answer.

The WS named Reports with the faulty GetRevenueByTechnician operation is in the 1Cv8_server configuration. In 1Cv8_client, the error-causing data processor is RevenueByTechnicianChart (the code is located in Form1 module).

Thank you for your advices, I'll try them in the meantime.

Download client.dt (37.42 KB)
Download server.dt (314.56 KB)
 
#4
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, Konstantin!

Thank you for the debug information. Please note that the forum is public and files can be viewed by anyone.

ChartAnimation is not supported in mobile platform. So in the server configuration you should:
1. In Revenue by technician chart the return type should be SpreadSheet instead of ChartAnimation.
2. As CharAnimation is not supported in mobile platform, please do not turn it off in Revenue by technician chart.

Code
//SprdshtDoc.Drawings.D1.Object.Animation = ChartAnimation.DontUse;

 
#5
People who like this:0Yes/0No
Just came
Rating: 1
Joined: May 29, 2015
Company:

Timofey Bugaevsky,
thank you very much for answer,
but in this case on an attempt to get the chart on Android device (on PC, however, it works both ways, spreadsheet and chart), I receive the error:
{DataProcessor.RevenueByTechnicianChart.Form.Form1.Form(18)}: Error calling context method (GetRevenueByTechnician)
because:
Service operation call error: {ReportsWS}:Reports:GetRevenueByTechnician()
because:
Unknown error. Error converting XDTO data:
Read object of {http://v8.1c.ru/8.2/data/chart}Chart type - [673,50]
Additional property validation:
form: Item
name: {http://v8.1c.ru/8.2/data/chart}animation
because:
Error converting XDTO data:
Read object of {http://v8.1c.ru/8.2/data/chart}Chart type - [673,50]
Additional property validation:
form: Item
name: {http://v8.1c.ru/8.2/data/chart}animation
because:
XDTO data validation error:
Object structure does not match type: {http://v8.1c.ru/8.2/data/chart}Chart

Seeing the way the chart is constructed in 1C Demo mobile app and having not encountered any example of sending a chart via XDTO package, it seems to me that it is "assembling" the chart based on data sent to device instead of sending the chart itself, which is a better way to get a chart on mobile device.

 
#6
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

Thank you for the information.
This problem will be fixed in 1C:Enterprise mobile platform version 8.3.6.201 and newer.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.