4. Excel Reports

Every excel report needs a column “A”, which will be deleted after the report is created. This column has to be filled with the table structure like this:

(You can use for every table a header, a dataline area and a footer.)

Example column A:

CodeDescription
!Table (name=”Suppliers”)Start table
!HeaderStart header-area
!LineLine for output
!Line (condition=”UserVars.UserBool22”)Show line if UserBool22 = True
!EndHeaderEnd header-area
!Table (name=”Profiles” foreignKey = “SupplierID” sortFields=”Profiles.ArticleNo DESC”)New table with key and sort order
!HeaderStart header-area
!LineLine for output
!EndHeaderEnd header-area
!DataLineStart dataline area
!LinePrints 1 line per databaserow
!EndDataLineEnd dataline
!FooterOpen footer area
!LineLine for output
!EndFooterClose footer area
!EndTableClose table profiles
!EndTableClose table suppliers

Examples for cells in data lines

CodeDescription
!(Terms.Elevation)Fields are always between !() You can printout every field from the reportvariables and from the tables which are connected in column A.
!(str$(Profiles.Length_Output,0,0)) !( Fstr$( A_Glass.Strength_Output,Masks.mm_0 ))Str$() can be used to format a value string / Str$(value, amount min length, amount digits) Example: Str$(1,23456789,0,2) = 1,23 Fstr$() can be used with format masks (look table ReportVariables)
!(Cond$(Profiles.Status=0, ‘ohne Status’))Example: Cond$(1 = 1, ‘coated’, ‘uncoated’) = coated
=D4*E4Use normal excel formulars to calculate
!(loadRtfFile$(ReportOfferTexts.Description))The option loadRtfFile$ loads a string with directory + filename and convert this rtf to a standard text.
!(P;A_Profiles.Picture12_File, A_Profiles.Picture12_WidthMM,0)If you like to show pictures, please use P; with the path or filed of the picture. Separate Width and Height value with Comma. Excample: !(P;C:\OrgaTemp...\Picture1_File.jpg, 20,20)
If you want to set fonts, fontsize, decimal places, backgrounds, sum, … use Excel.
There is a small problem, if you want to use formulas like:  =WENN(V15>0;100-(V15100/W15);0) Flexel will change them to: IF(V15>0,100-(U15/W15),0) and they will not work. Please use: =WENN(V15>Summe(0);100-(V15100/W15);0)