on 10-03-2008 3:27 PM
I am using Visual Studio 2008, C#, win forms with CR 2008. The report is displayed on the Business Object viewer on the form. When customer clicks on a cell, the cell data needs to be shown on a text box on the form. is there any way to accomplish this? If not, at least highlight and copy the cell data and then customer can paste it to the text box.
When customer clicks on a cell, the cell data needs to be shown on a text box on the form.
- where would the data come from?
- as this is a database report writer, the data should be in the field if you connect to the database and the report is designed to retrieve that field.
If not, at least highlight and copy the cell data and then customer can paste it to the text box.
- there is no way to do this in the DHTML viewer. The viewer is essentially a picture representation
Either I don't understand the questions, or I think you are looking for a functionality that is not available(?).
Ludek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"The viewer is a picture presentation". That gives the answer.
Otherwise, there is no way to copy a cell data manually and paste it on text box on the form.
See, the user is viewing a 1000 line customer sales report on the viewer. This is a windows application. The user wants to get more details of a specific customer. He has the customer number on the report. Yes, he can type in the customer number on the customer inquiry screen and press enter. But, he is lazy to enter the number.
If I understand correctly, there is no way to copy (high light, CTL-C)
the data, right(?)
I am new to crystal and do you think this a limitation of the viewer? Any windows application, the basic built in is CTL-C?
Please advice
You can handle the ClickPage event on the CrystalReportViewer control. The PageMouseEventArgs argument for the event contains information about the report object that was clicked in the viewer control. Note that any object in the report can be clicked on, not just database fields. You'll have to add logic to exclude the objects you don't want.
private void crystalReportViewer1_ClickPage(object sender, CrystalDecisions.Windows.Forms.PageMouseEventArgs e)
{
// Collect the report object name and type.
string msg = "Report Object: " + e.ObjectInfo.Name.ToString()
+ " (" + e.ObjectInfo.ObjectType.ToString() + ")";
// Some report objects won't have text properties; verify that the property isn't null
// before attempting to access it.
if (e.ObjectInfo.Text != null)
{
msg += "... Text: " + e.ObjectInfo.Text.ToString();
}
// Display the collected information in a message box.
MessageBox.Show(msg);
}
Hi,
Would you like to use the drill down feature to get the same functionality rather than copy the customers number?
For this you need to Enable the Drill down feature of the Sections of the report. For Eg:
Right click on the Section (Page Header) -> Section Expert -> Enable the Hide Drill Down option.
Hope that helps.
Regards,
AG.
Thanks, TristaL
Drill Down - Please explain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.