Wednesday, March 21, 2012

Formatting in a report viewer

Hi,

I have a dataset and am able to display the result in a table in a report viewer (VS 2005) but my problem is, instead of displaying the records in a row, I want to display the result columnwise.

Can I do this?

Another Question:

I have a textbox in which in I am displaying some text but the text is long and want the text to be both right and left aligned(Justify). How can I do this?

Please help me.

HI

1) For display in the columnwise u can change in the database itself using procedure.

2) For display in the right side u just apply Styles

|||

You may be able to change your SQL to return your results as you want to display them in a table. But without knowing your data, it's hard to say whether that would work. Depending on your data, you may want to use a Matrix instead of a table.

You can use Center to justify your text right and left, but the textbox still needs to be large enough to display the largest amount of text your passing to it. If you have the CanGrow property set to True, the textbox will grow (height-wise) and wrap the text to new row(s) as needed.

|||

You may left, right, or center justify text in RS 2005. Full justification is not supported in the text box.

|||

you can use a matrix report and tie the same to a dataset or variables from your stored procedure. this is sort of pivot table like in excel.

|||

Hi,

Thank you all for your time but still have some problem.

I can't change the procedure since the same procedure is being used by 3 different report.

My report should look like this:(I have 5 players(Fixed) in each race but the number of laps may differ for different race. Result to be displayed for one race at a time)

Player_Name_1 Lap1_Time Lap2_Time Lap3_Time ......

I don't have any idea about matrix report. Please tell me the steps to follow or give me some available resource to refer.

I was looking for full justification. thanks for the information that it is not supported in text box.

|||

Hi,

From your description, it seems that you are unable to modify the stored procedure since it has been on live, right?

If so, I suggest that you can retrieve the return from the procedure and save it in a data container such as a dataset. And then re-modify the table structure and save it into another datatable, so in this way, you can regard the datatable as the new datasource to be bind to your report. Another way is that you can create a new procedure which return the new structure of the data table if you want.

For your second question, you can create a new Business Intelligence Projects and choose a Report Server Project Wizard template, and in this way you can select a Matrix table instead of a tabular one.

Thanks.

No comments:

Post a Comment