Source language: Translate to:

is there a variable limit?

General questions about NeoBook

Moderator: Neosoft Support

is there a variable limit?

Postby yanzco » Sun Jan 10, 2016 3:23 am

i have a long list inside a notepad.. (think inventory)

and i have made neobook to read all the contents and print it with neobook dbp..

FileRead "[PubDir]PRINT.txt" "All" "[repotext]"
dbpPrintReport "TheMinindalDB" "[PubDir]das_outreport.dbr" "PrintDialog=No;StartPage=;EndPage=;Copies=1"


lets say, in the list there are 100 lines..
for some reason.. the ones that get printed are lines 1-60? more or less..
the other lines are not included..

im thinking.. maybe there was a limit in variable?

any workaround?
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am

Re: is there a variable limit?

Postby Gaev » Sun Jan 10, 2016 6:21 am

yanzco:
maybe there was a limit in variable?

1) If your question is regarding the maximum data that a variable like [repotext] can hold, try this ...
Code: Select all
FileRead "[PubDir]PRINT.txt" "All" "[repotext]"
FileWrite "[PubDir]PRINT2.txt" "All" "![repotext]"

If the PRINT2.txt file contains the same data (lines) as PRINT.txt, then you know that you have not breached the limits of the NeoBook variables.

2) If the limitation is not with the NeoBook variable, the next thing to check is the contents of the database to see if all the data was loaded into the Table/Field(s).

If the database does not contain all the expected data, provide details of the command deployed to define your Database Table as well as the ones used to load the data from the variable into the field(s).

3) If the database contains all the expected data, it would have to be within the dbpReport plugin ... either a real limit or something you incorrectly specified when designing your report ... for this, you need to provide details of how you built the das_outreport.dbr report definition.
Last edited by Gaev on Sun Jan 10, 2016 11:03 am, edited 1 time in total.
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: is there a variable limit?

Postby Wrangler » Sun Jan 10, 2016 10:11 am

variable typo in second line
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: is there a variable limit?

Postby yanzco » Sun Jan 10, 2016 7:52 pm

Code: Select all
FileWrite "[PubDir]PRINT.txt" "All" ""

Loop "1" "[TheMinindalDB.DayReport.$RecCount]" "[looper]"
dbpGotoRecord "TheMinindalDB" "DayReport" "[looper]"

StrLen "[TheMinindalDB.DayReport.DRItemQTYout]" "[LENqty]"
Math "4-[LENqty]" "0" "[LENqtyDIFF]"

       SetVar "[step1]" "x"
       StrLen "[step1]" "[LENstep1]"
       Loop "1" "[LENqtyDIFF]" "[looper2]"
       StrIns " " "[step1]" "[LENstep1]" "[step1]"
       EndLoop

 
FileWrite "[PubDir]PRINT.txt" "Append" "[step1][TheMinindalDB.DayReport.DRItemQTYout]   [TheMinindalDB.DayReport.DRItemName]"
FileWrite "[PubDir]PRINT.txt" "Append" " "
EndLoop

FileRead "[PubDir]PRINT.txt" "All" "[repotext]"

dbpPrintReport "TheMinindalDB" "[PubDir]das_outreport.dbr" "PrintDialog=No;StartPage=;EndPage=;Copies=1"


this is the whole code in the button "print report"

it gets the query and lists it in a txt file.. from top to bottom..
so i was thinking, maybe before the file read could finish, it prints.. maybe i should add a delay a few seconds before printing..

i cant exactly check it right now, i dont have the real database right now, all i have now is the clean copy.. i have to get the database from the office tonight..

and in the dbp report file.. it just contains a text field with options checked auto wrap and auto size
inside it is just [repotext]

the size of the text field is just small enough to fit 10 lines..

and since it is auto resize i didnt bother to make it bigger..
when i tested it, it worked, 20 lines.. 50 lines..
so i assumed the auto resize works fine..

i have not tested the larger report sizes i got in the office...
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am

Re: is there a variable limit?

Postby Gaev » Mon Jan 11, 2016 7:37 am

yanzco:

1) I have added some command lines that should give you some indication whether the [repotext] variable contains all the data or not.
Code: Select all
FileWrite "[PubDir]PRINT.txt" "All" ""

................. add this line
AlertBox "$RecCount" "[TheMinindalDB.DayReport.$RecCount]"

Loop "1" "[TheMinindalDB.DayReport.$RecCount]" "[looper]"
dbpGotoRecord "TheMinindalDB" "DayReport" "[looper]"

StrLen "[TheMinindalDB.DayReport.DRItemQTYout]" "[LENqty]"
Math "4-[LENqty]" "0" "[LENqtyDIFF]"

       SetVar "[step1]" "x"
       StrLen "[step1]" "[LENstep1]"
       Loop "1" "[LENqtyDIFF]" "[looper2]"
       StrIns " " "[step1]" "[LENstep1]" "[step1]"
       EndLoop

 
FileWrite "[PubDir]PRINT.txt" "Append" "[step1][TheMinindalDB.DayReport.DRItemQTYout]   [TheMinindalDB.DayReport.DRItemName]"
FileWrite "[PubDir]PRINT.txt" "Append" " "
EndLoop

FileRead "[PubDir]PRINT.txt" "All" "[repotext]"

................. add these lines
FileLen "[PubDir]PRINT.txt" "[PRINTLines]"
FileSize "[PubDir]PRINT.txt" "[PRINTSize]"

FileWrite "[PubDir]PRINT2.txt" "All" "![repotext]"
FileLen "[PubDir]PRINT2.txt" "[PRINT2Lines]"
FileSize "[PubDir]PRINT2.txt" "[PRINT2Size]"
AlertBox "Lines and Sizes" "[PRINTLines] ... [PRINT2Lines] and [PRINTSize] ... [PRINT2Size]"
.................

dbpPrintReport "TheMinindalDB" "[PubDir]das_outreport.dbr" "PrintDialog=No;StartPage=;EndPage=;Copies=1"

Run your pub using this additional code and post (AlertBox) results from ...

- $RecCount
- Lines and Sizes

2) I am guessing that you have not reached a limit with [repotext] ... but that dbpReport might have an upper limit on how many characters you can have in a single column (of a single row) of data ... results from (1) will tell us if this may be so.

3) You might consider an alternate design where you write out each line of data to another (temporary) database Table ... one record per line ... then run your report against this temporary Database Table
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: is there a variable limit?

Postby Neosoft Support » Mon Jan 11, 2016 8:11 pm

The theoretical maximum size of a variable in NeoBook is 2GB (about 2 billion characters).
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: is there a variable limit?

Postby yanzco » Tue Jan 12, 2016 12:30 am

hello all.. ive confirmed it and its not neobook's variable limit..
so it's the neobook's report designer issue..
it cant read the variable [repotext] from neobook completely..

so the work around i did is yeah, as Gaev said, make a temporary table, transfered the list there, and used report designer's database table reading stuff to do the work.. using data body partition.

it works fine now. :) thanks all..
yanzco
 
Posts: 175
Joined: Sun Jul 20, 2014 4:07 am


Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest