MetaData in Report

Stimulsoft Reports.NET discussion
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

Is there a way to add custom metadata to a report design template when it is saved to file? This data would be used by my program when using the report?

Thanks,
John Hamilton
Hamilton & Company, LLC
Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

MetaData in Report

Post by Ivan »

Hello,

You can add custom metadata to the report template at Code tab, as a comments lines in the beginning of the code.

Thank you.
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

I was thinking more along the lines of wanting to do this programatically. I have a custom save routine in place. Kind of like "hidden" variables that are for internal use only. I would just add these "variables" during the saving process and then use them in my program while processing the report.
Thanks,
John Hamilton
Hamilton & Company, LLC
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

Is it possible to maybe add a simple collection to StiReport called MetaData. It's only purpose would be adding "descriptive data" to the report.

Functionally it would simply be a collection of name/value pairs that gets dumped and saved with the report whenever it is saved. This would let me add things like "Author", "Category", "Description", "Notes" to the report when it is saved and display these things in my program when a list of reports is shown.

Seems rather useful to me.
Thanks,
John Hamilton
Hamilton & Company, LLC
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

MetaData in Report

Post by Jan »

Hello Johnham,

Ok. Accepted. Please check build from 10 August. MetaTags property of StiReport.

Thank you.

johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

This is GREAT but can I ask one additional thing from you guys?

MetaTags are kind of a name/value pair type concept. As such I want to retrieve a MetaTag by name.

Currently the StiReport.MetaTags Collection has an integer indexer on it. This allows me to retrieve data by position like Report.MetaTags[0]... Report.MetaTags[1]... etc.

I would like to be able to do something like the following.

Code: Select all

StiReport Report = new StiReport();
string Name3Value;
Report.MetaTags.Add(new StiMetaTag("Name1", "Value1"));
Report.MetaTags.Add(new StiMetaTag("Name2", "Test"));
Report.MetaTags.Add(new StiMetaTag("Name3", "Blah"));
Report.MetaTags.Add(new StiMetaTag("Name4", "Stuff"));

Name3Value = Report.MetaTags["Name3"];
This would really help when reloading the report.
Thanks,
John Hamilton
Hamilton & Company, LLC
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

MetaData in Report

Post by Jan »

Hello John,

Please check build from 17 August.

Thank you.
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

Jan,

YOU ARE A SAVIOR!! To put my mind at ease... Are you a woman or a man? In the US Jan is traditionally a girls name but in other places in the world it could be considered either.

Anyway, thanks again for your constant help and attention.

Thanks,
John Hamilton
Hamilton & Company, LLC
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

MetaData in Report

Post by Jan »

Hello John,

I am a man not woman. In our region this name is usually given to man and boys. Woman's name sounds like Jana. Jan is the same as John.

Thank you.
johnham
Posts: 98
Joined: Fri Sep 19, 2008 2:27 pm
Location: Richland, WA, USA

MetaData in Report

Post by johnham »

THAT'S WHAT I THOUGHT!!!

Well congrats MAN! I hope I didn't offend. :biggrin:
Thanks,
John Hamilton
Hamilton & Company, LLC
Post Reply