Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
116 views
in Technique[技术] by (71.8m points)

.net - How do I add a column to an rdlc's dataset and have it appear for use in the report?

I have an rdlc that has a separately-defined dataset. The time has come that I have the need to add a column to one of the tables, which I can do without issue. However, when I open the rdlc to use the new column, it does not appear in the Report Data pane.

This issue was reported to Microsoft here, but it was closed as by design. The workaround offered with the issue does not seem to work for VS2010 (refresh the dataset or the table; neither does anything).

Has anyone seen this problem, and if so, how did you get around it?

question from:https://stackoverflow.com/questions/4444620/how-do-i-add-a-column-to-an-rdlcs-dataset-and-have-it-appear-for-use-in-the-rep

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Well, I resolved my problem, but I don't like how I had to do it.

For reference, (as far as I can tell) the only way to add a column to a dataset that is already attached to an rdlc is to hand-edit the xml (i.e. open the rdlc with your favorite text editor and add a Field to the appropriate table). After doing this, the field appears in the Report Data pane, and I can use it as if it were there from the beginning.

I would still like to know how to perform this seemingly simple task from the UI, but nonetheless my current problem is solved.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...