No SubReport printing if its DataTable has no rows.

Stimulsoft Reports.NET discussion
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

No SubReport printing if its DataTable has no rows.

Post by LukasT »

Hello,
I have request for specific function... I need posibility to disable content of subReport if its dataTable (or DataBand) has no rows. But this must be function of SubReport. Is this function available or I have to do some workaround?
Thank you ;-)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

No SubReport printing if its DataTable has no rows.

Post by Alex K. »

Hello,

As a way, you can use Conditions.
Please check the report in attachment.

Thank you.
Attachments
1215.SampleReport.mrt
(22.12 KiB) Downloaded 490 times
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

No SubReport printing if its DataTable has no rows.

Post by LukasT »

Thank you Aleksey,
but this is not solution for our case. The problem is, that we have subreport in DataBand and this is why I need to control subreport visibility inside. But by using Conditions I can control only objects on Page, not whole Page...
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

No SubReport printing if its DataTable has no rows.

Post by HighAley »

Hello, Lukas.

Please send us a screenshot which demonstrates the issue.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

No SubReport printing if its DataTable has no rows.

Post by LukasT »

Hello,
example report is attached...
... even if I disable all components in subreport (in case of empty subreport's databand), subreport is still holding its free place. Problem is, that subreports are in databand of main report and on each row we need different group of subreports...
Attachments
1228.report_with_subreports.jpg
1228.report_with_subreports.jpg (328.59 KiB) Viewed 6146 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

No SubReport printing if its DataTable has no rows.

Post by Alex K. »

Hello,

Please send us your report with sample data for analysis.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

No SubReport printing if its DataTable has no rows.

Post by LukasT »

Ok Aleksey, I will try to prepare some clear example on monday ;-)
Have a nice weekend!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

No SubReport printing if its DataTable has no rows.

Post by Andrew »

Great!

Waiting for your reply.

Thank you.
LukasT
Posts: 306
Joined: Mon May 03, 2010 2:50 am
Location: Czech Republic

No SubReport printing if its DataTable has no rows.

Post by LukasT »

Hello,
example is almost ready... but I have one problem. I had to export report data to XML and XSD, but if I load this as XML Data, Relations are cofigured but not functional... Everything in Relations is the same as in report produced by our system with data loaded by... .RegData("reportdata", new DataSet(..... )); .... looks like XML Data is not supporting relations...
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

No SubReport printing if its DataTable has no rows.

Post by Alex K. »

Hello,

Please describe in more details where and how do you try export data.

Thank you.
Post Reply