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?
[resolved]Xml Data
[resolved]Xml Data
Hello,
You can use following code to indicate the existings of columns:
Thank you.
You can use following code to indicate the existings of columns:
Code: Select all
{MyDataSource.DataTable.Columns.Exist("MyField") ? MyDataSource.MyField.ToString() : "")
[resolved]Xml Data
Using the option Exist error occurred below.
'System.Data.DataColumnCollection' does not contain a definition for 'Exist'
I changed the code to:
Thanks
'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() : ""}
-
- Posts: 35
- Joined: Tue Nov 09, 2010 2:43 pm
- Location: iran
[resolved]Xml Data
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 ??!
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 ??!