Dear Community User! We are updating our platform to a new system.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Generating report files

Generating report files

Tamer
Established Member

Hello,

Is there a provision to generate a report document (ex: .csv or .pdf) using data from the process tags?

Thanks

11 REPLIES 11

webiq-eg
Long-established Member

Hi Tamer,
Basically yes, but this must be done via a script, e.g. a customer-specific UI action in JavaScript. In csv it's pretty easy (I'll create a simple example and attach it to this post next week). PDF is also possible, we have already implemented something like this here, but an open source framework must be used here. If you need specific support for a customer project there, please contact us.
Many greetings
webiq eg

Tamer
Established Member

Thank you, an example would be great.

Tamer
Established Member

Hello,

Any updates about the sample .CSV report file generation please? We are currently working on a project that requires this functionality.

Thank you.

webiq-eg
Long-established Member

Hello Tamer,

enclosed you find an example how to export a simle .csv file with process values form items.

I hope this helps and I'm happy to help with any questions.
Many greetings

p.s. the app is for current version 2.11

Tamer
Established Member

Thank you so much, this was very helpful.

Is there any documention available for the data structure accessible through the JSON code (ex: ItemManager.readDirect)? I would like to build more functions through the code tool.

Thanks

webiq-eg
Long-established Member

you can find the JavaScript reference for programming here: https://www.smart-hmi.de/user/download/deliver/docs/documentation-webiq-visuals-reference-2.11-9600/...
the websocket api for accessing the server here:
https://www.smart-hmi.de/user/download/deliver/docs/documentation-dev-connect-apidoc-version-2.11.x-...

Many helpful "How-tos" in the Documentation area of our Website (after registration):
https://www.smart-hmi.de/user/docs

Best regards
webiq-eg

 

Open
Occasional Contributor

Hello @webiq-eg,

Do you have an example how to export to a PDF file generation with process values form data? 

Warmest regards,

webiq-sk
Frequent Contributor

When it comes to PDF generation it's around 99% effort for using the PDF generation Node.js package and 1% code to retrieve data from WebIQ usually.

As a "PDF Report" is not standardized in any way because what shall be shown is completely up to you and differs from customer to customer and project to project you definitely have to create your own PDF report code.

To create a PDF you have to write code that defines which text/image/... to write where on which page. That's where most of the effort is required - retrieving the data is the same as for CSV and you should be able to use the code posted before to retrieve the data.

We've used the pdfmake library before - you can use any other PDF library as well, of course. Documentation is readily available:

Please understand that we cannot offer support for third-party libraries. You have to familiarize yourself with the library you wish to use to find out how to generate the report you desire. 

HmiGuide
Community Moderator
Community Moderator

How to generate PDF within WebIQ is on my list. I plan to create a How To article. When do you need it?

As said, it's just webiq-sk like:

  • Download a js package from internet (I used jsPDF)
  • Include it into your WebIQ project
  • Read the documentation and examples provided by the package
  • Write a JS code.
 

Open
Occasional Contributor

@HmiGuide thats great news! we were hoping to find a solution as soon as possible. Looking forward to your post  😊

HmiGuide
Community Moderator
Community Moderator

@OpenHere is the How-To article: WEBIQ - Create PDF document with pdfmake 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist