Source language: Translate to:

report designer help?

General questions about NeoBook

Moderator: Neosoft Support

report designer help?

Postby yanzco » Fri May 15, 2015 10:59 pm

hello guys. i have a problem.. and not sure what the problem is or how i could solve it..

i needed something to be printed out.. like a report in a small piece of paper like "receipt bill" or an "order list".. using just the standard inkjet /deskjet printer..


1. i dont know how to use report designer of neobook..
or do the layout or variables i want to be printed..
any guides here how to use report designer..
or examples i could view ?

i mean all i want to be printed is a list.. like example..

may 16, 2015 - 1:50 pm
variableA
variableB
variableC
variableD
variableE
variableF
etc etc etc

all taken from microsoft access database in neodbpro or variables taken from neobook..



2. is it possible to do something.. create a button.. "print list" then neobook takes the variables that i want to be printed..
then prints it with the connected deskjet printer..

3. can i use probably half sized vertical papers? not the standard a4 paper to be print out..
i mean. i only will be using a portion of the standard a4 paper size.. so can i use just the specific paper width and height size?..
( i think its the printer part..if it could accept smaller paper sizes )
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am

Re: report designer help?

Postby yanzco » Sat May 16, 2015 12:52 am

or can anyone teach / guide me to using the print function of neobook..

or i can just save the stuffs i wanted to be printed to a text file and use PrintDataFile or PrintTextFile of neobook..

anyone know i could change page size to something like a postcard size?
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am

Re: report designer help?

Postby Gaev » Sat May 16, 2015 4:50 am

yanzco:

Step 1:

Create a text file using notepad.exe ... something like ..
Code: Select all
This is the first line of text
This is the second line of text

This is the last line of text

Then try and print it ... File >>> Print ... see how it prints ... if you are satisfied, go to Step 2

Step 2:

Load the half sized vertical paper in your printer and print the file again ... if you are satisfied, go to Step 3

Step 3:

Change the content of the text file so one/more lines are very long ... print the file again ... if you are satisfied, go to Step 4

Step 4:

Now, you can create the file content straight from NeoBook ... attach this code to the click event of a Button ...
Code: Select all
SetVar "[printFileName]" "![PubDir]test.txt"
FileWrite "[printFileName]" "All" "My name is yanzco"
FileWrite "[printFileName]" "2" "NeoBook rocks !!!"
FileWrite "[printFileName]" "3" "This is a fairly long line of text, text, text, text"

PrintDataFile "" "" "[printFileName]"

... if you are satisfied, go to Step 5

Step 5:

Now you can print variable data ...
Code: Select all
SetVar "[myName]" "yanzco"
SetVar "[myFavouriteProgram]" "NeoBook"

SetVar "[printFileName]" "![PubDir]test.txt"
FileWrite "[printFileName]" "All" "My name is [myName]"
FileWrite "[printFileName]" "2" "[myFavouriteProgram] rocks !!!"
FileWrite "[printFileName]" "3" "This is a fairly long line of text, text, text, text ... [time]"

PrintDataFile "" "" "[printFileName]"

... if you need to use data in the current record of a currently opened database (using NeoDBPro), you can specify something like [MyDB.Clients.FirstName].

You can also play around with the header/footer parameters in PrintDataFile ... see the Help file for details.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: report designer help?

Postby yanzco » Sat May 16, 2015 5:28 pm

i see, ill try it out.. thanks gaev

edit*

what if i wanted to place more than one column of data from neobook db..

like
firstname lastname and age

would this work with a query?. i mean, if i want all the query result to be printed out..

firstname, lastname and age..

and if possible, with column lines.. ?
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am

Re: report designer help?

Postby Gaev » Sun May 17, 2015 5:57 am

yanzco:

what if i wanted to place more than one column of data from neobook db..
like
firstname lastname and age

You can do something like ...
Code: Select all
FileWrite "[printFileName]" "Append" "Name: [MyDB.Clients.FirstName] [MyDB.Clients.LastName] Age: [MyDB.Clients.Age]"
... to print fields from the current record in your Database Table.

would this work with a query?. i mean, if i want all the query result to be printed out..
firstname, lastname and age..

You have to Loop through the records in your Query ... and do the FileWrite command inside the Loop/EndLoop code block for each record.

and if possible, with column lines.. ?

Not really ... you could use + and - and | characters to simulate the columns ... and make sure that the output from each field is of the same width (i.e. append necessary spaces).
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 2 guests