Skip Cells

Skip Cells

Forum member · Aug 20, 2009
Hi there I have a table which my or may not have null values for some of the cells Rather than add "" to the cell, is there a way to just simply skip that cell and move to the next column? Thanks

Re: Skip Cells

Support · Aug 20, 2009
Hello, What exact product are you using? Are you using the Generator or Report Writer? If you are using the Report Writer that will leave empty space on the PDF when there is a null value from the database. If you are using the Generator product you will have to draw the data yourself so you will have more control and you can do either adding something to the cell or skipping it. Here what exactly you mean by skipping? Do you want to span the cell to the next or previous cell as it do not have any data? Please be more specific to the requirement you have so that we can help you further. Thanks, ceTe Software Support Team.

Re: Skip Cells

Forum member · Aug 20, 2009
hi there I am using generator What i wish to do is simply have no entry where the value is null. currently I am writing "" into the cell to achieve this, but i thought that there must be a neater solution for example If Not Data(4) Is DBNull.Value Then MyRow.Cells.Add((Data.GetDecimal(4).ToString("0.0"))) Else MyRow.Cells.Add("") end if but I am having to repeat this for each numerical cell; can you advise the best way to approach this? thanks

Re: Skip Cells

Support · Aug 20, 2009
Hello, When adding the table rows and cells in this way you will have to add the cell with empty string when there is a NULL value from the database. There is nothing in our product which can check for NULL values and add it. In order to reduce the amount of code you need to write, you can write a function which will take the data from database and checks for NULL values. It should return an empty string or the value after checking. You can call this function when setting the cell data for each cell directly. Thanks, ceTe Software Support Team.