Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6079359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:56:15+00:00 2026-05-23T10:56:15+00:00

When using Ruport to make a CSV file for entities containing the same entities,

  • 0

When using Ruport to make a CSV file for entities containing the same entities, the generated column names create conflicts, causing Ruport to show only the first occurence of this column(s). To make this abstract explanation more clear and less complicated, an example:

My class Zone inherits from ServerUnitConfig, which has a :belongs_to to a ServerUnit.
So Zone has for example server_unit.su_name as a field.
Zone also has a :belongs_to for Domain, which also inherits from ServerUnitConfig.

I want both to be included in my Ruport and to do this I have the following :include argument for my report_table of Ruport:

{            
    :server_unit => {:only => 'su_name'}, 
    :domain => {:include => {:server_unit => {:only => 'su_name'}}, :only => {}
}

Reporting this with Ruport in a CSV file, gives a report showing only the server_unit.su_name column of server_unit not the one of Domain. Normally also the server_unit.su_name should be shown, but since Ruport only shows the field name and its parent, both cases show server_unit.su_name and this gives conflicts.

I would suggest to give a custom name to the field in the include, but I don’t know how. An other idea, if it would be possible, is to tell Ruport one or the other way it is no problem to have identical column names, but I don’t think that is possible. Has anybody an idea to solve this problem? It would help me a lot!

Thanks

Daan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:56:15+00:00Added an answer on May 23, 2026 at 10:56 am

    You could use the report_table_by_sql method, which is a bit ugly. Or use the :method option to call a method with a slightly different name, not great either.

    There is a :qualify_attribute_names option for each include that was used internally. I’ve written a patch here: https://gist.github.com/1057518 that will expose it, you can use it like so:

    {:server_unit => {:qualify_attribute_names => 'serv', :only => 'su_name'}}
    

    To apply the patch you’d need to “vendor” the acts_as_reportable gem in Rails, which can be a pain. I’ll try and put it on the main repo at https://github.com/ruport/acts_as_reportable soon when I’m sure it has no problems.

    Hope that helps,
    Andrew

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’m using C# and Winforms. I’m trying to make a report that gives a
I'm using iReport and I need to create a sub-report using a XML DataSource
hai.all..can you tell me how to make table in jquery? i want using this
I'm using ExtJS to make a form that generates a report from the data
I have to make a new report using crystal report8.5 . I have created
I am using FetchXML in SSRS 2008 to create a report from CRM 2011.
I'm using reporting services to make a report graph. However my data looks like
I have a CSV that starts with 3 columns. A cumulative percentage column of
We're using aspose.word to create a report from a word template direct to PDF
I am using VS2010. I am trying to make reports using Report Viewer. This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.