Report Writer?

First time using the report writer. I’m not too far into making a very basic report and I’m wondering if it’s as bad as it seems?

All in all it makes no sense at all. None. The report units is inches but the positioning seems to be in some sort of scientific notation. For example I’ve got a control about .25" from the left edge and it appears as 2.14e-1 from the left. What is that? Do I have to get out my slide rule to lay out a report? An item right next to it appears as being 6.0699999999999998e-1 from the left margin. What’s wrong? There has to be something wrong with a setting somewhere. Neither of these two items are outside .5 inch from the left edge. Where is this measuring from? Where is the origin?

Nothing is lining up. It looks terrible. I don’t get how the resolution works. But, of course, the example project “List of Orders” looks perfect! How did I screw it up?

Old bugs, never cared. People usually try other solutions.

Well, you’re not alone in these issues. It’s not a very good tool. Like Rick said most go to other solutions. Here are the 3 that I would look at (there may be others):

Valentina Reports
DBReports
BKeeney Shorts

For starting out, DBReports might be for you. Valentina is pretty nice but also pricy. Shorts (our product by the way) has no GUI designer and is done via code but it’s also the most flexible (only limited by your imagination and programming capability).

Didn’t take us too long to realize that none of the currently available solutions would provide the level of professionalism that we were looking for. A couple of years ago we invested the time in creating our own reports using DynaPDF. That meant hand coding each report, but in terms of doing whatever you want where ever you want and … here’s the most important part … providing consistent reports on Windows and Mac, this was the only solution that worked.

I should mention that we were converting an application that had been for sale (commercially) since 1985 with annual iterations so it was necessary for us to duplicate the look of our reports down to the smallest detail. Our users wouldn’t settle for anything less than that.

If I was creating a new application and didn’t already have some tools in place to generate reports using DynaPDF I might consider something else, but actually, once you do the hard work up front, creating new reports using our tools is simpler than anything else that’s out there, including Xojo’s built-in banded report writer.

I haven’t really kept up on what’s currently available, but our initial review included Valentina Reports, DBReports, Xojo’s own, plus some others that were available 3 years ago. Unfortunately, nobody was talking about DynaPDF as a report generator, but in our opinion nothing comes close. The support from Christian at Monkeybread is stellar.

All 3 of the solutions I posted above will export to PDF. Shorts uses DynaPDF to create the PDF’s in fact.

I do a session on reporting every couple of years at the Xojo Developers conference (and doing it again next week). 3 years ago DBReports and Shorts didn’t exist and Valentina was pretty buggy.

Bob, just a little feedback, I just downloaded the BKeeney Shorts demo to give it a whirl. I removed the DynaPDF classes as instructed in the User Guide, but I still get other errors and references to it in other parts of the code. I also get other errors that may or may not be related. I am sure I can get to the bottom of most of these errors, but… you may want to consider posting a Demo that works right out of the box. A LOT of people will walk away from a posted demo that won’t compile. I’m using 2014r2.1 on Windows 7.

Thanks for the reality check. I’m not going to waste much time with it. I don’t need but one simple report so I’ll look at exporting the data into one format or another for import into something. If I needed more reports I might consider one of the commercial solutions.

The Report writer seriously sucks rocks and XOJO are aware of it. Sadly it’s just not a priority. It’s quite poor that a ‘professional’ development environment can’t create basic, reliable reports without third party components.

@Kim Kohen the report writer can create BASIC reports. Anything more than BASIC it gets very hard to do with the report writer. Hence why there is 3rd party tools. Give you options.

It can create basic reports, they’re just very unreliable. I have a few database apps which use several Report Writer reports and have lots of problems with them, mainly to do with text alignments. I’ve sent a few bugs and projects directly to Geoff (at his request). They’re aware of the problem and are aware it needs work.

It’s very hard to beat DynaPDF Starter. It’s constantly updated and the yearly renewal is cheap. One of the best investments I’ve ever made.

