Valentina Reports

[quote=33684:@Alexis Colon Lugo]i trait Valentina but have same Bug of Xojo Reports

Report lines do not have the ability to auto grow in height when i add data with TextArea using the return key for each line enter on the textarea[/quote]

  • Alex, this should work. Please check property can_grow of your control. Many controls in Valentina Reports have this property.

  • Besides if you want just text area to have line on left side, no need to use LINE control. You can set border in the text area itself. Border can be assigned in any combination for 4 sides.

  • Also exists property ‘position_type’ { float / fixed }. It is float on default. When it is float, then control will be able to move down, if above control what more space (e.g. text control with can_grow flag)

Just in case,

If you have found bug or you have feature request – please report this into Paradigma’s bug tracker Mantis

If you have question on Valentina DB or Valentina Reports and you do not get help on Xojo forum/list, then best place to ask is Valentina lists of course where our engineers read and answers.

[quote=33674:@Jay Madren]The connection string should be:


Thanks Jay that worked perfectly, like many in forums I must remember not to code in the early hours of the morning :slight_smile:

[quote=33685:@Ruslan Zasukhin]Hi Guys,

I was going to make this NEWS post in 1-2 days. But something I will show today.

  1. We have spend already 2 weeks developing new ONLINE examples of Valentina Reports
  • Examples are described in WIKI, then you can see a link to open an online generated report

  • Each example contains on top of the page links to database and project file with reports. So you can download and see how it is made.

  • BENCH example demonstrates that Valentina Server, working as REPORT SERVER, can produce 4-12 millions 1-page PDF reports in one day working on Mac Mini/i7

  • CONTROL_ALL example includes many simple reports, each tend to demonstrate one control and how its parameters change render.

  • UNIVERSAL_REPORT example demonstrates how the same report is generated agains mySQL / PostgreSQL / VSERVER. Yes we have setup on that online server these 3 DB servers, we have load into them the same Sakila database. THIS example is implemented on both PHP and Xojo Web Edition. You can download archives of both. And in few days we will add implementation via Java… [/quote]

Thanks Ruslan, keep up the good work, really enjoying Valentina (now I have it working). One thing that would help newbies like me would be some more ‘full’ examples in the manual. I got close to solution in the end with reference to an old post of yours in the Realbasic forums so any upcoming examples will be really appreciated.

I use both Valentina Reports and BK Shorts. Bob is right. I have found that sometimes a banded report tool is perfect for the job, sometimes you need something that can’t be done in VReports, and BK Shorts is perfect for the that.

Although, I’ve always exported to PDF in Vreports ADK. Haven’t figured out how to send all pages of the report to a printer. Anybody know how to do this?

yes the can_grow flag is check

[quote=33699:@Ken Lossman]Although, I’ve always exported to PDF in Vreports ADK. Haven’t figured out how to send all pages of the report to a printer. Anybody know how to do this?

Well, we have in our Mantis quite big TODO list for Valentina Reports. You always can check if something that you need already present there. Or talk to us. Whatever is better for you.

I think it is quite clear that between “coded reports” and “designed reports” exists huge difference. For example, coded reports requires developer skills, recompilation. Locked to single language. Not portable. But of course, if you use just a DRAW LIBRARY, you can with time implement anything you want.

Designed reports in contrast can be developed more by designers, then can be changed AFTER application is compiled and sent to users. And so on.

If you really have found feature, which is not possible do with Valentina Report and you want get it there, please do a feature request. May happens that this is possible right now.

This is asked quite often. Right now, Valentina Reports do not include any print-device related features.

From one side, because its hard even image how this should work, including support of Xojo, PHP, ObjC, NET, … on 3 OS.
We should show our own Print Dialog?
But then I believe each second developer start ask how to change it for HIS application.

From talks with other developers, it seems that Xojo itself do not provide so far good printing support.
Image that you just have PDF, JPG or other file and you need print it from Xojo app.

This is not actually a task of report engine, which generates that PDF or JPG or HTML.

