Easy to Create, Easy to Change - Easy to use!


SetStyle()


Started by Edward Gordley
Search
You will need to Sign In to be able to add or comment on the forum!

SetStyle()

I have been testing the SetStyle() and have bee able to change the look on within the form on the screen. In my application I was wanting to change the color of and font in a data field based on values and then print the record on the screen to a PDF to e-mail to a group. The record prints as always but the style colors on the print out revert back to the "Normal" Style, the triggered color change does not print on the printout. is this normal, can I not WYSIWYG the screen when an OLM has fired and changed to appearance on the screen?

Written by Edward Gordley 04/12/15 at 14:20:16 Dataease [{8}]FIVE

Re:SetStyle()

Just at add a little more information. I used an OML script in DE7.2 to print out color coded production tickets using "Red.Color := 127.... writing code for each color and condition. I thought SetStyle() would be a dream for this type on application. I'm currently running 8.2.1700. Any input would be greatly appreciated.

Written by Edward Gordley 08/12/15 at 14:29:27 Dataease [{8}]FIVE

Re:SetStyle()

Up to DataEase 8 the general thinking of the DataEase development team was - Swiss Army Knife. 

One product and one functionality should cover everything.

This has led to a product that ended up not being very good at anything.

The Developer side of the product suffered from sharing the environment with the Runtime side, and the Form side of Documents suffered from sharing the environment with Report/DQL.

The focus of all the new functions in DE8 is on Form (Page) i.e. what you use for input/output on the screen and on functions for processing in both derivations and DQL (ExecDQL).

We have "left" the old Report/DQL alone simply for backwards compatibility, and it will in the next version of DataEase be replaced by a new reporting tool built on top of ExecDQL (You can already use this manually i.e. Body definition on MemoExecDQL).

You have basically hit upon the peculiarities of Reporting in DFW.

It was obviously a crazy idea to create the report part of the tool in the same environment as the Forms. 

Originally the forms and the reports had/used the same styles which resulted in "colourful" reports with a lot of extra lines and shades.

Another problem is of course that DataEase print in a style called "wall papering" i.e you get a matrix of sheets that as a total will make you a 2 meter wide and N meter long wallpaper that should represent your report.

Instead of dealing with the core of the problem, it was dealt with by modifying print when the document was a Report.

Background colours, styles etc was hence removed to give a more printable version.

You might have seen that the behaviour of reports is also different if the report is Live, Print or if it is a DQL...

All in all, this is a mess and it will all soon be history.

But in short.

If you print a form, it will be WYSIWYG.

If you print a Report (Live) you will be able to manipulate the form but only for the number of records on screen and the GetCurrent("RowNumber") etc will not report correctly.

Print as old style DQL...Won't even think of it.

So there is ways to work around this i.e. print form instead of report etc.

If you are only printing one Record at the time this might be workable, but if you are printing long lists etc, then the best solution in your case is to just use OML 

The long term solution will be to re-write the Reports in MemoExecDQL() which will give a much better result but we understand that this will not be an "attractive" route until we release the editor for this.



Written by DataEase 08/12/15 at 16:25:13 Dataease [{8}]FIVE

Re:SetStyle()

You can see how you can build a HTML based body on DQL here.

http://www.dataease.com/DG3_BlogList/?ParentID=000...

In HTML you can simply define a class (like a style in DFW) that you include in the HTML to switch colour etc.

Written by DataEase 08/12/15 at 17:41:55 Dataease [{8}]FIVE