x++


What is the best way to print columns from different tables on the same row using the Axapta reporting tool?


It seems like each body section in an axapta report can only print columns from a single table(consistantly). For instance:
I have a report that has the following tables: SalesLine, InventTable and CustTable. Then I would like to print columns from each of this tables on the same row. It seems like I can do this when placing the fields in programmable sections but not when I place them in body sections.
I have found a few workaround that are either ugly or non-performant. There has to be a nice clean way to do this?
It should be possible to do this, there are several reports in the base system that work this way. Look at the SalesContractShipment report in 4.0 as an example.
On your report, create a datasource for SalesLine, and under that create datasource each for InventTable and CustTable. On InventTable and CustTable, make sure the FetchMode is set to 1:1. If you create a custom fetch method, make sure you call send() in the correct order. You should send CustTable first, then InventTable, then SalesLine last. On the report design, create a single body for SalesLine. You should then be able to use fields from any of the three tables in that body.
If you are still having trouble, I can think of two work arounds. One is to create a view based on those three tables, and create a report based on that view. The other is to create the report based on SalesLine and use displayMethods to lookup any fields you need from InventTable or CustTable.
You should be able to add multiple data sources to a report then create one body for the first data source that you added. Right-click the body and select New Control -> Field From AnyTableThatIsADataSource. You can then add any field that you want and it will print columns for all of those fields.
Put all the fields in the last SourceTable_Body and it'll show all the fields, because the QueryRun table by table and fill the body with each corresponding Body, so the last body will have all fields' data.
Consider using temporary tables. Fill it with your data first, than use in the report.

Related Links

X++ loop through lines in grid control
Concatenating row values in x++
How do you access a macro in the AOT macro node?
How can I set the Backgoundcolor of an AX2012 Action Pane Button
How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)
What happened to the hrplimittablerelationship table in ax-2012-r2?
Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2
What is “old sys” exactly and why would I receive errors in 2012 because of a missing Macro?
How to filter records in line grid based on selected record in header grid?
Dynamic linking gets cleared when inserting new records

Categories

HOME
android
batch-file
django
embedded
depth
vscode-extensions
newrelic
static-site
big-o
32bit-64bit
mod-security
gkturnbasedmatch
package-managers
modbus-tcp
internationalization
vuejs
imagemap
dataflow-diagram
monit
roundup
pic32
jquery-multiselect
corenlp-server
powershell-ise
cart
classcastexception
hibernate-search
sharding
sql-delete
lint
apns-php
typesafe-config
xv6
vmware-fusion
levenshtein-distance
tcc
file-sharing
importerror
apache-spark-dataset
rfc3339
monkey-testing
chai-as-promised
x-ray
podscms
azure-cli
appdomain
quicktime
monkey
slackware
winusb
mta
model-associations
synonym
tooleap
lean
nss
php-socket
concept-insights
ascii-art
rubaxa-sortable
ember-cli-rails
uncompress
ocra
git-ftp
uvc
osc
broadband
java-security
public-html
sonarqube-5.0
genymotion-call
cbind
xml-namespaces
live555
getopt
high-resolution
android-usb
http-patch
inappsettingskit
wp7test
josql
database-create
ilasm
jsr286
gobject-introspection
jqote
strsep
cac
facebook-iframe
interprocess
visualj#
xpsdocument
localizable.strings
netbeans6.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App