B4J Question How To Insert A Blank Row At Each Change In A Column

Hi all,

I have a question, does anyone know how to insert a blank row at each change in a column? I have a form that was created in Nextreports designer 8.2, that we use to print out to a till slip printer, there is a column that lists categories A, B, C etc for different items(the order is descending) how do I get it so that every time there is a change say A to B, a blank row is inserted between the A item and the B item? I would really appreciate any help or input on this, I can't seem to come up with anything.

Thank you all so much

Regards
Chris
 

DarkoT

Active Member
Licensed User
You need this insert into B4xTable? Or?

If you are using B4Xtableview you can use simple add function - like this:

B4X:
Dim row As List
row.Initialize

row.Add(Array("", "", 0, ... ) )
b4xtable1.SetData(row)
b4xtable1.Refresh
 
Upvote 0
You need this insert into B4xTable? Or?

If you are using B4Xtableview you can use simple add function - like this:

B4X:
Dim row As List
row.Initialize

row.Add(Array("", "", 0, ... ) )
b4xtable1.SetData(row)
b4xtable1.Refresh
Thank you @DarkoT, but I am using the below

B4X:
Dim therep As jNxtReportsB4J
therep.reportPrepAndRun(inputlist)


The jNxtReportsB4J function reportPrepAndRun does not allow me to do that. It has to happen during this call the function reportPrepAndRun
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
It has to happen during this call the function reportPrepAndRun
you need to contact the library author then i guess. I don´t think the code is open available...
Maybe the functionality must be included in the reportfile itself.
Sorry, i don´t use Nextreports at all.
 
Upvote 0
you need to contact the library author then i guess. I don´t think the code is open available...
Maybe the functionality must be included in the reportfile itself.
Sorry, i don´t use Nextreports at all.
Thank you very much

Maybe the functionality must be included in the reportfile itself.
I was thinking the same thing, not sure where in the report file code it is located.

you need to contact the library author then i guess. I don´t think the code is open available...
does any one know who the author is?
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Thank you very much


I was thinking the same thing, not sure where in the report file code it is located.


does any one know who the author is?
Hello.
I am the author of jNextReportsB4J.

Some time ago, I uploaded the source code in the library page (https://www.b4x.com/android/forum/t...view-reports-generated-by-next-reports.57908/), so please feel free to use it.

However, if I understand correctly what you need to achieve, it seems to me that you want to create groups based on the value of a column (so, you create group A, group B, group C, etc) and insert a blank row between each group.
If this is correct, it has nothing to do with the library itself. You need to create the groups and insert the blank space during the design phase of your report with NextReports designer (i.e. the work that you do in order to create your NextReports report file, prior to reaching what is mentioned as "Step 1" in the HOW TO USE section in the above link).
You can find where the NextReports report file is located by checking your B4J code where you use the report: the location and name of the report should be specified and then added to the inputlist argument, prior to calling
B4X:
Dim therep As jNxtReportsB4J
therep.reportPrepAndRun(inputlist)

So, you should get the NextReports report file and edit it with NextReports designer to add the grouping functionality that you want.
 
Last edited:
Upvote 0
Hello.
I am the author of jNextReportsB4J.

Some time ago, I uploaded the source code in the library page (https://www.b4x.com/android/forum/t...view-reports-generated-by-next-reports.57908/), so please feel free to use it.

However, if I understand correctly what you need to achieve, it seems to me that you want to create groups based on the value of a column (so, you create group A, group B, group C, etc) and insert a blank row between each group.
If this is correct, it has nothing to do with the library itself. You need to create the groups and insert the blank space during the design phase of your report with NextReports designer (i.e. the work that you do in order to create your NextReports report file, prior to reaching what is mentioned as "Step 1" in the HOW TO USE section in the above link).
You can find where the NextReports report file is located by checking your B4J code where you use the report: the location and name of the report should be specified and then added to the inputlist argument, prior to calling
B4X:
Dim therep As jNxtReportsB4J
therep.reportPrepAndRun(inputlist)

So, you should get the NextReports report file and edit it with NextReports designer to add the grouping functionality that you want.
Thank you very much this is very helpful.

So, you should get the NextReports report file and edit it with NextReports designer to add the grouping functionality that you want.

Do you know where in the XML code it is that I can add the grouping functionality? Or is it in the query editor in the Nextreports designer(I can't see anywhere in the designer where it could be added?) Thank you very much
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Hello.
I found an old .report file from NextReports. You can find there (lines 29-35) how to add groupings. In my file, I group on the TYPOS field.
 

Attachments

  • SAMPLE.zip
    2.4 KB · Views: 45
Upvote 0
Thank you very much this is leading me in the right direction, Is there a tag that I can put in the groups tag that will insert a blank row at each change in a column? Or will it do it automatically when I put just the column in?
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Thank you very much this is leading me in the right direction, Is there a tag that I can put in the groups tag that will insert a blank row at each change in a column? Or will it do it automatically when I put just the column in?
I am not really sure. Here is a guess:
Experiment with the contents of the GroupFooterBands section, in lines 731-1262 to adjust the content of what appears after each grouping of records. In my case the footer was used to show sums of quantities of the records in the group. Perhaps this is the reason it is so many lines. Of course, this content was automatically created by the NextReports designer - i made no manual changes in the .report file.
(Note that there is also a GroupHeaderBands section, in lines 314-359 which specifies what to show befoer each grouping of records)
 
Upvote 0
Top