1. Ben Antwi
  2. Valentina Reports ADK
  3. Вторник, Февраль 22 2022, 09:15 AM
  4.  Подписаться через email
HI,
i'm new to valentina suite. I saw the tutorials on how to download and install valentina studio,valentina server and valentina ADK. I want to embed valentina report in my python code but I can't find any video tutorial on that. i saw saw for java implementation. I would appreciate if I'm assisted with the steps to achieve this task. Thanks in advance.
Комментарий
There are no comments made yet.
Ben Antwi Ответ принят
I get the following error when I run the report.setParameterValue method you added.
[ConnectionParameters] Unable to parse port: /Users/LT-K101-LAB/Desktop/PROJECT.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Have you used file:// prefix to open project?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
This error is more likely generated by valentina.project.connect method call.
Could you please show this row of the code?

Also, a new 12.0.5 version is uploaded. It includes new methods for VPython:
* report.setParameterValue
* and also printer methods
* report.printToLocalPrinter,
* report.printToServerPrinter.

All printing parameters should be passed to these methods (they don't show any dialog).
Please description of these methods in the WIKI, see link below.
Ссылки
  1. http://valentina-db.com/docs/dokuwiki/v12/doku.php?id=valentina:products:adk:api:vreport_class:printing_methods#vreportprinttolocalprinter
Комментарий
There are no comments made yet.
Ben Antwi Ответ принят
@ Sergey Pashkov Sorry for late reply, Please find the valentina.project.connect method call you requested for below.


# Open local project
project = valentina.project.connect('file://C:/Users/LT-K101-LAB/Desktop/PROJECT/testProduct.vsp')
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
That is strange, could you please try to install the latest version?

Here is my test code:

#!/usr/bin/python3

# Location of the extension (if need)
import sys
sys.path.append('./..')

# Import extension
import valentina

# Open local project
project = valentina.project.connect('file://c:/Users/sergey/Documents/Paradigma Software/VPython_x64_12/Examples/valentina_sakila_reports.vsp')

# Make report instance
report = project.report(name='Report_FilmList', dsn='sqlite://c:/Users/sergey/Documents/Paradigma Software/VPython_x64_12/Examples/sqlite_sakila.db')
report.setParameterValue( 'pFilmID', '5' )
# Print result as PDF
report.printToDisk('./Report_FilmList.pdf')

# Cleanup
report.close()
project.close()


Also, maybe you can start a new discussion with a more narrow topic for easier navigation?
Комментарий
There are no comments made yet.
  • Страница :
  • 1
  • 2
  • 3
  • 4


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories