Can I customize the report without opening report designer?
-
- Posts: 3
- Joined: Thu Jul 19, 2012 4:30 am
Can I customize the report without opening report designer?
Report designer is very powerful and may be too much for end user. Can we customize the report without report designer?
Here's an example about our requirement. After loading the report, we need do following things:
1. Pick a cell
2. Set line style, font for selected cell
3. Add a row or column into header band.
4. Add or remove fields from data band at run time
Thank you in advance!
Here's an example about our requirement. After loading the report, we need do following things:
1. Pick a cell
2. Set line style, font for selected cell
3. Add a row or column into header band.
4. Add or remove fields from data band at run time
Thank you in advance!
Re: Can I customize the report without opening report design
Hello.
Here is a sample project how to create report there you could find some useful code.
Also you could look at the code page in the Designer to find out how change reports.
If you have some additional questions, please do not hesitate to contact us.
Thank you.
You could change your report at runtime in your code.jinzhouwan wrote:Report designer is very powerful and may be too much for end user. Can we customize the report without report designer?
Here's an example about our requirement. After loading the report, we need do following things:
1. Pick a cell
2. Set line style, font for selected cell
3. Add a row or column into header band.
4. Add or remove fields from data band at run time
Here is a sample project how to create report there you could find some useful code.
Also you could look at the code page in the Designer to find out how change reports.
If you have some additional questions, please do not hesitate to contact us.
Thank you.
- Attachments
-
- DynamicCreateReportWithGroups.zip
- Sample project
- (17.21 KiB) Downloaded 183 times
-
- Posts: 3
- Joined: Thu Jul 19, 2012 4:30 am
Re: Can I customize the report without opening report design
Thank you for your quick response! And I have another question.
How can I capture the event about clicking a cell? Can I catpture the event in webviewer?
I added following lines before report.Complie
and I added a event named Cell_Click
But I still cannot capture the event about clicking a cell.
How can I capture the event about clicking a cell? Can I catpture the event in webviewer?
I added following lines before report.Complie
Code: Select all
StiComponentsCollection components = report.GetComponents();
foreach (StiComponent component in components)
{
component.Click += new System.EventHandler(Cell_Click);
}
report.Compile();
report.Show();
Code: Select all
private void Cell_Click(object sender, EventArgs e)
{
StiComponent component = sender as StiComponent;
if (component != null)
MessageBox.Show(component.Name);
}
Re: Can I customize the report without opening report design
Hello.
There is no events in StiWebViewer.
Thank you.
There is no events in StiWebViewer.
Thank you.
-
- Posts: 3
- Joined: Thu Jul 19, 2012 4:30 am
Re: Can I customize the report without opening report design
I tried these codes in the sample you attached,but doesnt work. WHat,s wrong?
It's said that StiWebViewerFx support event, I think I can support event in simlar way as winform application, right?
Thank you!
It's said that StiWebViewerFx support event, I think I can support event in simlar way as winform application, right?
Thank you!
Re: Can I customize the report without opening report design
Hello.
Th events is supported in .Net and Wpf products only.
Thank you.
Please send us your project. What errors or exceptions do you have?jinzhouwan wrote:I tried these codes in the sample you attached,but doesnt work. WHat,s wrong?
The events isn't supported by StiWebViewer and StiWebViewerFx. It's impossible to do in browsers.jinzhouwan wrote:It's said that StiWebViewerFx support event, I think I can support event in simlar way as winform application, right?
Th events is supported in .Net and Wpf products only.
Thank you.