One Column Table Data In One Page RDLC

487 Views Asked by At

I am working for qrcode inventory system where some datails embedded in qrcode that can be scan by phone. my problem i want to print one column data that is the qrcode in the database after 5 qrcode it will go to next page in print preview I want the 6th qrcode at the same page btw i am using picturebox inside a table example

from:

1st page
___________________________________
|qrcode 1|
|qrcode 2|
|qrcode 3|
|qrcode 4|
|qrcode 5|
____________________________________
2nd page
____________________________________
|qrcode 6|
|qrcode 7|
|qrcode 8|
|qrcode 9|
|qrcode10|
_____________________________________

TO

 ___________________________________
    |qrcode 1| |qrcode 6|
    |qrcode 2| |qrcode 7|
    |qrcode 3| |qrcode 8| 
    |qrcode 4| |qrcode 9|
    |qrcode 5| |qrcode10|
____________________________________
2

There are 2 best solutions below

1
Oceans On

The easiest workaround I can think of on the spot, would be to add a second table (almost identical) just next to it. And show/hide the rows depending on the RowNumber, this will allow you to fit more on a single page but the ordering will be slightly different.

Using the RowNumer Function you can define the following expressions for the rows on each table:

//Table1 - Row Visibility:
=IIF(RowNumber("MyDataSet") Mod 2, True, False) 

//Table2 - Row Visibility:
=IIF(RowNumber("MyDataSet") Mod 2, False, True) 

Here is an illustration of what is going to happen. Making a row invisible will also remove the space, moving the next row up.

[--Table1--] [--Table2--]
|qrcode 1| |qrcode 1|
|qrcode 2| |qrcode 2|
|qrcode 3| |qrcode 3|
|qrcode 4| |qrcode 4|
|qrcode 5| |qrcode 5|
|qrcode 6| |qrcode 6|
...

This should get the following result, which is ofcourse slightly different than from your example:

|qrcode 1| |qrcode 2|
|qrcode 3| |qrcode 4|
|qrcode 5| |qrcode 6|
|qrcode 7| |qrcode 8|
|qrcode 9| |qrcode10|

0
tezzo On

I think this problem could be solved setting Columns and ColumnSpacing properties of your report:

  1. display Property window
  2. click on Report (grey area outside your page)
  3. find and set Columns property

Please note that using old versions of Visual Studio you can find Columns in Body properties.