Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create pdf document using JRDataSource using jasper report.Actually i m having one bean object that object has List of another bean object and one string value,The inner bean object has two String variables .Now i don't know how to map these all three variable in the jrxml document to populate the values in pdf document .
Can anyone help me how to solve this problem.If u can provide me some code snippet.
Code snippet to create a JasperPrint object from a collection datasource.
JasperPrint jp = new JasperPrint();
String reportPath = "/HD/jasper/mypath/myfile.jasper";
Map paramsMap = new HashMap(); //put whatever parameters you want to pass to report
//JR data source, populate with your collection
JRDataSource reportSource = new JRBeanCollectionDataSource( reportCollection );
jp = JasperFillManager.fillReport( reportPath, paramsMap, reportSource);
//Here you can use the PDF generator to make a PDF file out of the jp object. Then forward it to client
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
function DoneButtonPushed(app, event)
assignin('base','roll_no_GUI1',app.StudentInfoDropDown.Value);
assignin('base','projname_GUI1',app.ProjectInfoDropDown.Value);
assignin('base','roll_no_GUI2',app.StudentInfoDropDown_2.Value);
assignin('base','projname_GUI2',app.ProjectInfoDropDown_2.Value);
assignin('base','roll_no_GUI3',app.StudentInfoDropDown_3.Value);
assignin('base','projname_GUI3',app.ProjectInfoDropDown_3.Value);
assignin('base','roll_no_GUI4',app.StudentInfoDropDown_4.Value);
assignin('base','projname_GUI4',app.ProjectInfoDropDown_4.Value);
assignin('base','roll_no_GUI5',app.StudentInfoDropDown_5.Value);
assignin('base','projname_GUI5',app.ProjectInfoDropDown_5.Value);
closereq
end
Hi, I am creating a GUI which contains DropDowns. They are 10 dropdowns as you can see from the code. And I am using assignin to save each one of them into base workspace. But I would like to club all of them into a 2 char array's or 2 cell array's and send only two variables into the base workspace viz, Roll_nos and Projnames_GUI
Create two cell arrays and assign them in the base workspace:
roll_nos = {
app.StudentInfoDropDown.Value,
app.StudentInfoDropDown_2.Value,
app.StudentInfoDropDown_3.Value,
app.StudentInfoDropDown_4.Value,
app.StudentInfoDropDown_5.Value
};
projnames_gui = {
app.ProjectInfoDropDown.Value,
app.ProjectInfoDropDown_2.Value,
app.ProjectInfoDropDown_3.Value,
app.ProjectInfoDropDown_4.Value,
app.ProjectInfoDropDown_5.Value
};
assignin('base','Roll_nos',roll_nos)
assignin('base','Projnames_GUI',projnames_gui)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I Have data frame records like below format in HDFS Location and they don't have column names
The below output I have written by using StringBuilder with tab separated.
[yahoo.com 899 3 24 0.003 0.026
apple.com 117 5 101 4.245 0.086
testdomain.com 6 6 6 1.0 1.0
]
The above details describe as columns like MAIL_ID, TESENT, TEBOUN, TEVET, B_RATIO, C_RATIO
I have to iterate through each row and call external API by using below JSON Format
val subJson = new JSONObject();
subJson.put("TS", System.currentTimeMillis());
subJson.put("TESENT","899")
subJson.put("TEBOUN","3")
subJson.put("TEVET","24")
subJson.put("B_RATIO","0.003")
subJson.put("C_RATIO","0.026")
By using subJson I have to invoke external API.
Apreciate your quick help.
You said you have tab delimited file in hdfs and you want to
iterate through each row and call external API by using below JSON Format
Following architecture should work for you
val devVerRdd = sc.textFile(file path in hdfs)
devVerRdd.map(x => {
val splitted = x.split("\t")
val subJson = new JSONObject();
subJson.put("TS", System.currentTimeMillis());
subJson.put("TESENT",splitted(1))
subJson.put("TEBOUN",splitted(2))
subJson.put("TEVET",splitted(3))
subJson.put("B_RATIO",splitted(4))
subJson.put("C_RATIO",splitted(5))
//nvoke external API here
})
and don't forget to trigger action at the end of transformations
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
var nsarray:[NSMutableDictionary] = [["object":["uid":["age":"26","gender":"male"]]]]
print(nsarray[0]["object"])
That is how it looks. I want to get the value "uid", so when it prints it is just "uid". Currently it is printing:
"uid":["age":"26","gender":"male"]
I want to get the "uid" value. Meaning when it prints it is just "uid". "uid" is a placeholder for a unique ID so I won't know what the uid is.
It looks like "object" key contains another dictionary, which has exactly one element. To get the first key, call allKeys to get keys, convert them to Array, and pick the the initial element:
let d = nsarray[0]["object"] as! NSDictionary
print(Array(d.allKeys)[0])
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am developing in ABAP.
I have a requirement to trigger a custom event in an ABAP Z-program.
Can anyone pls tell me how can I call a custom event in a Z-program to send an email.
(please note: It is not workflow, I need to complete this task in the Z-program).
Your description is a little vague, so in general if you talk about a button to press and a following action that is to be triggered you may need to:
define a button for the Application Toolbar in GUI-Status with a custom function code that is used when the button is clicked
add a gloabl general attribute with "type of screen element" = OK to the dynpro screen's element list
check this global attribute in the PAI module for the custom function code value and then perform/call your sendEmail function
You should create your custom event within transaction SM62. At your program, you call the function module BP_EVENT_RAISE, to raise your custom event. "eventid" is the name of the event you created previously at SM62.
Use the following code example to send an email in ABAP z-program code, via calling function module SO_NEW_DOCUMENT_SEND_API1 (SAPoffice: Send new document):
* Data Declarations
DATA: LT_MAILSUBJECT TYPE SODOCCHGI1.
DATA: LT_MAILRECIPIENTS TYPE STANDARD TABLE OF SOMLREC90 WITH HEADER LINE.
DATA: LT_MAILTXT TYPE STANDARD TABLE OF SOLI WITH HEADER LINE.
* Recipients
LT_MAILRECIPIENTS-REC_TYPE = 'U'.
LT_MAILRECIPIENTS-RECEIVER = 'sheetal#gmail.com'.
APPEND LT_MAILRECIPIENTS .
CLEAR LT_MAILRECIPIENTS .
* Subject.
LT_MAILSUBJECT-OBJ_NAME = 'TEST'.
LT_MAILSUBJECT-OBJ_LANGU = SY-LANGU.
LT_MAILSUBJECT-OBJ_DESCR = 'Mail Subject'.
* Mail Contents
LT_MAILTXT = 'This is a test mail'.
APPEND LT_MAILTXT. CLEAR LT_MAILTXT.
* Send Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
DOCUMENT_DATA = LT_MAILSUBJECT
TABLES
OBJECT_CONTENT = LT_MAILTXT
RECEIVERS = LT_MAILRECIPIENTS
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC EQ 0.
COMMIT WORK.
* Push mail out from SAP outbox
SUBMIT RSCONN01 WITH MODE = 'INT' AND RETURN.
ENDIF.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm trying to set the PHOTO vCard attribute with an URI provided by our backend, according to the xep-0054,
<!-- Photograph property. Value is either a BASE64 encoded
binary value or a URI to the external content. -->
<!ELEMENT PHOTO ((TYPE, BINVAL) | EXTVAL)>
I'm using ejabberdctl with the mod_admin_extra extension.
ejabberdctl set_vcard foo chat.myjabber.com PHOTO http://link_to_image.jpg
ejabberdctl set_vcard2 foo chat.myjabber.com PHOTO EXTVAL http://link_to_image.jpg
But doesn't seems to work, I see nothing in pidgin & psy (value is correctly saved in database)
I'm running Archlinux, Pidgin 2.10.6 (libpurple 2.10.6) & ejabberd 2.1.11
I asked on https://github.com/processone/ejabberd/issues/47 and most of popular client doesn't support EXTVAL
xep-0054 is in contradiction of the xep-0153 that say
4.5 XML Syntax
The following rules apply to the XML syntax:
The <PHOTO/> element SHOULD contain a <BINVAL/> child whose XML character data is Base64-encoded data for the avatar image.
The <PHOTO/> element SHOULD NOT contain an <EXTVAL/> that points to a URI for the image file.
The <PHOTO/> element MUST NOT contain the avatar image itself.
The <PHOTO/> element SHOULD contain a <TYPE/> child whose XML character data specifies the content-type of the image data. The XML character data SHOULD be "image/gif", "image/jpeg", or "image/png".
The <PHOTO/> element MUST NOT possess a 'mime-type' attribute.