Creating a pay slip in PDF format using progress 4gl and email to employee - progress-4gl

I have a requirement to create a pdf file that includes the salary slip details like (DA,HRA,Basic,Leave taken.... etc) by taking a leave taken as an input value from update able browser and generate a report in form of pdf that will be send to employee as well as bank to get credit the amount to thier respective salary account.

If you're trying to create a PDF document from within Progress, you can use PDFinclude (a Free Libre Open Source Software piece of code) to do so. See http://www.oehive.org/pdfinclude to get started.

Related

Is there a way to create an output form based on Google Sheets data?

What I want to make
Is this possible?
I'd like to create an output form that reads data from a Google Sheets spreadsheet. In the form, users would enter a few values (entering their name and some ID number, for example) and view the corresponding information in the connected spreadsheet but not any other information in the sheet. Something like an output form in Microsoft Access. I'm hoping there's a way to accomplish this in Google Sheets using existing tools and maybe some scripting.
More generally, though, any way to create this type of 'limited visibility' on a per-user basis for Google Sheets data would be useful. (The 'protect sheet' function in the menu doesn't accomplish this; see below.)
For reference, my specific use case at the moment is as a teacher and wanting a way for students to see specific information related to them from my student information spreadsheet but while not revealing other students' information. I would have a simple form where they enter a name and maybe some personalized code that I give them so they can see their attendance record or something else. For my purposes, I don't need the form to be extremely secure as none of the information is all that sensitive (although more secure is better), but I don't want to be just putting all the information there in front of them by giving them access to the entire sheet.
What I've tried so far
I made a new spreadsheet file with two sheets; one sheet was visible to function as a form, and the second sheet was not visible (which I accomplished via the 'protect' menu option). I used importrange() to read in the relevant data from my primary spreadsheet to the new spreadsheet's non-visible sheet. On the visible sheet, students entered their name from a drop-down and entered their student ID as validation. If the student's name and ID matched, the first sheet did a vlookup() to read in information from the protected sheet and some information from their student record.
Here's what I made, in case my description doesn't make sense: https://drive.google.com/open?id=1cHO2jzMh1mkXvlLh-M4eYqN7v11t95-GnfWqL5IwQ14&authuser=0
This had two problems, one small and one big.
The small problem was that every student could see the "form" sheet at the same time. If two students opened the spreadsheet at the same time they would see any information that the other student had entered. I handled this by writing a simple script to automatically reset the "form's" input cells after 20 seconds. Also, any time the form was opened by a new person, the "form's" output cells were erased. So, obviously not a brilliant solution, but for my purposes, this was mostly good enough.
The big problem was that Google's own preview viewer (built into Google Drive and the like) ignores protected ranges and sheets and displays the entire contents a spreadsheet. (Normally, protected sheets are not visible at all and don't appear in the list of sheets at the bottom of the screen unless the viewer has access to them.)
In my case this meant included the protected one that shouldn't have been visible at all, rendered as if it were a print preview, meaning the students were actually able to view all of the other students' data in one big table.
Are you familiar with Web Apps?
An Apps Script Web App allows you among others to output selected Google Document contents into a browser.
Hereby, you can use the method Session.getActiveUser() to obtain the email of the user and dynamically adjust the data the user is going to obtain in function of his email (BTW, you can also use Session.getActiveUser() in the spreadsheet, to detect the user automatically instead of asking him for his name).
Simple example workflow:
Replace in column A student names through student emails (the Gmail addresses with which the users authenticate their sessions and access Google Sheets)
Bind to the spreadsheet a script with a content similar to the following:
function doGet(){
var ss=SpreadsheetApp.getActive().getSheetByName('Data');
var range=ss.getDataRange();
var values=range.getValues();
var user=Session.getActiveUser();
var output="";
for(var i=1;i<ss.getLastRow();i++){
if(values[i][0]==user){
for(var j=1;j<ss.getLastColumn();j++){
output+=(values[i][j])+" ";
}
}
}
return ContentService.createTextOutput(JSON.stringify(output));
}
Make sure that you have a doGet() function and a return statement.
After running the script once manually to trigger authorization flow, deploy it as a Web App - executing it as User accessing the web app and giving access to Anyone (unless desired otherwise).
Copy the URL of your WebApp and forward it to your student.
When the student open the URL in their browser - they will obtain their results - provided their email is listed in the sheet.
Please note that the code provided is a simple sample, that retrieves
all data and outputs it as a string. Feel free to modify the script
e.g. retrieving only columns of interest and outputting the data as a
html table, rather than a simple string.

