Pentaho report design customize program text - pentaho

When I view my Pentaho report I want to change Output Type text to my own language. How can I do this?

To change the language of PUC (Assume that you want to change on PUC) first you need to add the necessary language to the web browser so that it is presented first on the list.
Then,
i) edit PUCLogin.jsp located in ...\server\biserver-ee\tomcat\webapps\pentaho\jsp
ii) search en_US - it can be in line 180 with the following content: <input type="hidden" name="locale" value="en_US">
iii) change "en_US" to "it_IT" (or necessary language)
iv) save and restart the browser and server
Hope this helps

Related

Xpages File Download collect and display extra information

I'm using file upload and download control. I understand how to use the provided display columns, but how would I go about collecting other info about each uploaded file and then displaying it (i.e. Display Name and Notes that the user would enter)?
<xp:fileUpload id="fileUpload1"
value="#{document1.files}" style="width:80%"
useUploadname="false">
<xp:eventHandler event="onchange"
submit="true" refreshMode="complete"
disableValidators="true">
</xp:eventHandler>
</xp:fileUpload>
<xp:br></xp:br>
<xp:fileDownload rows="30" id="FD1"
displayLastModified="false" value="#{document1.files}"
style="width:98%" hideWhen="true" displayType="false"
displayCreated="true" rules="all"
lastModifiedTitle="Last Modified">
<xp:this.allowDelete><![CDATA[${javascript:database.queryAccessRoles(session.getEffectiveUserName()).contains('[Admin]')}]]></xp:this.allowDelete>
</xp:fileDownload>
If I understand your question correctly: you want to add additional information columns into the file download control that are derived from information stored or computed elsewhere, e.g. from a NotesItem (a field in the Notes document)?
In this case you need to construct your own output using a repeat control. You can render a table or a list - whatever you deem fit for display.
The “trick” is how to construct the URL for download - which is simply:
/yourdatabase.nsf/0/unid/AttachmentName?OpenAttachment
(typed off memory. You might need to double check syntax).
Word of caution: if you have lots of attachments, you might consider having separate documents for them and use a view - above URL works in views too. Saves you a versioning headache (in case multiple users can upload to the same document).
Let us know how it goes

Asp.NET database multi-lang design [Include HTML]

,
I read lots of answer here and learn something about this topic but I need more help.Some pages in my project are getting the html(page body) from database.For my controls I use resx files and it works great, but now I need save the html values with multi-lang in my database.
I have a admin panel for my project and I edit sometimes the html or text or pictures in my editor and save it back to DB.I cache the html values in my website and get better performance for my project.But the html text parts is yet in my default lang I will create multi-lang.
I thought of a few possible solutions,
First solution was copying all of the same HTML data and create for all lang one by one
First solution problem : But later this doesnt make sense If I copy the values and create for other lang, then I had be repeating unnecessarily in my database the html values.
My second solution was like this :
this I hid it in the normal way in my DB (only a part of html in one column)
<li>Hello World</li>
<li>Hello Me</li>
Solution :
<li>[HelloWorld]</li>
<li>[HelloMe]</li>
string newHtmlValue = oldValue.ReplaceByLang("[HelloWorld]", GetCulture();,"Hallo Welt");
***// GetCulture(); return for this example german !
I create a new table for the replace text like the key is [HelloWorld]
1(ROW)- [HelloWorld] eng Hello World
2(ROW)- [HelloWorld] german Hallo Welt
3(ROW)- [HelloWorld] fr bonjour tout le monde
and in my project I select the right html value by culture lang.
Now my question is have you any better idea ?
I hope I've been clear and not messy, but if you need more informations I'll be glad to tell you more.Sorry for english.
I would prefer to store all your localized string in single repository like - DB or Satellite assembly.
For Example if you choose DB as repository - Define 3 tables (minimal structure)
1.Locale - Define your locale
2.Resourcemaster - Define your source string and reference Key and this key should be unique in you application and define a standard format like Module_Control_Section ..
3.LocalizedResource - Define your localized sting of Resourcemaster with Locale Key. Foreign key with ResourceMaster and Locale
In front End you can resole any string like control , Html string with localized string and Unique reference key.
Also Implement UI Caching / API caching for better performance.
Regards
Abdul

change the font size of qweb report dynamically

Is there a module or a way to define the font size of qweb report dynamically for example on the configuration without change it on the code?
You can create a field (or fields) on the res.company module to define font_size or any other features you want and then call them from QWeb this:
# Field can be Integer or Float
<p t-attf-style="font-size: #{o.company_id and o.company_id.font_size or '12'}px;">
# Field can be Char, but is more prone to possible user input error
<p t-attf-style="font-size: #{o.company_id and o.company_id.font_size or '12px'};">
Of course, this requires that whatever model your report is for must have a company_id field to pull from. However, most models have this already, so it is a fairly safe assumption.
This technique isn't really noted anywhere in the documentation, but I'll link to it anyway.
Qweb Documentation
Reports Documentation

Edit a Mainframe file in the RecordEditor without a copybook

How do you Edit a (binary EBCDIC) Mainframe file in the RecordEditor with out a Cobol Copybook.
How do you generate Java code to read the file using the RecordEditor.
Note: This is an attempt to split a question that is far to broad to give meaningful answer to
into a series of simpler Question and Answer's.
Try and avoid editing a binary file with a Cobol Copybook if at all possible. This should only be attempted as a last resort !!!.
Try and get
that Cobol copybook (or some field layout document) for the file !!!
Some general advise:
It is feasible when dealing with 10 / 20 fields in a record but not if there a thousands of fields in a Record.
Take your time do not rush the process. Try and get each step correct before moving on
Finally upgrade to the latest version of the RecordEditor (currently 0.98.4)
This process will also work for normal Text file as well
RecordEditor Layout Wizard
To start the wizard select option Record Layouts >>> Layout Wizard.
File Structure screen
The file structure screen has 3 purposes:
Get the File structure - It could be Fixed Width, VB, Windows/Unix Text file
Get the Record-Length (if it is a fixed width file).
Get the font (character-set / encoding)
The RecordEditor will try and work this out for you
Field Selection Screen
The RecordEditor will try and work out where fields start and end but
it is not perfect. You need to carefully check and correct its choices
On this screen, the fields are displayed in alternating colors
you create/delete a field by clicking on
use the Clear Fields button clear all the fields
you can change what field-types to search for using the various check box's (e.g. Mainframe Zones Decimal)
The Add Fields will do another field search
Field Definition screen
On this screen you define the field names and Types. You may need to go back to the **Field Selection Screen* to adjust the fields
Editing the file
Once the Record Layout has been defined, it can be used on the open file screen
Generating Java code
When editing your file, you can generate java~JRecord code to read the file
by selecting Generate >>> Java >>> ....
You can the enter a package-id + generate options:
and finally your sample java code is generated to read / write the
file.

prestashop mail customisation, and module translation

i have two question
1 - i installed referral program module , and i would like to customise the referralprogram-invitation.html mail template
so i putted the new template under : prestashop_root/themes/my_theme/modules/referralprogram/mails/referralprogram-invitation.html
but i doesn't work !
2 - i would like to add some extra text to the program page of referral program module
so i copied the file already included with the module under
prestashop_root/themes/my_theme/modules/referralprogram/translations/fr.php and I added the new text translation in this form
$_MODULE['<{referralprogram}prestashop>program_MD5'] = 'new text';
and it does not work?!!
You only forgot the language folder. Your mail templates must not be in :
prestashop_root/themes/my_theme/modules/referralprogram/mails/referralprogram-invitation.html
but in
prestashop_root/themes/my_theme/modules/referralprogram/mails/fr/referralprogram-invitation.html
If you want to add text to the program page, you must:
First, make a copy of the file : prestashop_root/modules/referralprogram/views/templates/front/program.tpl to prestashop_root/themes/my_theme/modules/referralprogram/views/templates/front/program.tpl
Then, you need to modify this file and add the text you want, where you want. To be translatable, your text must be added like this {l s='new text' mod='referralprogram'}.
Finally, you need to translate this text via the Localization > Traductions page of your BO and not directly in the fr.php file.
Do not hesitate if you need more information,
Paul.