POS Reporting

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

POS Reporting

#1 Post by ampandya »

Hi
I have a question about the POS reporting screen.

has any one used the crystal report within xbase application? could i see some sample code?
i have attached a screen of the other program we use and i want to make similar screen to that for report showing on the screen and then Print!

Many Thanks
Attachments
Clipboard01.jpg
Clipboard01.jpg (55.87 KiB) Viewed 16594 times

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: POS Reporting

#2 Post by rdonnay »

Give this a try:

Code: Select all

#INCLUDE "dcprint.CH"

FUNCTION Main()

LOCAL cLargeFont := '24.Courier New Bold', ;
      cSmallFont := '12.Courier New', nRow, aOptions

aOptions := { 0, nil, '5', nil, nil, .f., 'Microsoft Print to PDF', 3, nil, .F., .F. }

DC_PrintPreviewAcrobatOpt( aOptions )

DCPRINT ON ACROBAT SIZE 50,50

DCPRINT FONT cLargeFont

nRow := 1
@ nRow,15 DCPRINT SAY 'GROUP / DEPARTMENT' ALIGN DCPRINT_ALIGN_HCENTER

@ nRow+2,0 DCPRINT SAY 'From:   04/04/2017'
@ nRow+4,0 DCPRINT SAY '  To:   22/05/2017'

@ nRow+6,0 DCPRINT SAY '  Branch: 001' FONT cSmallFont
@ nRow+7,0 DCPRINT SAY 'Terminal: 1' FONT cSmallFont

@ nRow+8,0 DCPRINT SAY Repl('-',50) FONT cSmallFont
@ nRow+9.5,15 DCPRINT SAY 'GROUP REPORT' ALIGN DCPRINT_ALIGN_HCENTER
@ nRow+11,0 DCPRINT SAY Repl('-',50) FONT cSmallFont

DCPRINT FONT cSmallFont

nRow := 13
@ nRow,0 DCPRINT SAY '0001'
@ nRow,15 DCPRINT SAY 520 PICTURE '9999'
@ nRow,20 DCPRINT SAY '(93.04%)'
@ nRow+1,0 DCPRINT SAY 'Impulse Ice Cream'
@ nRow+1,24 DCPRINT SAY 8545.41 PICTURE '99999.99'

nRow += 2
@ nRow,0 DCPRINT SAY '0002'
@ nRow,15 DCPRINT SAY 31 PICTURE '9999'
@ nRow,20 DCPRINT SAY '( 4.31%)'
@ nRow+1,0 DCPRINT SAY 'Scoop'
@ nRow+1,24 DCPRINT SAY 395.67 PICTURE '99999.99'

nRow += 2
@ nRow,0 DCPRINT SAY 'More ......'

DCPRINT OFF

RETURN nil

PROC appsys ; RETURN
The eXpress train is coming - and it has more cars.

ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

Re: POS Reporting

#3 Post by ampandya »

Thanks Roger,

This open the pdf file in acrobat reader now.

can i show this same file on the Form like the screen shot i have attached?

Thanks

ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

Re: POS Reporting

#4 Post by ampandya »

Hi

i want to stop the acrobat reader opening, so if i change the code to :

aOptions := { 1,, '5', nil, nil, .f., 'Bullzip PDF Printer', 1, nil, .t., .t. }

it gives me the attached error.

can you tell me what is wrong here?

Thanks
Attachments
Capture.JPG
Capture.JPG (60.81 KiB) Viewed 16554 times

ampandya
Posts: 58
Joined: Tue Apr 19, 2016 4:48 am

Re: POS Reporting

#5 Post by ampandya »

Hi
Please ignore my last message.

i have got it working by the following code, I just wanted the pdf to not open.

DCPRINT ON ACROBAT NOSPAWN SIZE 50,50

Many Thanks

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: POS Reporting

#6 Post by c-tec »

Hello,
I do this with a ActiveX and Acrobat on a static or rendering the PDF to a JPG with QUICKPDF (free version available).
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply