Grouping issue

Stimulsoft Reports.NET discussion
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Grouping issue

Post by Jennypi »

Hi all,

I have a list like this:
1- A
2- R
3- C
4- A
5- C

I would like to group data by letter, but I would like to keep the initial sorting order of the list.
The result would be:
1- A
4- A
2- R
3- C
5- C

Can I do that? I tried to group on letter, but then I get:
1- A
4- A
3- C
5- C
2- R
which is not what I want. R should be after A, as it's #2.

Thanks!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Grouping issue

Post by Alex K. »

Hello,

As a way, you can try to use the additional code.
We need some additional time for prepare the sample.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Grouping issue

Post by Jennypi »

No problem, I'll wait :)
(I don't know how to add/write code!)

Thanks in advance.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Grouping issue

Post by Alex K. »

Hello,

Please check the sample report in attachment.

Thank you.
Attachments
1946.tmp01.xlsx
(9.3 KiB) Downloaded 187 times
1945.SampleReport.mrt
(7.83 KiB) Downloaded 494 times
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Grouping issue

Post by Jennypi »

Thanks for this example.

In my report, I have:
- defined the same 3 databands
- set the BeforePrint event of the first 2 ones after adapting it to my Datasource,
- set the PrintIfDetailEmpty property to True for the 2nd one,
- set the condition to the third one,
- copied/pasted the code to create tbl and ind

To me, my report is exactly like your example, still, it's not working! Blank page...
Can you please help me finding what's wrong?

You can download report + data on this link.

Many thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Grouping issue

Post by Alex K. »

Hello,

Please try to set the EngineVersion property to EngineV2.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Grouping issue

Post by Jennypi »

Hi
Thanks, it's indeed working better now.
But I am still getting an error message, "Object reference does not refers to reference of an object", something like this.
It seems that it's coming from the condition:

Code: Select all

labels.line_name != tbl[indx].ToString()
Variable indx is initialized by 0, it seems that it's a problem for the reference in the array.
Can you please help me?

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Grouping issue

Post by Alex K. »

Hello,

Please clarify does this error occur always or with a specific data? If with data please sent them for analysis.

Thank you.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

Grouping issue

Post by Jennypi »

Hi,

This error occurs with all data from my datasource, which is a database.
Unfortunately, when I export to csv to send it to you, error doesn't occur, it works perfectly. So you wouldn't be able to reproduce error if I send you data.
Basically, I first display a form where user can choose on which data he wants to work with, and then I run the report on this data.
I am attaching the report to this post so you can see its structure. Maybe something is wrong with the code? Maybe the fact that I'm using a form changes something?

(Or is there a way to share my desktop with you?)

Thanks,
Jennifer.
Attachments
1960.Labels.mrt
(36.14 KiB) Downloaded 174 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Grouping issue

Post by Alex K. »

Hello,

Please check the modified report in attachment and let us know about the result.

Thank you.
Post Reply