Trying to Retrieve Object as a String using FetchSpec
Trying to Retrieve Object as a String using FetchSpec
- Subject: Trying to Retrieve Object as a String using FetchSpec
- From: Janice Cheung <email@hidden>
- Date: Thu, 23 Sep 2004 18:34:59 -0400
Greetings!
I'm attempting to create a Report Mill report on the fly for
Certificates.
Basically it calls the primary key of the Certificate and summons the
relevant information
(by Direct Action).
I have the reports being generated in one step (through a form submit
calling a generatePDF function)
but I am coming across some obstacles in my implementation for
re-naming the reports by Certificate Name.
Here is my code thus far:
public WOComponent generateCertificatePDF(){
Integer pk = new Integer(aKey);
NSArray foundCert =
fetchSearch("getCertificationPk", "Certification", "cPk",
this.session().defaultEditingContext());
RMDocument template = new RMWODocument("REPORTMILLTEMPLATE");
RMDocument report = template.generateReport(foundCert);
RMWOPage nextPage = (RMWOPage)pageWithName("RMPDFPage");
nextPage.document=report;
String newFilename=reportName.replaceAll("{^a-zA-Z]","")+".pdf";
return nextPage;
}
Is there a way to obtain the information retrieved from NSArray
foundCert (more specifically, the String
Certificate.certificateName) and set it as the
reportName for the PDF file? I'm tearing my hair out since
it has to be acomplished in one step so I cannot setReportName
anywhere else aside from within this function.
I'm currently using a BasePdfPage for reportName
..
Any advice or help would be greatly appreciated!
Best Regards,
janice
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden