Simplicty and flexibility!


Printing table frames in AdvancedWebField


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

Printing table frames in AdvancedWebField

Uses HtmlEdit to create templates for prints, in some cases, the table frames will be displayed on screen and in print.

When setting the field's Wrapper to tsBridge, the desired frames appear on screen, but not on print.

When exporting to Html or Pdf file, defined frames appear, but the pages have an oversized format for the print to be satisfied with the recipient.

Is it possible in today's version to use own style sheets, if so how? Are there any settings or features that can be used to print out the frame data from AdvancedWebField


Written by Tor Nerland 30/11/17 at 15:17:27 Dataease [{8}]FIVE

Re:Printing table frames in AdvancedWebField

Hi Tor.

Sorry for the late reply but it is for a good reason ;-)

We decided to make a sample app that showcase how you can get this working but due to having to much to do we haven't managed to finish it yet.

So in the meantime we can offer an explanation and a solution.

What is stored in the memo is just the HTML so when you use different wrappers the HTML is displayed according to the wrapper and the CSS in that wrapper.

The wrapper for HTMLedit and PrintMemo etc. is not the same but we have tried to coordinate them (and WebField) so it should look the same.

So the problem occur when you use a different wrapper for HTMLEdit because there is no corresponding Wrapper for Printmemo (which is an omission in logic).

However there is several fixes for this.

1. CSS means Cascading Style Sheet which means that the latest defintion/change to the style will be the valid one.
So what you need to do is to simply restyle the objects you want changed in your print in the HTML you send to the printer.

So what you need to do is to create a virtual memo that merge your CSS (link in a CSS style file) and the HTML generated from the Editor and then print this Virtual Memo.

This is a very good way of doing it any way as you then have complete and full control of what you send to the printer.

We will show how this is done in the sample, but based on what you are working on I am pretty sure that you are now able to do this yourself.

The function you need to look at is MemoCopy() and MemoMemoCopy().

The good news is also that in 8.6 onwards we expand all string function from 255 to 4GB so you can simply use concat()

PrintMemo(concat(MyCSS,MyHTML))


Written by DataEase 13/12/17 at 10:50:18 Dataease [{8}]FIVE
DG3_ForumList