Pass a "value" and serialize it with report

Stimulsoft Reports.NET discussion
Post Reply
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

I need to pass a value to a report, to make it see in the report itself (eg. the username that generated the report).

Then if i save the report (SavePackedDocument) i need that when it is loaded (LoadPackedDocument) the value is the same at the momen of the SavePackedDocument.

Eg. if username is "smith" i need that this information is serialized toghether with report when i save it.

I have tried with variables but i have noticed that they are not serialized in SavePackedDocument so when i do LoadPackedDocument i must pass them anytime.

In other words i need a variable statically saved in serialized report.

Any suggestion?

Thanks.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Pass a "value" and serialize it with report

Post by Brendan »

The Report object has a property called ReportAuthor. maybe this could be used to store the username of who generated the report?
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

Username was only an example.

I need to pass an undefined number of variables, of any type.

Thanks.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Pass a "value" and serialize it with report

Post by Brendan »

I think the only way serialize data to a rendered report is to use the Tag properties of the report components. I may be wrong but when you save a report as mdc/mdz only final output of components on a page is serialized with the hard data. however if you have data attached to a Tag property of any of the components that will get serialized also.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

Tag doesn't solve my case. I needed something just like variables so that the end user can easily design the fields in the report.

Just like variables, with the difference that they must be serialized when report is saved with SavePackedDocument and not passed anytime.

Thanks.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

Actually i've not found a solution yet.

May someone help or give a tip? This feature is very important to me.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

I would like to state that the modification has been made in StimulReport as i requested, available since October 2007.

Thank you very much Stimulsoft, this feature was very important to me.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

Fabio wrote:I would like to state that the modification in StimulReport has been made as i requested, available since October 2007.

Thank you very much Stimulsoft, this feature was very important to me.
EDV Gradl
Posts: 228
Joined: Sat Jun 17, 2006 9:50 am
Location: Germany

Pass a "value" and serialize it with report

Post by EDV Gradl »

Thanks nice to hear.

Could you explain how to use it?

Thanks a lot.

Marco
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

Pass a "value" and serialize it with report

Post by Fabio Pagano »

In few words, the problem was that when i used reportvariables their values weren't saved in serialized report (using "SavePackedDocument" o "SaveDocument"), so the serialized report didn't show their values. This caused the serialized report not to be exactly the same as the original report.

Now the report variables values are persisted in the serialized report.

I needed this behavior because in my accounting application all reports are managed by a spooler (just like the one that exists in IBM AS/400 system, a part of my application mimics that one), so i need to serialize each report to let it manage by the spooler.

For more informations see what reported in the first post of this thread.
Post Reply