[resolved]Xml Data

Stimulsoft Reports.WEB discussion
Post Reply
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

[resolved]Xml Data

Post by Leandro »

I have a data source that uses an XML Data.
But there are some fields that are not mandatory in xml, so when loading the report if the field was not informed in xml the error "Expression in Text property of 'Complemtno' can not be evaluated!"

Is it possible to reach if the field exists in xml, if there leave the field blank screen?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

[resolved]Xml Data

Post by Jan »

Hello,

You can use following code to indicate the existings of columns:

Code: Select all

{MyDataSource.DataTable.Columns.Exist("MyField") ? MyDataSource.MyField.ToString() : "")
Thank you.
Leandro
Posts: 74
Joined: Tue Aug 08, 2006 9:07 am
Location: Brasil

[resolved]Xml Data

Post by Leandro »

Using the option Exist error occurred below.
'System.Data.DataColumnCollection' does not contain a definition for 'Exist'

I changed the code to:

Code: Select all

{MyDataSource.DataTable.Columns.Contains("MyField") ? MyDataSource.MyField.ToString() : ""}
Thanks
hadisaadat_du
Posts: 35
Joined: Tue Nov 09, 2010 2:43 pm
Location: iran

[resolved]Xml Data

Post by hadisaadat_du »

Hi every body.
I sea allmost all topic in forum and seem int all of them posit that we know what is our tables and columns in dataset of our reportbut allways not thus
1-sometime we may want to edit the report in webdesigner that we dont know any thing about its data set but we sure it works with our data base , so befor call the design() function we pass what data set to our report via regdata(//what_dataset) ??
2- or we may want to set full access to data base to one user to create the every report that need to design well we pass a full data base to designer dictionary and he/she design every report by every columns in every tables or viwes in database and save it , in viwe report mode namely after load our report and we want to pass it to stiwebviewer we pass what data set to it since we cant pass all data base to our report ??!
Post Reply