Jump to content
We've recently updated our Privacy Statement, available here ×

HTML - Indentation


raffimd

Recommended Posts

Hi,

I have a velocity based report template. Based on the user inputs, I generate the JRXML by merging the velocity template file and the user inputs. Basic intention to have the velocity based template is to allow the column selection to the user.

The reports comes perfectly in PDF format.

But, the indentation is not coming properly in HTML.

The width for the column is not getting effective in HTML report, looks like it determines the width based on the maximum width of the particular column in that page.

Since it is determining based on each page, the left and right margin in the next page does not match with the first page.

Is there a way to mention in the JRXML file, so that the Jasper Report considers the width in HTML report also.

 

Thanks in advance,

Raffi

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

I have fixed this issue.

I passed the format to the velocity context and

added the logic as mentioned below:

 

#if( $format != 'pdf' )

isIgnorePagination="true"

#end

 

After ignoring the pagination for the html report, the indentation was calculated based on all the records.

So, there is no indentation problem.

 

And if the format is 'pdf', the report comes well with the pagination.

 

Thanks,

Raffi

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...