1. Mauricio Pulla
  2. Valentina Reports ADK
  3. Monday, July 03 2017, 06:15 PM
  4.  Subscribe via email
Hello!

Sorry my english is not good

I have Valentina report 7 and Xojo 2016 r 1.1, for a web application.

I need to send direct print to the printer without needing a preview.

MReport.PrintToLocalPrinter (Session.PrintersPrinters.PrinterName)

Where PrinterNameName is the name of the printer.

Running it on my PC with W 8.1 works fine, I generate the exe, I run it, I access the application from a branch office, the report is printed on my printer and not on the client PC.

I use LocalPrinters () to view the local printers and it shows me the printers where the application runs, I think it should show the printers of the client PC.

Dim aPrinters As VStringArray = mReport.LocalPrinters()

How can I make the web application in xojo print directly to the printer on the client PC.

In a web application in xojo, can I rely on LocalPrinter() from valentina to get a list of printers installed on the client PC?

Greetings.
Mauricio
Comment
There are no comments made yet.
Sergey Pashkov Accepted Answer
Hello Mauricio,

No, you can't rely on the PrintToLocal printer method in the web application.
V4RB just doesn't have any access to the client PC in this case.

Can you generate PDF in memory and open it in a new tab of the browser?
Then the user can either print it or save it.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 1
Mauricio Pulla Accepted Answer
Hello Sergey.

Thanks for your answer.

It is a pity.

Please indicate how a PDF is generated in memory.

Mauricio.
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 2
Sergey Pashkov Accepted Answer
From our example (V4RB_7/Examples/VReport/WebOnSQLite/WebOnSQLite.xojo_binary_project):


// MAKE PDF in RAM
Dim pdfData As String = mReport.PrintToBuffer( EVReportPrintType.kToPDF, 1 )

// Prepare download
mPDF = New WebFile
mPDF.MimeType = "application/pdf"
mPDF.FileName = "report.pdf"
mPDF.ForceDownload = False
mPDF.Data = pdfData
.....
// Present download link to generated PDF
Link_PDF.URL = mPDF.URL
Link_PDF.Text = "PDF File - Click here to see it..."


mPDF - is the property of the WebPage of type WebFile
Link_PDF - is the link on the WebPage
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 3
Mauricio Pulla Accepted Answer
Thanks Sergey

Regards
Mauricio
Comment
There are no comments made yet.
  1. more than a month ago
  2. Valentina Reports ADK
  3. # 4
  • Page :
  • 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. 0 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories
Omegabundle
  1. 0 subcategories