Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a fewquestions and I appreciate if you guys can help:
1. Whatis the difference between QlikView Management Console(QMC)and QlikView EnterpriseManagement Console(QEMC)? What is the difference if I setup/schedule a documentusing QMC vs. QEMC?
2. I have an app and I need to email one chart from this app to a specific group ofusers. Do I need to create a separate document with just this chart or can I use the main app and somehow send email only with that one chart?
Please let meknow thanks in advance for your help!
Hi,
1. There are many threads already in this forum on the first topic - here are links to some of them:
http://community.qlik.com/message/198314#198314
http://community.qlik.com/message/131571#131571
http://community.qlik.com/message/12326#12326
http://community.qlik.com/message/164925#164925
If you schedule an update in one it will show in the other. No need to set it up again. In v11 there is only the QEMC.
2. You will need to use a macro for this and again there are many examples in the forum. When you search bear in mind if you need to loop through a field value or not (i.e. does every recipient need their own version of the email or will everyone get the same chart values?)
Hope this helps,
Jason
Thanks, every recipient will need thier own version of the chart. Do you mean there is no out-of-the-box way to do this? Please let me know.
I don't believe so. In the past I have successfully built a macro to cycle through a listbox of email addresses and email the resulting data out - mainly using previous posts from this forum! Here's the code - hopefully you can adapt for your own needs.
function sendMailTest()
Dim objEmail
Const cdoSendUsingPort = 2 ' Send the message using SMTP
Const cdoAnonymous = 0 'Do not authenticate
Const cdoBasic = 1 'basic (clear-text) authentication
Const cdoNTLM = 2 'NTLM
SMTPServer = getVariable("SMTPServer")
Const SMTPPort = 25 ' Port number for SMTP
Const SMTPTimeout = 60 ' Timeout for SMTP in seconds
'Sending mail
Set objEmail = CreateObject("CDO.Message")
Set objConf = objEmail.Configuration
Set objFlds = objConf.Fields
With objFlds
'---------------------------------------------------------------------
' SMTP server details
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTPServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoAnonymous
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTPPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = SMTPTimeout
.Update
'---------------------------------------------------------------------
End With
set obj = ActiveDocument.GetSheetObject("CH01")
vFilename = "C:\MobilePhoneBill_" & getVariable("TempPeriod") & ".xls"
obj.ExportBiff vFilename
objEmail.To = getVariable("EmailTo") 'Email Recipient
objEmail.CC = getVariable("EmailCC") 'Email Recipient (CC)
objEmail.From = getVariable("EmailFrom") 'getVariable("EmailFrom") 'Email Sender
objEmail.Subject = getVariable("EmailSubject") ' Subject
objEmail.TextBody = getVariable("EmailBody") 'Text Body
objEmail.AddAttachment vFilename ' Attachement
objEmail.Send
Set objFlds = Nothing
Set objConf = Nothing
Set objEmail = Nothing
'msgbox ("Test Mail Sent")
end function
'---------------------------------------------------------------------
function getVariable(varName)
set v = ActiveDocument.Variables(varName)
getVariable = v.GetContent.String
end function
'---------------------------------------------------------------------
sub SendBills
SET Period = ActiveDocument.Fields("Period")
SET EmailRun = ActiveDocument.Fields("EmailRun")
SET RunSize = ActiveDocument.Fields("RunSize")
IF MsgBox("Are you sure you want to send the emails?",1,"Confirmation") = 2 THEN exit sub
IF Period.GetSelectedValues.Count <> 1 THEN
IF MsgBox("You have multiple periods selected!" & Chr(13) & "Are you SURE you want to send the emails?!" &_
Chr(13) & Chr(13) & "(The attachments will have the spend for all periods added together!)",4,"Multiple Periods") = 7 THEN exit sub
END IF
IF MsgBox("Period is: " & Period.GetSelectedValues.item(0).text & " - OK?",4,"Confirm Period") = 7 THEN exit sub
IF EmailRun.GetSelectedValues.item(0).text = "Own bills" THEN SET R = ActiveDocument.Fields("ResID") ELSE SET R = ActiveDocument.Fields("ResID_LM")
IF RunSize.GetSelectedValues.item(0).text = "FULL" THEN SET C=R.GetPossibleValues("10000")
IF RunSize.GetSelectedValues.item(0).text = "5" THEN SET C=R.GetPossibleValues("5")
IF RunSize.GetSelectedValues.item(0).text = "10" THEN SET C=R.GetPossibleValues("10")
'loop
for i=0 to C.Count-1
ActiveDocument.Variables("Counter").SetContent i+1, true
R.Select C.item(i).text
sendMailTest()
R.Clear
next
end sub
'---------------------------------------------------------------------
sub ReloadDocument
IF MsgBox("Reload all data?",1,"Confirmation") = 2 THEN exit sub
IF MsgBox("Reload may take up to a minute - please be patient.",0,"Loading...") <> 1 THEN Exit Sub
ActiveDocument.DoReload 2,false,false
'1st parameter is:INTEGER- Error handling mode
'0 = Default
'1 = Attempt recovery on all errors
'2 = Fail on all errors
'
'2nd parameter is:BOOLEAN - True for partial reload
'
'3rd parameter is:BOOLEAN - True if debug breakpoints to be honored
end sub
Then I used a button to execute the macro.
Hope this helps,
Jason
Thanks for the reply and sorry about the delay in responding.
Can you please confirm that QlikView doesn't have an option to do this without writing macros? The issue is that we are not allowed to write macros.
Please advise.
If you want to distribute reports without using macros you would need a publisher license with PDF Distribution enabled (licensed separately).
Yes we have publisher, any document that would proive instrauctions on how to do this? Please let me know.
You need to enable a component that is licensed separately called PDF Report Distribution. Talk to your partner/sales contact for more detailed information.
You can use loop and distribute,Creates a separate document for each value in the selected field. All data not included in the selection will be removed and then you use Loop and distribute.
This can be done on a field or a bookmark. And each group will get their seperate app.
Then you dont need the PDF tag.
Earlier i also had same issue that i have to export specific object from app and send that in the form of email without wirting macro because we are using AJAX mode. In Qlikview sending emails in the form of PDF is there but that is an additional cost which you have to purchase from Qliktech. So when i searched in the community they suggested me of the Nprinting tool which is a third party tool which automates the process of sending emails. We are using that tool in our company. Check with Qliktech guys they will help you with that.