Re: [libreoffice-users] [SOLVED?] Problem with text formatting in Report.
Greetings, I think I have a solution. I did some research on the Pentaho report generator that is used in the LO Base Report Generator with emphasis on their formula syntax. The following formula placed in the report field's properties "Data" tab in "Data field..." seems to do what I need: IF(LEN([Suffix])>0;"-"&[Suffix] ;"") This tests the length of the text string (Suffix) and if not 0 then outputs the string prefixed with a dash. The ampersand (&) concatenates text strings. If the string length is zero, it outputs the NULL string. I tried outputting the string here without the dash to be sure I got all data, as in:, IF(LEN([Suffix])>0;"-"&[Suffix] ;[Suffix]) but it fails for some reason, outputting "false" when the string length is 0 instead. As I said, it seems to be working, unless I breathe on it! Thanks for all the suggestions. Girvin On 5/15/19 3:17 PM, Girvin Herr wrote: Greetings, I am using LibreOffice 5.3.4.2 on Slackware Linux 14.2 (K4.4.75). I have a database with a text field which may or may not be null. What I want to do is to prefix a dash "-" before the text if the text field is not null. At first, I tried this format: ;;;"-"@ Somewhere, not by me, it got changed to: [>0]"";[<0]"";"";"-"@ However, this does not work. I get the text when not null, but not the dash in either case. Is there another way to do this? Thanks. Girvin Herr -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] No corresponding column type could be found for column 'ID'.
Hello Robert See below. Hello Robert See below. On 5/16/2019 2:53 PM, Robert Großkopf wrote: Hi Paul, When I want to append a Table from database one to database two, I get the message "No corresponding column type could be found for column 'ID'." The field "ID" from the Firebird-table must be autovalue. The receiving firebird database two is ID primary key, AutoValue = yes, Length = 10 I you will import the table, which all contains text-fields, the wizard will start. First you have to add the targettablename the content of the fields should be added to. Mark also "First row will show fieldnames" (don't know how it is called in English). Up to this point everything works. Table name is set correctly and Append Data is checked (circle filled with blue) "Use first line as column names" is already check marked and cannot be changed. Click on "Next" and then message shows "No corresponding column type could be found for column 'ID'." Cannot continue past this message. Then goto next and mark all fields of your importtable except "ID", if this content created new and shouldn't be moved to the targettable. Switch with the arrow-buttons on the right the field of the targettable, which should be filled by the content of your importtable. The field ID of the targettable could be at the same position as the field of the importtable, because you have deselected the field ID from the importtable. Hope this will work for you. Regards Robert -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Problem with text formatting in Report.
On 5/16/19 11:12 AM, Johnny Rosenberg wrote: Den tors 16 maj 2019 kl 00:22 skrev Girvin Herr : Greetings, I am using LibreOffice 5.3.4.2 on Slackware Linux 14.2 (K4.4.75). I have a database with a text field which may or may not be null. What I want to do is to prefix a dash "-" before the text if the text field is not null. At first, I tried this format: ;;;"-"@ Somewhere, not by me, it got changed to: [>0]"";[<0]"";"";"-"@ However, this does not work. I get the text when not null, but not the dash in either case. If I format a cell like your first example and enter a letter in that cell, let's say ”k”, I get: -k If I enter a number, the cell remains blank. Is this the behaviour you are looking for? The format string doesn't change if I don't change it. If I set it to [>0]"";[<0]"";"";"-"@ I get the same result, and I should since the two means exactly the same thing. Can you give an example that doesn't work? Kind regards Johnny Rosenberg Is there another way to do this? Thanks. Girvin Herr -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy Johnny, Thanks for your response. I should have been more clear in my original posting. I am not trying to do this in Calc. I am trying to do it in Base Report Generator. I have a text field in the database which I want to prefix with a dash (-) if, and only if, there is text (not NULL) in that field. None of the examples you gave will work as I expect (and as the number formatting help implies) in my context (with Base Report Generator). No matter how I format it, the result is strange and almost indeterminate. Sometimes if the text field is alpha-numeric, the result is "-" without the text. Other times it is the text without the "-" prefix. Sometimes when the text field is numeric-only, the result is the text without the "-". Sometimes not one of these. As I said, indeterminate results. Not getting a number when encountered is not what I am looking for. In all cases, if there is text there, I want it to be in the report. Also, I do not want the dash prefix, if there is no text to be in the report. So, I am not sure what is going on. It almost looks like a bug with the unexpected results. It also appears the formatting for the Report Generator behaves differently than for Calc. Thanks. Girvin -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] No corresponding column type could be found for column 'ID'.
Hi Paul, > > When I want to append a Table from database one to database two, I get > the message "No corresponding column type could be found for column > 'ID'." The field "ID" from the Firebird-table must be autovalue. I you will import the table, which all contains text-fields, the wizard will start. First you have to add the targettablename the content of the fields should be added to. Mark also "First row will show fieldnames" (don't know how it is called in English). Then goto next and mark all fields of your importtable except "ID", if this content created new and shouldn't be moved to the targettable. Switch with the arrow-buttons on the right the field of the targettable, which should be filled by the content of your importtable. The field ID of the targettable could be at the same position as the field of the importtable, because you have deselected the field ID from the importtable. Hope this will work for you. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Problem with text formatting in Report.
Hi Girvin, the Report-Builder should better get this information from the view, which is datasource of the report. All what could be done through SQL before submitting the data to the report will work faster (and mostly better). You have to write in SQL SELECT '-'||"text" FROM "table" This will submit all content of the field "Text", which contains characters (or empty text) with a '-'. All fields, which are NULL, we be NULL without '-'. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
[libreoffice-users] No corresponding column type could be found for column 'ID'.
Windows 7 64 bit, Version: 6.2.3.2 (x64) I have two databases. Both have "ID" defined as the first field in the databases. The first database is an import of text files that is unregistered. I believe it is Firebird, but do not know how to confirm this. The header to the text file has "ID" in the first line, first position and all its fields are blank. Example: ID;Model;Tube;Position;Date;Time;Ions;Select;Series;Settings ;1-1612-0023-192;1-1617-0009-1759;1.1;2019-05-14;3:32:00 PM; 503075;0;135;100 "ID" field was defined as "Text [ VARCHAR ]" automatically at Import and does not define "ID" as a key field. The second database is firebird registered. "ID" is defined as "Integer [ INTEGER ]". When I want to append a Table from database one to database two, I get the message "No corresponding column type could be found for column 'ID'." It does not let me skip this warning and move to the next screen where I would usually uncheck the field and allow automatic key to be filled in second database. Any suggestions welcome. Paul -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Problem with text formatting in Report.
Den tors 16 maj 2019 kl 00:22 skrev Girvin Herr : > Greetings, > > I am using LibreOffice 5.3.4.2 on Slackware Linux 14.2 (K4.4.75). > > I have a database with a text field which may or may not be null. What I > want to do is to prefix a dash "-" before the text if the text field is > not null. At first, I tried this format: > > ;;;"-"@ > > Somewhere, not by me, it got changed to: > > [>0]"";[<0]"";"";"-"@ > > However, this does not work. I get the text when not null, but not the > dash in either case. > If I format a cell like your first example and enter a letter in that cell, let's say ”k”, I get: -k If I enter a number, the cell remains blank. Is this the behaviour you are looking for? The format string doesn't change if I don't change it. If I set it to [>0]"";[<0]"";"";"-"@ I get the same result, and I should since the two means exactly the same thing. Can you give an example that doesn't work? Kind regards Johnny Rosenberg > > Is there another way to do this? > > Thanks. > > Girvin Herr > > > > -- > To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org > Problems? > https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette > List archive: https://listarchives.libreoffice.org/global/users/ > Privacy Policy: https://www.documentfoundation.org/privacy > -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Problem with text formatting in Report.
Remy, Greetings. I tried your suggestion, but it didn't work as expected. LO Report Builder did replace "[<>""]-@" with "[<>0]-@;General", similar to what you experienced. However, the result is strange and almost indeterminate. Sometimes if the text field is alpha-numeric, the result is "-" without the text. Other times it is the text without the "-" prefix. Sometimes if the text field is numeric-only, the result is the text without the "-". Strange. I then tried changing the format to "[<>0]"-"@;General" (quotes around dash) with the same results. Then I tried "[<>0]"-"@;Standard" as your Calc experiment changed, and LO changed it to "[<>0]"-"@;StanDarD", with the same results. So, I am not sure what is going on. It almost looks like a bug with the unexpected results. Thanks. Girvin On 5/15/19 5:03 PM, Remy Gauthier wrote: Greetings, I tried this in calc (which I am assuming you are using), and it seems to work for what you describe: [<>""]-@ The interesting thing is that calc changed it afterwards to [<>0]-@;Standard but it still seems to work. I hope this helps. Rémy. Le mercredi 15 mai 2019 à 15:17 -0700, Girvin Herr a écrit : Greetings, I am using LibreOffice 5.3.4.2 on Slackware Linux 14.2 (K4.4.75). I have a database with a text field which may or may not be null. What I want to do is to prefix a dash "-" before the text if the text field is not null. At first, I tried this format: ;;;"-"@ Somewhere, not by me, it got changed to: [>0]"";[<0]"";"";"-"@ However, this does not work. I get the text when not null, but not the dash in either case. Is there another way to do this? Thanks. Girvin Herr -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy
Re: [libreoffice-users] Cannot get summed values in a Base report
Hi Girvin, > > However, when I try these parameters in the new report, when I select > "Accumulation" in the Function field, it changes "Data Field" to > "[AccumulationCostReport]" and the Function and Scope fields go blank. Seems to be the right function. You could see the content of the function when opening the report-navigator. The function must be available there. Should look like [Cost]+[AccumulationCostReport] ... but could be there is a field without content. If you add NULL (not 0) to the function the result will be NULL. You could send me a database-example with some dummy-data. I would have a look at it. The best way to get the whole sum of all values is to create a view for the content of the report. The sum will be a part of the view, not created in the report. Regards Robert -- Homepage: http://robert.familiegrosskopf.de LibreOffice Community: http://robert.familiegrosskopf.de/map_3 -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy