#1 2013-05-03 17:42:41

afteixeira
Member
Registered: 2013-05-03

email settings

Hey guys!

I wasn't able to find a propertie file neither a GUI to set outgoing mail server... How can I do it?

And... Is it possible to change date format? Default format is dd.MM.yyyy but I'd like to have something different than that! Can I change it?

Thanks again!

Alex

Offline

#2 2013-05-03 18:06:06

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: email settings

Hey Alex,

the easiest way to get most of the configuration up and running is to install the demodata which will also install most of the config files. You'll get the zip file from http://sourceforge.net/projects/dw-rs/f … mobuilder/.
Upload the zip file to the root folder of the internal FileServer and open a Terminal (CTRL+ALT+T). Go to the folder "cd /fileserver/" and unpack the zip file using "unzip demobuilder_RS2.0.zip". This should create a folder "bin". Change director "cd bin"  and execute the demobuilder using "exec -c demobuilder.groovy". Be careful, this wipes out any changes you made to the system.

ReportServer stores most configuration files in its internal file system under /etc. The config file for the mailserver is located at "/etc/mail/mail.cf". Here is an example config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>mail.datenwerke.net</host>
      <port>25</port>
      <username>rs@datenwerke.net</username>
      <password>SecretPassword</password>
      <ssl>false</ssl>
      <tls>
         <enable>false</enable>
         <require>false</require>
      </tls>
   </smtp>
   <mail>
      <sender>rs@datenwerke.net</sender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

Hope that helps.

Cheers
Arno

Offline

#3 2013-05-03 18:12:23

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: email settings

As for the second question. Where do you want to change the default date format? Is that in reports (dynamic lists)?

Arno

Offline

#4 2013-05-03 19:27:50

afteixeira
Member
Registered: 2013-05-03

Re: email settings

Hey Arno!

Thanks! It's working perfect!

I can see this stack when an email is sent (but it's sending normally):

May 03, 2013 4:13:55 PM net.datenwerke.rs.incubator.service.crypto.FileServerKeyStoreKryptoCredentialProvider getKeyStore
INFO: Error loading keystore form location "/fileserver/keystore-usr.jks"
java.lang.NullPointerException
	at net.datenwerke.rs.incubator.service.crypto.FileServerKeyStoreKryptoCredentialProvider.getKeyStore(FileServerKeyStoreKryptoCredentialProvider.java:33)
	at net.datenwerke.security.service.crypto.credentialproviders.KeyStoreCredentialProvider.getCredentials(KeyStoreCredentialProvider.java:33)
	at net.datenwerke.security.service.crypto.CryptoServiceImpl.getUserCryptoCredentials(CryptoServiceImpl.java:62)
	at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:129)
	at net.datenwerke.rs.core.service.mail.MailServiceImpl$1.run(MailServiceImpl.java:260)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)

For information I'm using a local sendmail!

About the date format... I'd like to change format on Reports Parameters.. I need to run a query and pass an initial and end date to it.. I could cast these date on my query but if I could change it on date picker it would be nice.. If it's something simple to do.. smile

Ah! I didn't know that I should install the "demo" to be able to configure email! Maybe it could be written in somewhere on "Installation and basic configuration" section.

By the way.. I'm really surprised about the Terminal Emulator you did! Very very nice!

Thanks again!

Alex

Last edited by afteixeira (2013-05-03 19:28:42)

Offline

#5 2013-05-04 09:41:41

Arno Mittelbach
datenwerke
Registered: 2012-02-14

Re: email settings

Hey Alex,

the exception you see is that ReportServer is trying to load a key store to send in order to sign the email and potentially encrypt it. This can be safely ignored unless, of course, you do want to use S/MIME.

About the configuration issue. We have now introduced an automatic mechanism that installs the most important configuration files on first startup. This will come with the next (minor bugfix) version which should be out this or next week.

As for the main question. The date parameter currently does not offer a different date format. I've created a ticket for this. The format displayed by the date picker, however, is not the format in which the result gets passed on to the query. That is, the result is passed on as a date object and the jdbc driver ensures that the transformation is done correctly when it is used in conjunction with a column of type date. For example, in the following query I have a column of type TIMESTAMP (in mysql).

SELECT * FROM T_AGG_ORDER WHERE 
				OR_ORDERDATE > ${P_DATE_FROM} AND OR_ORDERDATE < ${P_DATE_TO} 

Here I can simply use the parameter as is, and the jdbc driver will ensure that the date object passed on by ReportServer is correctly transformed. In case I have the date stored as character date, let's say, in format dd/MM/yyyy, the easiest is to use

SELECT * FROM TABLE WHERE
                MYDATE = ${_P_DATE_FROM.format('dd/MM/yyyy')}
               
Note the underscore before the the parameter's key. Regrettably, I've just found a minor bug concerning this feature, that is, this will in the current version only work if the date parameter was changed from its default setting. The bug is already fixed in the SVN and the fix will be part of the upcoming release. To work around this you might do something like

SELECT * FROM TABLE WHERE 
				MYDATE = ${null == _P_DATE_FROM.value ? '26/11/2010' : _P_DATE_FROM.format('dd/MM/yyyy')}

I've also added a ticket to allow to specify the output format of date parameters directly, when configuring the date parameter.

Cheers
Arno

Offline

#6 2013-05-06 12:25:21

afteixeira
Member
Registered: 2013-05-03

Re: email settings

Hello Arno!

Thanks again!! Works like a charm

One more question (last I hope)... Is there a template file for e-mails? Everything but the text I input is sent in German. If I can rewrite a template file it would be nice.

i.e.:
Guten Tag, eine Einplanung wurde ausgeführt. Bericht: All Nachricht: MY TEXT GOES HERE

PS: I've already changed the propertie file which sets language

Cheers

Alex

Last edited by afteixeira (2013-05-06 12:27:42)

Offline

#7 2013-05-06 14:21:40

Thorsten J. Krause
datenwerke
Registered: 2012-02-15
Website

Re: email settings

Hi Alex,

have a look at the file scheduler.cf in the /etc/scheduler directory in ReportServers internal filesystem.
This xml-file contains the templates used for sending messages.

Cheers,
Thorsten

Offline

Board footer

Powered by FluxBB