Source language: Translate to:

Report Designer, shows only one record

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Report Designer, shows only one record

Postby ebear » Sun Mar 23, 2014 12:13 pm

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: http://fseg.eu/files/StockBoxOverview.dbr

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

:P150_PrintBoxOverview
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"

Return



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,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic

Re: Report Designer, shows only one record

Postby Neosoft Support » Mon Mar 24, 2014 10:37 am

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:

[Clients.FirstName]
[Clients.LastName]
[Clients.Street]
[Clients.City]
[Clients.State]
[Clients.Zip]
[Clients.Telephone]

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.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

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

Postby ebear » Mon Mar 24, 2014 12:23 pm

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.

Regards,

Eric
http://www.lunarsoftware.eu - Lunar Software ERP database Development. Manufacturing processes, Document management, QMS, Stock management. Standalone solutions or connected to Helios Orange and other ERP systems.
User avatar
ebear
 
Posts: 270
Joined: Wed Jan 18, 2012 3:12 am
Location: Vrchlabi - Czech republic


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest