Good example using XML Publisher with a rowset - peoplesoft

Does anyone know of a good example of an Application Engine program creating a rowset and then calling XML Publisher to create a report?
PeopleTools 8.49
Thanks in advance.

Providing you've got your report defn, data source and template setup, here's the peoplecode to do it:
/* get report definition object */
&oRptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn (&yourRptDefn);
&oRptDefn.Get();
/* pass Rowset to the report definition */
&oRptDefn.SetRuntimeDataRowset(&yourRowset);
/*generate report*/
&oRptDefn.ProcessReport (&yourTmpltID, &yourLangCd, &yourAsOfDate, &yourOutFormat);
/*publish report */
&oRptDefn.PrintOutput(&yourDestinationPath);

Related

Oracle eText rtf template and Extended Function

I am working on Oracle 11g NACHA eText rtf template and i am facing problems while creating this template as per Bank needs. I need help while using substring extended function in column Originating DFI Identification.
My function is like this: substr(BankAccountNumber,1,8)
But when, I test the template using template viewer i got following erorr:
[112616_130010213][][PROCEDURE] Log Level is changed to PROCEDURE
[112616_130011163][][ERROR] expression: is invalid
Time: 4.706 sec.
FO Formatting failed.
End of Process.
Anyone here can help me with this please ?
The syntax looks correct, try making it uppercase. Check to see if that tag contains any data, and that the datatype is Alpha in the etext template.

Moving Symfony Application Local Database to Web

I developed a application on my local system (Windows 7 & wamp)its working fine so I decided to deploy it to my shared hosting account
I create a blank database on server and then imported my local database file
but if try to login to my system I am getting table not found error although table are present in database
I am getting error like below
SQLSTATE[42S02]: Base table or view not found: 1146 Table
'ezwebsto_ezwoms.WomsLog' doesn't exist") in
"AdminBundle:Default:home.html.twig
I suspect that the issue is because case sensitive table name, so renamed table name but still I am facing issue
can anyone guide me what is proper way to move local db of symfony application to web to p
MySQL on Windows by default is NOT case sensitive. On Unix based system it is.
The best practice is to turn on case sensitive in MySQL settings, and in future moving database to server will be simple.
You have to set up variable
lower_case_table_names = 0
in your my.ini file. On Windows, default value is 1.
But now, you have to map table name inside each entity, like wrote #prashant. Please compare table names with mapping names, and rename tables if necessary.
After change, your entity should look like:
/**
* Content
*
* #ORM\Table(name="content")
* #ORM\Entity()
*/
class Content
{
//some usefull code here
}
Just try to define the tablename in your entity class, with the Table annotation:
#ORM\Table(name="WomsLog")
As well make sure your table is correct in DB , W and L must be in upper case.

Writing axapta report for open sales line with available physical report

I am a newbie to the ax report developing. Actually i am a networking guy but put into a position i have to write reports. here is my delima, i have an open order sales line report that is open and need to see if we have available inventory, which is configuration specific and need to display values only in m001 warehouse.
through search i found a post here by Vince Perta (Finding the Total Available and Available physical for an Item/Warehouse), which gave the following code. seems to work but want to be able to build a report from it.
static void FindOpenSalesLineAvailPhys(Args _args)
{
SalesLine salesline;
InventDim inventDim;
InventDimParm inventDimParm;
InventOnHand inventOnHand;
;
while select salesLine where salesLine.SalesStatus == SalesStatus::Backorder
{
inventDim = salesLine.inventDim();
inventDimParm.initFromInventDim(inventDim);
inventDimParm.WMSLocationIdFlag = NoYes::No;
inventOnHand = InventOnHand::newItemDim(salesLine.ItemId, inventDim, inventDimParm);
if (inventOnHand.availPhysical())
{
info(strfmt("Sales Order %1 Line %2 Item Id %3 Available Physical (ignoring Location) %4",
salesLine.salesId, salesLine.LineNum, salesLine.ItemId, inventOnHand.availPhysical()));
}
}
}
Can anyone help please?
Building a report is quite a generic task for an AX developer. It's like "how to create a form on c#". You need to be more specific after going to some generic development documentation where you can find the basics of creating reports.
Will be usefull that you specify your version, as reporting has changed a lot on AX 2012.
EDIT
HOWTO: Get inventory values from X++
Where are you trying to build your report ? Is that in Ax2009 or Ax2012.
If it is in Ax2009 you could just add this a display method and drag it to the report
If it is ax2012 i think you can use an RDP class to do this and that is pretty simple

c# asp.net report and sub report in report viewer (or reportviewer)

I did all the steps from this waltrought:
http://blogs.msdn.com/b/sqlforum/archive/2011/01/03/walkthrough-add-a-subreport-in-local-report-in-reportviewer.aspx
and when i run it i get the first father report and instead the sub
report i get:
Data retrieval failed for the subreport, 'Subreport5',
located at: C:...
i attach a print screen file
i am using VS2010 framework 3.5.
Can you run the subreport by itself, given the right parameters? If you can't, your problem is that.
If you can run it successfully by itself, double-check that you are passing the parameters correctly to your subreport. Make sure the parameter types match and that you are passing all of them.
Another problem might be that -- if I recall correctly -- when you have a subreport in a local report, you need to provide the data for the subreport programmatically, just as you do with the parent report. There's an event that's raised - SubreportProcessingEvent -- when the subreport is being processed. You write a handler for that event and supply data in the handler. Here's some more information about it: LocalReport.SubReportProcessingEvent. There's a good example on that page.

Alternative to Excel as ASP.Net Report Generator

I use excel through vb.net/asp.net to generate reports from a web page and then send the file down to the user. We've had some issues with Excel being super slow/inefficient/not closing (even when we keep track of the process id and try to kill it in code...). So I'm looking for some flexible alternatives. We need a replacement that can:
Allow for inidivdual cell formatting including borders (different settings on each side), background colors, font styles/coloring, etc...
Allow for cell merging
Allow for formatting (bolding in this case) of a portion of the text inside of a cell while leaving the rest of the text unchanged
Image insertion/repositioning inside a cell (not crucial)
Multiple Worksheets per Workbook
These are all the features I can think of off hand, any help or suggestiong at alternative libraries to look at would be appreciated. We are running Excel 2007 on the server but we are rolling out Office 2010 to clients so I think that might open the doors for some more supported file formats, if that helps.
After looking through the various options and performing more independent research I ended up using EPPlus, which you can get # http://epplus.codeplex.com.
Thanks for all the suggestions.
I recommend you to use the DevExpress.XtraReports from DevExpress. It is a Licensed product, but offers you a friendly toolkit for generating great and complexity reports. It is well documented and easy to use, once you define a template (REPX) you can populate it with data by assigning to each element a value as well as using [mail merge] feature which will be automatically replaced once you bind with data the report. In the core of such technology is a well OO design of classes. Once you generate the report you can export it to the most common formats: XLS, HTML, PDF, RTF...
public void GenerateReportFile(string rptFileName, string param1, int param2)
{
XtraReport report = null;
try
{
report = new XtraReport();
//-- loads the layout template (repx file)
report.LoadLayout("SomeDirectory\report_template.repx");
//-- assign data to report controls
report.FindControl("Label1", true).Text = string.Format("{0:dd/MM/yyyy}", fecha1);
report.FindControl("Label2", true).Text = string.Format("{0:dd/MM/yyyy}", fecha1);
//-- gets data from some Data Acces Layer method and assig it to the report DataSource property
DALReport dal = new DALReport();
report.DataSource = dal.GetReport1Data(ExpEmp, param1, param2);
report.DataMember = "data";
report.ExportToPdf(rptFileName, options);
}
catch { throw; }
finally { if (report != null) { report.Dispose(); } report = null; }
}
For more information refers to: http://demos.devexpress.com/XtraReportsDemos/
There is another free library for .Net iTextSharp, this library
was originally written for Java, then was translated to C# for .Net
usage. The library is mainly for PDF documents creation but some
versions also supports XLS documents creation.
GNU plot is a little bit of a pain to get to run on windows but it is a an awesome tool
It sounds like you are using a library that opens Excel and uses MS Office Excel objects to create the Excel file. Since you are using 2007 and above, you may want to consider creating the Excel file manually using a library that creates the XML (therefore, Excel doesn't open at all).
Check out ExcelLibrary.
While doing a search on this, I found this page (on StackOverflow) that provides some sample code.
Office Web Components (though dated) is free and has worked for me in the past.
If you want to spend the loot, Aspose Cells is a good way to go also.

Resources