Can anybody please guide how to create report in Lansa. The requirement is upon clicking the push button on the form the report should appear on the screen and the user should be able to print the report.
Regards,
Pratibha
Creating report in lansa 14.2
Re: Creating report in lansa 14.2
I think we are probably going to need some more information as to your environment.
Are you using VLWEB or VLWIN or the 5250 screens?
I use the PDFDocumentService https://docs.lansa.com/14/en/lansa093/i ... 7_0170.htm with Integrator to handle pretty much all of our reporting. We typically email these to the user, however you could store these on the server and access them through the web.
VLF-ONE has a demo DF_T69H1O that shows a way to handle printing in VLWEB.
Joe
Are you using VLWEB or VLWIN or the 5250 screens?
I use the PDFDocumentService https://docs.lansa.com/14/en/lansa093/i ... 7_0170.htm with Integrator to handle pretty much all of our reporting. We typically email these to the user, however you could store these on the server and access them through the web.
VLF-ONE has a demo DF_T69H1O that shows a way to handle printing in VLWEB.
Joe
Last edited by jyoung on Fri Dec 07, 2018 2:46 am, edited 1 time in total.
Re: Creating report in lansa 14.2
Hi Pratibha,
Further to Joe's reply, in case this is what you are after, the PrintExample.zip attached is a quick export with a couple of examples part of the VLF demo that will work in a normal page. It will import these components:
PrintPage - web page
PrintInterface - reusable part to communicate with the widget
PrintWidget - widget
PrintResource - external resource used by the widget pointing to the file included in xWebSamplesPrint.zip
xWebSamplesPrint.zip contains a JavaScript file you must extract to your partition web vl folder.
For example: <lansa root>\X_WIN95\X_LANSA\x_<partition>\web\vl\
PrintPictures.zip is what you should expect when you click on Preview/Print. A page showing you examples of the things you do in the widget and another with some sample barcodes.
Further to Joe's reply, in case this is what you are after, the PrintExample.zip attached is a quick export with a couple of examples part of the VLF demo that will work in a normal page. It will import these components:
PrintPage - web page
PrintInterface - reusable part to communicate with the widget
PrintWidget - widget
PrintResource - external resource used by the widget pointing to the file included in xWebSamplesPrint.zip
xWebSamplesPrint.zip contains a JavaScript file you must extract to your partition web vl folder.
For example: <lansa root>\X_WIN95\X_LANSA\x_<partition>\web\vl\
PrintPictures.zip is what you should expect when you click on Preview/Print. A page showing you examples of the things you do in the widget and another with some sample barcodes.
- Attachments
-
- PrintPictures.zip
- (71.19 KiB) Downloaded 3763 times
-
- PrintExample.zip
- (42.94 KiB) Downloaded 3685 times
-
- xWebSamplesPrint.zip
- (13.81 KiB) Downloaded 3479 times
Re: Creating report in lansa 14.2
Pablo,
I am trying to implement your web print samples in a VL web application (V15).
I have extracted your provided resources, compiled, and checked in.
When I try to run it, I get the error:
Fatal Error:
Cannot set properties of undefined (setting 'ReportPages')
Looking in the PrintWidget, I see the reference but am unclear as to the issue, as I really no know js at this point.
Any help is greatly appreciated.
// uClearPages - Clears any added pages.
//
PROTOTYPE.uClearPages = function()
{
// Implementation...
this.Report.ReportPages = [];
}
I am trying to implement your web print samples in a VL web application (V15).
I have extracted your provided resources, compiled, and checked in.
When I try to run it, I get the error:
Fatal Error:
Cannot set properties of undefined (setting 'ReportPages')
Looking in the PrintWidget, I see the reference but am unclear as to the issue, as I really no know js at this point.
Any help is greatly appreciated.
// uClearPages - Clears any added pages.
//
PROTOTYPE.uClearPages = function()
{
// Implementation...
this.Report.ReportPages = [];
}
Arlyn Dale
Servias LLC
Servias LLC
Re: Creating report in lansa 14.2
My bad. In my VL dialog I missed the EVTRoutine handling uPrintWidgetInitialized. It is now working and the fun begins on print output design and data work. Thanks.
Arlyn Dale
Servias LLC
Servias LLC
Re: Creating report in lansa 14.2
Has anyone else worked with this report creation / printing method (in VLF or Web)?
I have just starting working with this, but the generated report seems "fuzzy", the characters on screen and print are not quite a sharp as would be expected? Is there something I am missing, or something I can adjust for a "cleaner" report?
I have just starting working with this, but the generated report seems "fuzzy", the characters on screen and print are not quite a sharp as would be expected? Is there something I am missing, or something I can adjust for a "cleaner" report?
- Attachments
-
- Report Preview.pdf
- (13.76 KiB) Downloaded 3281 times
Arlyn Dale
Servias LLC
Servias LLC
Re: Creating report in lansa 14.2
*Note - I am working in V15, with the latest epc 150050 if that makes a difference.
The previous provided web printing examples are working fine in a VL Web View or Dialog.
Now I am trying to move the printing specific portion of the code to a RUP (to clean up the view/dialogs code, and to make the same report printing usable across multiple dialogs), but am running into a problem.
In the views/dialog, the printing function requires the init of the report "PrintInterface" RUP as:
When I try to utilize the same code, along with the required "define_com", etc., I get an error page displaying:
Fatal Error:
Cannot set properties of undefined (setting 'ReportPages')
Location:
Reusable Part: PrintInterface, line 137
Call Stack:
1. Evtroutine Handling(#Button.Click): LS8TestWebPrint, line 13
2. Mthroutine Name(PrintPreview): LS8TestWebPrint, line 19
3. Mthroutine Name(PreviewOptions): LS2WebPdfPrintInterface, line 56
4. Mthroutine Name(uClearPages): PrintInterface, line 137
In the browser console window, it does look like the PrintInterface and PrintWidget have been initialized, or at least they show up with status 200.
When in a RUP, does a different method need to be used to init the PrintInterface/PrintWidget?
Is there a conflict or special method to have one RUP trying to execute another RUP?
The previous provided web printing examples are working fine in a VL Web View or Dialog.
Now I am trying to move the printing specific portion of the code to a RUP (to clean up the view/dialogs code, and to make the same report printing usable across multiple dialogs), but am running into a problem.
In the views/dialog, the printing function requires the init of the report "PrintInterface" RUP as:
Code: Select all
* Interface with widget.
DEFINE_COM Class(#PrintInterface) Name(#OptionsReport)
EVTROUTINE Handling(#OptionsReport.uPrintWidgetInitialized)
#OptionsReport.uInitialize Getwidth(#MaxLeft) Getheight(#MaxTop)
ENDROUTINE
Fatal Error:
Cannot set properties of undefined (setting 'ReportPages')
Location:
Reusable Part: PrintInterface, line 137
Call Stack:
1. Evtroutine Handling(#Button.Click): LS8TestWebPrint, line 13
2. Mthroutine Name(PrintPreview): LS8TestWebPrint, line 19
3. Mthroutine Name(PreviewOptions): LS2WebPdfPrintInterface, line 56
4. Mthroutine Name(uClearPages): PrintInterface, line 137
In the browser console window, it does look like the PrintInterface and PrintWidget have been initialized, or at least they show up with status 200.
When in a RUP, does a different method need to be used to init the PrintInterface/PrintWidget?
Is there a conflict or special method to have one RUP trying to execute another RUP?
Arlyn Dale
Servias LLC
Servias LLC
Re: Creating report in lansa 14.2
Hi Arlyn
If you are in 15 now, and you want to create pdf in the client side why don't you use the now native prim_pdf?
https://docs.lansa.com/15/en/lansa016/C ... IM_PDF.htm
If you want to create in the server side, then use integrator pdfdocument service, it creates the pdf in the ifs and then you can display the result pdf in the web
If you are in 15 now, and you want to create pdf in the client side why don't you use the now native prim_pdf?
https://docs.lansa.com/15/en/lansa016/C ... IM_PDF.htm
If you want to create in the server side, then use integrator pdfdocument service, it creates the pdf in the ifs and then you can display the result pdf in the web
Re: Creating report in lansa 14.2
Hi Dino,
Simple answer is that I had originally started this work back when we were on 14.2, and did not realize there was an new Prim_PDF feature.
I don't see this listed in the Lansa IDE Samples, but looking at the support docs, it seems pretty straight forward.
One item I don't see, is that in the previous print widget, once the PDF was generated (client side on the web) it would open up in a window automatically to view. In the Prim_PDF, I see the "save" feature, but is there a "preview" or "view" feature without having to save it first?
Simple answer is that I had originally started this work back when we were on 14.2, and did not realize there was an new Prim_PDF feature.
I don't see this listed in the Lansa IDE Samples, but looking at the support docs, it seems pretty straight forward.
One item I don't see, is that in the previous print widget, once the PDF was generated (client side on the web) it would open up in a window automatically to view. In the Prim_PDF, I see the "save" feature, but is there a "preview" or "view" feature without having to save it first?
Arlyn Dale
Servias LLC
Servias LLC