We now working on switch of Reports and Valentina Studio to QT framework.
There are changes that from QT we will get support of printing …
But again we will need invent something with cross-IDE, cross-OS dialog.

Alex, what about border of Text Area? Our guys say this is the most correct way.

You can send your .vsp file, may be PDF with mark what is wrong, and description what you want.
We can correct vsp and send you back.


[quote=33762:@Ruslan Zasukhin]We should show our own Print Dialog?
But then I believe each second developer start ask how to change it for HIS application.[/quote]

A rep1.nativePrint() function, invoking a native print Dialog should be great for a start.
Then you guys can think in a better customizable way for a future rep1. print() function.

Do you mean native for OS?

Yes. That could make it easy, no? In the future, when something better comes, you deprecate nativePrint(), if necessary.

[quote=33772:@Rick A.]Yes. That could make it easy, no? In the future, when something better comes, you deprecate nativePrint(), if necessary.

As I remember our guys did try once, and then second … was not easy.
So they have give up.
I will talk with them tomorrow again about this.
Thank you for push :slight_smile:

I have talk with developer. He says not easy, because as far as he know:

  • any OS do not provide single-line function printFilePdfToPrinter()
  • dialog is not enough, application self need get printer device, and start “paint” to that device
  • if talk about PDF, it needs to parse at first PDF, because it is a complex format, which can have e.g. embedded xml and JS and forms
    and then only application will be able start paint something from that PDF.
  • even QT do not include simple one-line method to print ready PDF.
  • But with QT we will be able to “draw” generated report not into PDF file, but into printer-device immediately.

If somebody have any other information, please point to that. May be we do not see something simple.

Printing PDFs to the printer is easy with Xojo. As usual the name of the secret is MBS. I’ll dig into my code later.

I forgot: on OS X.

Here is the code I use as adapted from the MBS example:

[code]Private Sub DoCarbonPrint(PrintFile as Folderitem)

'print the temporary pdf file

'get a print session
dim thePrintSession as CPMPrintSessionMBS = NewCPMPrintSessionMBS
if thePrintSession = nil then Return

'get default page format and print settings and attach it to the print settings
dim thePageFormat as CPMPageFormatMBS = NewCPMPageFormatMBS
if thePageFormat = nil then Return

dim thePrintSettings as CPMPrintSettingsMBS = NewCPMPrintSettingsMBS
if thePrintSettings = nil then Return
thePrintSettings.JobName = NewCFStringMBS(theSubject)

thePrintSession.DefaultPageFormat thePageFormat
thePrintSession.DefaultPrintSettings thePrintSettings

'show the print dialog
if not thePrintSession.PrintDialog(thePrintSettings, thePageFormat) then return

'open the file which will be printed
dim thePdfDocument as CGPDFDocumentMBS = PrintFile.OpenAsCGPDFDocumentMBS
if thePdfDocument = nil then Return

'get the last page to be printed
dim LastPage as Integer = thePrintSettings.LastPage
if LastPage > 1000000 then LastPage = thePdfDocument.PageCount

'begin the printing
thePrintSession.BeginDocument(thePrintSettings, thePageFormat)

'loop over the number of copies
for currentCopy as Integer = 1 to thePrintSettings.Copies

'loop over the pages
for currentPage as Integer = thePrintSettings.FirstPage to LastPage
  'prepage the page
  dim PrintRect as CPMRectMBS =thePageFormat.AdjustedPageSize
  dim CGRect as CGRectMBS =CGMakeRectMBS(PrintRect.left,, PrintRect.Width, PrintRect.Height)
  thePrintSession.BeginPage(thePageFormat, nil)
  dim thePrintContext as CGContextMBS = thePrintSession.PageContext
  if thePrintContext = Nil then return
  'print the page
  thePrintContext.DrawCGPDFDocument thePdfDocument, CGRect, currentPage
  'end the page
  thePrintContext = nil


'end the printing

End Sub

Thank you, Beatrix, but no solution for Windows and Linux, right?