1. Jochen Peters
  2. Valentina Reports ADK
  3. Четверг, Сентябрь 03 2015, 05:18 AM
  4.  Подписаться через email
How i can print html view from xojo or how i can print from report adk to the printer on a web app
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
Hi Alexis,

I have repeat many times, and I will try again.

Valentina Report ADK at least now - produce HTML or PDF.
PDF - is well known Adobe cross-platform format of a document.
HTML - is just a text.

What you do next with this, and how you do, is beyond of Valentina Reports ADK.

I believe that to print on paper, show, send emails:
* C++ developers should use some C++ libs,
* Xojo developers should use Xojo API
* PHP developers use PHP libs

So this question should be directed to Xojo forum first of all, and it should sound as
How I can print from Xojo a HTML or PDF file?


But if talk about you question - HTML print from WebApp,
I have in one bank online, they show HTML and button "print"
I guess Browser can do this?
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
For Valentina Studio we of course must provide good "Print..." dialog, and we will do that asap after 6.0 using QT.
We know one CAD application, which do this very fine, and we will use its dialog as example.

------------
After THIS step, we will think what can be gifted from this to ADKs...
Problems with ADKs is that they are GUI-less.
They not link to QT dlls, which are quite big btw ...

We was going to consider light-weight Vstudio, which can be used by ADK developers as "Report Reader" for end users.

Anyway we need invent something here.
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Hello, Alexis

As Ruslan said, you can add a Print button, which:

1) Prints a report as PDF (or HTML, but PDF is better for printing on paper, I suppose)
2) Saves it to a WebFile
3) Redirects a browser to generated file
4) Now the user is free to either save it as a file or print on printer.

Here's a part of our reports examples, it shows steps 2&3


dim data As String

try

data = mReport.PrintToBuffer( EVReportPrintType.kToPDF, 1 )

Exception err as VException
dim errNumber as Integer = err.ErrorNumber
dim errString as String = err.Message
end

mPDF = New WebFile
mPDF.MimeType = "application/pdf"
mPDF.ForceDownload = False
mPDF.FileName = "report.pdf"
mPDF.Data = data

ShowURL( mPDF.URL )



mReport - generated VReport
mPDF - WebFile, which is a property of WebPage

Link to complete example is attached.
Ссылки
  1. http://www.valentina-db.com/docs/dokuwiki/v5/lib/exe/fetch.php?media=valentina:vcomponents:vreport:demos:xojo_web_universal_report.zip
  2. http://www.valentina-db.com/docs/dokuwiki/v5/doku.php?id=valentina:vcomponents:vreport:tutorials:generating_reports_from_xojo_web_application
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Xojo is able to show print dialog for HTML viewer.

But as stated on this page,
Firefox and Internet Explorer print the contents of the entire web page, not just the WebHTMLViewer.
, so this method is not very convenient.
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
Thanks
Hi how i can show the PDF on HTMLViewer1
Комментарий
There are no comments made yet.
Ruslan Zasukhin Ответ принят
I think our V4RB / Report example show generated PDF in browser.
This not helps ?
Комментарий
There are no comments made yet.
Sergey Pashkov Ответ принят
Our example shows an image, a PDF is downloadable by link.

Fast search tells that WebHTMLViewer is able to show PDF documents.

But how it behaves in different browsers/OS - is a big question.

If it will not work well for you, you can still use HTML report in viewer, PDF report for printing.
Комментарий
There are no comments made yet.
Jochen Peters Ответ принят
ok
Thanks
Комментарий
There are no comments made yet.
  • Страница :
  • 1


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