Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More than one different sections (arrays) within page content #15

Open
DagNabbits opened this issue Dec 16, 2013 · 1 comment
Open

More than one different sections (arrays) within page content #15

DagNabbits opened this issue Dec 16, 2013 · 1 comment

Comments

@DagNabbits
Copy link

Hi, great kit!

I am struggling implementing multiple arrays within one report.

For example:
defaultValues = @{
@"Assets": Assets,
@"Debtors": Debtors,
@"Bank": Bank};

Where each of these is an array of an "item" object.

In the demo you have the one "articles" array.

I want to have a title for each array in the report rather than a long list of transactions, so it would look like:

Assets
….report rows
….report rows
...report rows
Debtors
….report rows
…report rows
...report rows
Bank
…report rows
…report rows
etc.

This works without doing anything to the required delegate method below, if it fits onto one page:

  • (id)reportsGenerator:(PRKGenerator *)generator dataForReport:(NSString *)reportName withTag:(NSString *)tagName forPage:(NSUInteger)pageNumber offset:(NSUInteger)offset itemsCount:(NSUInteger)itemsCount

However, when it goes over one page it is displaying the same data on multiple pages.

Do you have an example of how I can do this?

Do I need to return the below for each array and do something with the offset?

[[defaultValues valueForKey:tagName] subarrayWithRange:NSMakeRange(offset, count)]

Any help would be greatly appreciated, thanks.

@schtink
Copy link

schtink commented Dec 27, 2013

I would very much like to see an example of this as well. Most reports have multiple sets of data and require sectioning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants