# 2 Columns within Report

**URL:** <https://www.dynamicsuser.net/t/2-columns-within-report/19785>\
**Category:** Developer Forum\
**Created:** [August 16, 2008, 10:44am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785 "2008-08-16T10:44:05Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pacino88](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pacino88](https://www.dynamicsuser.net/u/Pacino88)\
**Post date:** [August 16, 2008, 10:44am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/1 "2008-08-16T10:44:05Z")

</div>

Hey there,

I am building a report with all my items and itemids.

At the moment its showing me a mega list but I want to add another column in my report where it continues with the list before going to the next page. That way the page amount of the list will reduce

Situation now:

item id - item name | end page

Wanted :

item id - item name item id - item name | end page

Can I do this within AX?

Thanks in Advance.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 18, 2008, 2:38pm UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/2 "2008-08-18T14:38:26Z")

</div>

Hey,

This functionality is really hard (at least for me),

I tried to do all tricks I can, but it look really hard, and I think may it is not applicable.

Actually I think about, what happen if you adust the paper setting when you print, but I didn’t do it.

the solution I’m sure about are two and both are external reporting,

**A- Use crystal report it has much much more options, how to publish it is onther story.**

here how to create the crystal report with multi-columns

\<

### Multiple columns

Instead of having your data print straight down the page, you can set up multiple columns and have the data flow from column to column.

###### To create a multiple-column report1. Open the report you want to format with multiple columns.

1. On the **Report** menu, click **Section Expert**.

2. In the Section Expert, highlight **Details** , and then select **Format with Multiple Columns**.

3. Click the **Layout** tab and set the **Width** you want your column to be.

4. Set the **Horizontal** and/or **Vertical** gap you want to maintain between each record in your column.

5. In the Printing Direction area, choose a direction.

6. If the report you’re formatting contains grouping, select **Format Groups with multiple column**.

7. Click **OK**.

When you preview the report, you’ll see that the field headers appear only for the first column. To have field headers for the second column, insert a text object.

> 

this the result

**BEFORE:**

**1-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/b/bdc4d62b4dc6cab88cab722a56be4c65de32c673.jpeg)

**2-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/d/d00790e8adc3c2c0869aa8aecda7561c28bf33bf.jpeg)

**3-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/5/58e92b62e85596e87f015fdc8ca254f430ca7961.jpeg)

**4-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/7d0a9bdbaed840e881d94097ea72d4f1be56c954.jpeg)

**AFTER:**

**1-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/e/e29bef34900f0c05190dd5087e8835639ca70cfb.jpeg)

**2-**

 ![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/7a79d44ba9a93ecd22b401188cbc21438e8dbd5c.jpeg)

**B- you create webpage using [ASP.Net](http://ASP.Net) and using .NET Business Connector**

and I prefer the first way, just feeling.

I hope this can help you.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 19, 2008, 6:27am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/3 "2008-08-19T06:27:18Z")

</div>

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/e/e29bef34900f0c05190dd5087e8835639ca70cfb.jpeg)

I think you can’t do it using Axapta.

Any how you can use crystel Report and publish it any way you like.

This how to do it in Crystal Report

\<

1. Open the report you want to format with multiple columns.
2. On the **Report** menu, click **Section Expert**.
3. In the Section Expert, highlight **Details** , and then select **Format with Multiple Columns**.
4. Click the **Layout** tab and set the **Width** you want your column to be.
5. Set the **Horizontal** and/or **Vertical** gap you want to maintain between each record in your column.
6. In the Printing Direction area, choose a direction.
7. If the report you’re formatting contains grouping, select **Format Groups with multiple column**.
8. Click **OK**

> 

This is the Result:

**Before:**

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/b/bdc4d62b4dc6cab88cab722a56be4c65de32c673.jpeg)

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/d/d00790e8adc3c2c0869aa8aecda7561c28bf33bf.jpeg)

**After:**

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/5/58e92b62e85596e87f015fdc8ca254f430ca7961.jpeg)

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/7d0a9bdbaed840e881d94097ea72d4f1be56c954.jpeg)

![](https://us1.discourse-cdn.com/flex023/uploads/dugusers/original/2X/7/7a79d44ba9a93ecd22b401188cbc21438e8dbd5c.jpeg)

I hope this can help.

---

<div class="post-metadata">

**Author:** ![Pacino88](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pacino88](https://www.dynamicsuser.net/u/Pacino88)\
**Post date:** [August 20, 2008, 7:51am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/4 "2008-08-20T07:51:03Z")

</div>

Anybody?

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 20, 2008, 11:30am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/5 "2008-08-20T11:30:43Z")

</div>

I did post long answer with images,

but I don’t know why it didn’t published.

Well any how, I will give you the summery.

I spend long time trying to do it using the Dynamics Ax, but unfourtuanitly it look not applicable here.

So I suggest to use crystal report, it can do it, put in mindthat publish reports is another story.

Here how that:

\<

### Multiple columns

Instead of having your data print straight down the page, you can set up multiple columns and have the data flow from column to column.

###### To create a multiple-column report1. Open the report you want to format with multiple columns.

1. On the **Report** menu, click **Section Expert**.

2. In the Section Expert, highlight **Details** , and then select **Format with Multiple Columns**.

3. Click the **Layout** tab and set the **Width** you want your column to be.

4. Set the **Horizontal** and/or **Vertical** gap you want to maintain between each record in your column.

5. In the Printing Direction area, choose a direction.

6. If the report you’re formatting contains grouping, select **Format Groups with multiple column**.

7. Click **OK**.

When you preview the report, you’ll see that the field headers appear only for the first column. To have field headers for the second column, insert a text object.

> 

Sorry for the latency, I thought that it was posted already.

hope this will help you.

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 20, 2008, 11:33am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/6 "2008-08-20T11:33:56Z")

