How to store and retrieve a FR file in database field?

Hello,

Many customers want the same invoice report to be different e.g. smaller or larger font types, logo at left, logo at right etc.
It is not a good choice to let them design the report since they can spoil the functions and field definitions (the other thing is that most of them don't know English and the object inspector cannot be translated).

The best thing would be that I would set up e.g. 10 different designs of the same invoice Fr form then store in a database table like:

ReportType VarChar(30) e.g. "InvoiceEport"
ReportCustomerDisplayName VarChar(30) e.g. "Invoice small letters" or " "Invoice medium letters logo top-right"
Report Long this would contain the Fr report itself

The customer would choose which report he would like to use before printing and I would load it somehow.

Have you got a method to do this?

Comments

  • gpigpi
    edited 6:25AM
    See a demo in attach
  • edited 6:25AM
    gpi wrote: »
    See a demo in attach

    Thank you very much!

    I tested it and it works very well!
    I will try to adapt it to MySql tables but I think there won't be any problem.
  • edited 6:25AM
    I tried to store a report in a firebird blob field and I get an exception: raised exception class TfrxInvalidXMLException with message 'Invalid file format'.
    As should be the blob field format.

    Best regards >
  • edited January 2012
    starhu wrote: »
    The best thing would be that I would set up e.g. 10 different designs of the same invoice Fr form then store in a database table like:
    FWIW, these are my thought about this approach.

    From my experience, I have given up on guessing what format or details a customer wants to see on a report.
    You provide 10 reports, you'll find that you will need 15. You provide these 15 report and discover that you'll need 20.
    You provide the 20 and all of a sudden one customer wants to have a value printed which you'd never have thought that anybody would ever want to see.
    Then one of them asks you to do some forensic investigations and you discover that you need a report which prints out certain columns so that you can prove your conclusions to the customer.

    Let's look at a practical issue. Besides the positioning, how are you going to accommodate logos whose aspect ratio will be completely arbritrary? What if it has to be larger than the space you allow because one of the fonts used is so small that it is unreadable with your space allocation?
    Printed letter heads often contain not only a logo, but also a watermark, and in this country also a list of company directors in the page footer. Are you going to make provision for all this so that the customer can e-mail a report which looks very similar to a printed report?

    With invoices and some other documents, if the customer is using pre-printed forms for dot-matrix printers you are also at the mercy of the form designer/printer. Often they do not understand the requirements or implications and e.g. provide 3 vertical boxes which have 1.5 line spacing. Also, are you going to provide 10 'standard' invoice formats plus 10 dot-matrix formats?

    IMO, It is a game you, as the provider, can't win.

    Every business has it unique quirks. Of the maybe 300 business we deal with not even two operate in exactly the same way.

    Allow them to edit the reports. If they can't, or mess it up, do it for them and charge them for it.

    The way I handle it is that I provide a default template that serves as a base for any custom format, and which can be recreated at any time.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.