The report writer came out 6 years ago and it’s still unusable… very sad.

well I ran into same problems with built-in Report Generator. My customer did not want any hard-coded reports. So I wrote my own solution, remembering good old Coldfusion times where HTML and CFTags were mixed. Maybe this is is an inspiration for you:

Basically my report is nothing more or less than just a simple HTML page enriched with base64-encoded inline-images and included CSS Styles for formating and precise positioning.

All queries and other informations like Reportname, Titel etc. are put into meta tags in the HTML heads section:

<meta name="report" content="Testreport">
<meta name="SQLcontent1" content="SELECT Fieldname1, Fieldname2, Fieldname3  FROM Tablename WHERE x = y">

I can handle up to 4 different queries and throw them out with Keytags like this [#Start SQLcontent1#] and [#End SQLcontent1#] where a loop goes through the query SQLcontent1. All Fieldnames are represented in brackets like this [#Fieldname1#].

And so it looks like in HTML:

<table id="SQLcontent1"><tr>
	<td valign="top">
	Label Column 1
	</td>
	<td valign="top">
	Label Column 2
	</td>
	<td valign="top">
	Label Column 3
	</td>
</tr>
		
[#Start SQLcontent1#]
	<tr>
		<td valign="top">
		[#Fieldname1#]
		</td>
		<td valign="top">
		[#Fieldname2#]
		</td>
		<td valign="top">
		[#Fieldname3#]
		</td>
	</tr>
[#End SQLcontent1#]

</table>

I am using some helper functions like Format() for Dates, Number and Currencies e.g. [#format(Fieldname3, ShortDate)#]
And because each HTML Tag can have its own ID Tags or can be accessed in DOM I can format everything with CSS.

And so it looks like in preview mode (as I said just an HTMLviewer)

On windows it uses the Internet Explorer Rendering Engine for Preview and Printing.
Most of the page settings can be accessed and set by Registry. I’ve written an own Page setting pane:

EDIT: I did not mentioned, that this type of reports, once rendered and written as HTML easily can be stored in databases.

Well, I spent the whole weekend looking at various reporting solutions for Xojo, some of the current ones listed above and at least one old that had been abandoned that I had downloaded a while back. And I gave the Built-in Xojo Reports the old college try, but just couldn’t fight through the problems mentioned above. I could see where that was headed. So today, I purchased the BKenney Shorts Reports because I like a coding solution. If I was trying to present a UI solution for the end users, that is another thing. But as a programmer, it’s hard for me to complain about coding reports, because coding is what I am do anyway. Because some of our reports are fairly custom and very concise, I like doing it that way instead of a WYSIWYG Report designer. It gives me a heck of a lot more flexibility and latitude in what I can produce. Another big reason I chose them is, I’m very confident BKeeney software will be around 3 years from now if Xojo, OSX or Windows throws us a curve. I’ll have a resource to draw on, if I can’t get to the bottom of the issue.

The price was not cheap… But neither is my time. This thing will pay for itself in short order rather than me fighting through the problems of the built-in Report writer, or rolling my own solution. If I can’t come up with home-built solution that is built and fully tested in less than 10 hours (and I can’t, trust me) then I would quickly go into the hole going that route. It’s paid for, and it’s mine to use for project after project after project going forward. That’s a bargain in my book.

Well my experience with Report Writer got better the next day. Don’t know why exactly but it at least worked as good as the example projects. I think it had something to do with selecting and setting the print options in the print dialogs. The report I was working on had been so messed up. Sometimes report elements were off the page and sometimes they got resized down. And for no good reason that I could see. That’s why I think it was the print options dialog choices. Or non choices is probably more like it.

I have just 2 simple reports to do. Each of these are based on a recordset of just one record. What I’m going for is something that looks better than spreadsheet exported data. And for one record what could go wrong?

Tomas I really like you solution. I’m going to look into that.

Merv, I understand the economics of purchasing a solution. For me, at this point, I don’t think I can justify it. But it doesn’t take much.