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 7593823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:15:57+00:00 2026-05-30T21:15:57+00:00

I am looking to create a report of menu items. Here’s a simplified example

  • 0

I am looking to create a report of menu items. Here’s a simplified example of my data that I already have in a IList collection:

0 1 0 N
1 1 1 N
1 1 2 Y
0 2 1 N
1 2 2 N
1 2 3 Y
1 2 4 N

Where

Column 1 - row type ( 0 = top level, 1 = sub level)
Column 2 - top level menu
Column 3 - sub level menu
Column 4 - default ( Y = Yes, N = No)

What I need to do is to create headings such as /1-2 etc. Here the example shows the heading I need to create for this small set of data.

/1-2
/1-1
/1-2
/2-3
/2-2
/2-3
/2-4

The heading is calculated as follows.

  • For each row that’s a top level the heading is “/” + column1 + X.
    Where X is calculated by looking ahead to find which following sub level for that heading has a Y in the default column.
  • For each row that’s a sub level the heading is “/” + column1 + column2

Sorry if my explanation is not good. It’s not easy to explain.

Can anyone give me a suggestion about how I could implement the look ahead that is needed when I create a row that’s of a type “top level”?

  • 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-30T21:15:59+00:00Added an answer on May 30, 2026 at 9:15 pm

    I would suggest parsing the input data into a tree based structure, and then converting that tree based structure into your desired output rather than trying to directly map one to the other. This is particularly true if the input rows aren’t always in order and with perfectly valid values.

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

Sidebar

Related Questions

I'm looking to be able to create a report which shows some summary data
I'm looking to create a report with similar that has a checkbox next to
Looking at the samples that come with EPPlus I have managed to create the
I looking to create a custom calender with Zend Framework, I am hoping that
Im looking to create a control that would look like comic baloon. In WPF
If I were looking to create my own language are there any tools that
I would like that the jobs.create fails if an identical job is already in
I used iText 5 to create a nice looking report which includes some tables
I'm looking for a control that I can put on top of an already
I have two table cpuinfo and jobinfo. I want to create report using both

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.