locked
Alternate row color in blank line RRS feed

  • Question

  • User546194788 posted

    I designed to print 20 lines in detail section.


    If records are 53 lines the report will print 3 pages.


    I code in CR detail section to make Alternate Row Color


    if recordnumber mod 2 =0 then CrSilver else CrNocolor (this works fine)


    How to make alternate row color working after line 53 until line 60? (this is no data)

    Monday, July 28, 2014 11:25 AM

All replies

  • User-993404089 posted

    Try this method from someone else.

    http://forums.asp.net/p/1889197/5349771.aspx?Re+How+to+add+blank+record+after+the+last+detail+on+the+last+page+which+less+than+20+records+

    ANother way is to use a sql stored procedure which creates "blank records" using a something like

    select * from table

    union

     

    Create a table that adds the necessary records to it.

     

    Just a few thoughts

    Monday, July 28, 2014 3:21 PM
  • User-993404089 posted

    Created something like this..

    DECLARE @totalPerPage as decimal(8,4)
    DECLARE @mtotal as INT
    DECLARE @total as INT
    DECLARE @intFlag INT = 1
    DECLARE @t table (Flag varchar(255))		--Build table matches the query
    
    
    Set @totalPerPage = 200	--Number of items per page
    
    Set @mtotal = (Select count(*) from users)
    
    --Calculates the number of extra records to round out the number of records to create full pages
    Set @total = Cast((Ceiling((@mtotal / @totalPerpage)) * @totalPerPage)- @mtotal as int)
    
    WHILE (@intFlag <=@total) BEGIN
    	INSERT @t values (null)				--Add additional Records to Temp table Match the fields in the original query results
    	SET @intFlag = @intFlag + 1
    END
    
    --Return the Temp Table with the Regular Records
    
    Select firstname from users
    Union ALL
    SELECT * FROM @t
    
    

    Monday, July 28, 2014 8:41 PM