Where can I find the template of the email that is sent with the Invoice to a customer?

The customer in Netsuite gets an email with the generated invoice attached as a pdf. The requirement is to change the body of the email. I am unable to locate the template that has this info to modify. Please advise.
The current body of the email is:
"Please open the attached file to view your Invoice.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it."
`Customize-->Transaction Forms-->Whichever invoice form you're using`.
Under this form you should be able to choose which email template to send.
To find this email template,
Customize-->Transaction form PDF/HTML layouts
Under this menu you should be able to select and customize the email template however you want. Make sure the template you edit corresponds to the template that is showing on the form.
You may need to or have the desire to enable advanced/PDF/HTML templates, which allows you to edit and customize forms in a much more robust fasion using HTML/XML/CSS, Freemarker, and BFO. (See suiteanswers: 48703)
I know the original post is several years old, but I too found myself searching for answers recently in stackoverflow so I thought I would post the answer to this questioon.
Use the global search bar to type in Email Template. You can customize from there. I've attached a screenshot that replaces the generic message
"Please open the attached file to view your Invoice.
To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it."
It has been awhile since I found and got this email template to work, so it is possible there may be another section where you have to set the preference to use this customized email template.

Apply Customer Tags to Order Detail Tags

I have a shopify page where I need to track who makes a sale. I would like to set it up where a sales rep puts their name as a customer info tag; then whenever that customer places an order online that tag is moved automatically to the order details tag. How can this be done?
This is not posible "out of the way" right now, unless there's an app which does that (I don't know any doing this magic).
A workaround could be:
If you have customer accounts enabled on your Shopify store: click on Settings, then Checkout and radiobuton click either Accounts are required or Accounts are optional.
Now, you should be able to tag your "selected" customers with "sales_rep" tag. Then, you go to your customers tab and filter the customers tagged with "sales_rep" and export a list of them.
Once Shopify dashboard shows you this list, you export it to a csv file.
Once you have this file, you have a list of emails of your "sales_rep". Then you go to your orders tab and either export all orders or orders from a selected date to a csv file.
You make one Excel or Open Office Calc out of those 2 csv files. Each file should be one tab of the resulting file. Now you need to write a tiny Open Office Calc or Excel formula in order to only find the orders which where placed by the "sales_rep". Do the filtering using the email field.

Fill document from a google spreadsheet

I have a web form that populates a Google spreadsheet.
My question is can I populate a document with some or all of the information from a given row ?
Example: I created a webpage for a small business that they can input all the details from a sale. That populates a google spreadsheet. Now I need to create a nice looking receipt (document) that includes the information from some of the fields in a particular row of that google spreadsheet to print out and give to the costumer for them to sign
I coded a simple java script library todo the same thing after hours of search. (Wish I started it right away) Gsheet2json
Upto now it can get data from the spreadsheet as objects array or arrays of array and you can use any template you want to publish it(of cause using your own java script + html).

Disable moving to Outlook in SSRS?

I have a SQL Server Reporting Services report where one of the columns has user ids in email address format. When I export this report to PDF format and click on the user id it moves to Outlook.
I have read about disabling hyperlinks and used both:
(=IIFGlobals!RenderFormat.Name, "www.google.com",Nothing)
=IIf(Globals!RenderFormat.IsInteractive, "http://10.210.251.132/Reports/Pages/Folder.aspx", Nothing)
But neither is working. Is there any other way to do it?
If I understand your situation correctly, you have a report that displays some email addresses and when the report is rendered as a PDF document the email addresses appear as clickable links. When a user clicks one of the email address in the PDF document, the link launches Microsoft Outlook (to create a new email message).
Unfortunately I think this is a feature of PDF documents, or at least the PDFs generated by Reporting Services. The email address seems to be automatically identified as such and a link created in the document - I can't see any way to control this from within the report code.
The only thing I can suggest is to insert a space into the address to stop the PDF renderer identifying it and creating a link, e.g.
my.email#address.com > my.email # address.com