Page 1 of 1

Report Designer, shows only one record

PostPosted: Sun Mar 23, 2014 12:13 pm
by ebear
Hello All,

Again maybe a simple answer on my "big" question.... :oops:

Until now I didn't use the Report Designer to create lists.

I have a stock database, the items are in boxes with each there unique box number. With "dbpExecSQL" I query the database (MS-SQL) to show only the contents of one box. I created a report with the report designer to print a sheet with a list of the box contents. But the sheet shows me only the first record and this record is repeated in the list times the records in the query.

If I show the query in a Grid all the selected records are showed correct, also if I run the query in Microsoft SQL server management studio the records selected are shown correct.

Attached the report:

Below the code I tried to use to print the sheet: (If used to show a Grid everything works correct)
Code: Select all

dbpExecSQL "EdB" "SELECT *, HWCODE + '.' + RIGHT ( '000' + CONVERT (VARCHAR, LocationNo), 3 ) AS Box FROM dbo.FcsdCoreStock WHERE (HWCODE = N'[EdB.FcsdCoreStock_TMP.HWCODE]') AND (LocationNo = N'[EdB.FcsdCoreStock_TMP.LocationNo]') AND (Department = N'[EdB.FcsdCoreStock_TMP.Department]') AND (StockNo = N'[EdB.FcsdCoreStock_TMP.StockNo]')" "StockQty"

dbpPrintReport "EdB" "[PubDir]templates\StockBoxOverview.dbr" "PrintDialog=Yes;StartPage=;EndPage=;Copies=1"

dbpCloseTable "EdB" "StockQty"


Edit: If I use the simple dbpListPrint, also everything is correct printed....

Code: Select all
dbpListPrint "EdB" "StockQty" "PrintDialog=Yes;Orientation=Portrait;GridLines=Yes;ColumnTitles=Yes;RecordNumbers=Yes;AutoWidth=Yes;UseGridAttributes=Yes;LeftMargin=0.25in;RightMargin=0.25in;TopMargin=0.5in;BottomMargin=0.5in"

What I'm doing wrong????

Thanks for your support,


Re: Report Designer, shows only one record

PostPosted: Mon Mar 24, 2014 10:37 am
by Neosoft Support
I can't really tell without having the database too, but usually the data body partition's data source table is the same table that the data fields come from. Also:

In Report Designer, each field variable is a combination of the table name, a period (.) and the field name surrounded by square brackets. For example:


Unlike NeoBookDBPro, Report Designer does not use the database ID as part of the field variable. That's because reports can only work with one database at a time, and since reports exist outside the context of NeoBookDBPro, the database ID has no meaning.

Re: Report Designer, shows only one record (Solved)

PostPosted: Mon Mar 24, 2014 12:23 pm
by ebear
Hello Dave,

Exactly as I already wrote at the start, a simple answer on a simple question :oops:
I had the field name in the Report Designer with the database eg. [EdB.StockQty.Item]. And that was the problem....
Report changed and wallah the thing works.....

I used the Report Designer of cause before but this was always without list of eg. Items.....

Dave thanks a lot for your support.