Showing posts with label programatically. Show all posts
Showing posts with label programatically. Show all posts

Friday, March 30, 2012

Remove Fields Programatically

Is it possible to remove fields programatically from a report file at run time?

I have too many years worth or data being returned and it exceeds the width of an A4 page - So I want to allow the users to select the years that they wish to view via a checkedlistbox - but each time I remove the Columns from the dataTable that populates the report files I get an error as noted below

I'm using VS 2005 and CR shipped with it...

<error>
The field name is not known.
Error in Filed C:\documents and settings\<insert file path here>\rpt_siz_xty {EBEF8981-654C-42C7-9DDA-3AC4184771C8}.RPT:
Error in formula <sizYr01>.
If IsNull({sp_rpt_siz_xty;1.sizYr01}) Then space(12) Else Cstr({sp_rpt_siz_xty;1.sizYr01})
The field name is not known.
</error>

I've dome a fair amount of searching and can't seem to find any remove methods for the field definitions...

Anyone?I think the field u r deleting is used in a formula in report. U need to delete that formula also.|||Why do you want to do it at runtime?