</div>

This is the results

Before

![](http://lh5.ggpht.com/mhd2111/SKl6AxI4vbI/AAAAAAAAACc/r6E-bCx4dUQ/Before1.jpg)

![](http://lh4.ggpht.com/mhd2111/SKl6A-yTBHI/AAAAAAAAACk/tWsBHCap_kE/Before2.jpg)

After ![](http://lh5.ggpht.com/mhd2111/SKl6LANPfXI/AAAAAAAAADA/emFASDvfzjM/After1.jpg)

![](http://lh5.ggpht.com/mhd2111/SKl6LNafqjI/AAAAAAAAADI/sbIgnYeX4_k/After2.jpg)

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 20, 2008, 11:34am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/7 "2008-08-20T11:34:36Z")

</div>

Before:

![](http://lh5.ggpht.com/mhd2111/SKl6AxI4vbI/AAAAAAAAACc/r6E-bCx4dUQ/Before1.jpg)

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 20, 2008, 11:35am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/8 "2008-08-20T11:35:31Z")

</div>

Settings:

![](http://lh4.ggpht.com/mhd2111/SKl6BCO65lI/AAAAAAAAACs/_JnYN_CrMIo/Before3.jpg)

![](http://lh4.ggpht.com/mhd2111/SKl6BKPW9BI/AAAAAAAAAC0/qe-S09VQzpk/Before4.jpg)

---

<div class="post-metadata">

**Author:** ![Mohammad\_Sallout](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Mohammad\_Sallout](https://www.dynamicsuser.net/u/Mohammad_Sallout)\
**Post date:** [August 20, 2008, 11:36am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/9 "2008-08-20T11:36:20Z")

</div>

After:

![](http://lh5.ggpht.com/mhd2111/SKl6LANPfXI/AAAAAAAAADA/emFASDvfzjM/After1.jpg)

![](http://lh5.ggpht.com/mhd2111/SKl6LNafqjI/AAAAAAAAADI/sbIgnYeX4_k/After2.jpg)

That’s it.

---

<div class="post-metadata">

**Author:** ![Pacino88](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pacino88](https://www.dynamicsuser.net/u/Pacino88)\
**Post date:** [August 21, 2008, 7:39am UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/10 "2008-08-21T07:39:48Z")

</div>

Thanks for the CR solution but I cant use it and I have to do it within Dynamics AX. Are you sure there is no way to do this within AX.

---

<div class="post-metadata">

**Author:** ![Pacino88](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Pacino88](https://www.dynamicsuser.net/u/Pacino88)\
**Post date:** [February 10, 2009, 2:22pm UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/11 "2009-02-10T14:22:53Z")

</div>

Have anybody found a solution yet for this problem?

---

<div class="post-metadata">

**Author:** ![Lukens](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@Lukens](https://www.dynamicsuser.net/u/Lukens)\
**Post date:** [July 21, 2009, 5:21pm UTC](https://www.dynamicsuser.net/t/2-columns-within-report/19785/12 "2009-07-21T17:21:20Z")

</div>

There is a solution to the problem but it’s a dirty one. I used it to display 2 columns in inventory location barcodes report.

First of all, you have to modify fetch(). While going through the loop, you have to fetch 2 records per each loop count. In the loop, you handle the first record and then check if the next record is available. If so - handle it as well. If not - stop the loop. Second - you have to have a programmable section with fields being handled by display methods instead of having a regular section connected to a datasource. Each column has to be displayed by different display methods that return value of different (typically global) variables. You set those variables while going through the loop in fetch. If the fetch loop stops at the first (left) column and can’t fetch the record for the second column, you have to hide the fields at the right. I perfectly know how dirty and not-correct-with-the-best-practises it is, but it works quite well. It requires some time to create a report that way, but it’s the result that counts. Here is how the fetch method looks like when I used it for barcode printing - all should be intuitional to proccess to your needs. Hope that helps:

while (qr.next())  
{  
currentWMSLocation = qr.get(tableNum(WMSLocation));  
leftInventLocationId = currentWMSLocation.inventLocationId;  
leftAisleId = currentWMSLocation.aisleId;  
leftRack = currentWMSLocation.rack;  
leftLevelId = currentWMSLocation.level;  
leftCheckText = currentWMSLocation.checkText;  
leftBarcodeEAN128 = BarcodeEAN128::construct();  
leftBarcodeEAN128.string(true, leftCheckText, BarcodeContentType::WMSLocation);  
leftBarcode = leftBarcodeEAN128;  
leftBarcode.encode();  
showLeftBarcode.font(‘BC C128 Narrow’);  
showLeftBarcode.fontSize(92);

isRightSectionVisible = qr.next();  
if (isRightSectionVisible)  
{  
currentWMSLocation = qr.get(tableNum(WMSLocation));  
rightInventLocationId = currentWMSLocation.inventLocationId;  
rightAisleId = currentWMSLocation.aisleId;  
rightRack = currentWMSLocation.rack;  
rightLevelId = currentWMSLocation.level;  
rightCheckText = currentWMSLocation.checkText;  
rightBarcodeEAN128 = BarcodeEAN128::construct();  
rightBarcodeEAN128.string(true, rightCheckText, BarcodeContentType::WMSLocation);  
rightBarcode = rightBarcodeEAN128;  
rightBarcode.encode();  
showRightBarcode.font(‘BC C128 Narrow’);  
showRightBarcode.fontSize(92);  
}  
element.setRightSectionVisibility(isRightSectionVisible);  
element.execute(1);  
}

ret = true;  
return ret;

Hope that helps in some way. Regards.
