Posted 24 March 2026, 7:52 am EST - Updated 24 March 2026, 7:57 am EST
Hi,
Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.
Using C1ReportViewer from C1.Web.Wijmo.Controls.48.dll
Changes C1WebReport to C1ReportViewer control.
We try this approach: C1ReportViewer control (viewer mode) in a C1Dialog, in aspx with UpdatePanels, GridView (RowCommand), …
I have GridView in UpdatePanel, any row has RowCommand:
![]()
<asp:UpdatePanel ID="UpdatePanelGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="DivSubTitleShifts">
<h2 class='subtitle' id="SubTitle" runat="server"></h2>
</div>
<cc1:C1GridView ID="C1GridView1" Width="100%" Visible="true"
DataKeyNames="...."
runat="server"
ScrollSettings-ScrollMode="None"
AllowPaging="True" PageSize="26"
AllowSorting="True" ShowFilter="True"
AutogenerateColumns="False"
OnPageIndexChanging="C1GridView1_PageIndexChanging"
OnSorting="C1GridView1_Sorting"
OnSorted="C1GridView1_Sorted"
OnFiltering="C1GridView1_Filtering"
OnRowCreated="C1GridView1_RowCreated"
OnRowCommand="C1GridView1_RowCommand"
OnRowDataBound="C1GridView1_RowDataBound">
<Columns>
</Columns>
</cc1:C1GridView>
</ContentTemplate>
</asp:UpdatePanel>
RowCommand:
protected void C1GridView1_RowCommand(object sender, C1GridViewCommandEventArgs e)
{
if (e.CommandName == "ShowReport")
{
int index = int.Parse((string)e.CommandArgument);
C1GridView1.SelectedIndex = index;
// ...
// ===============================
// 3. Refrescar Grid como antes
// ===============================
DataTable dt;
// ...
dt = ...
C1GridView1.DataSource = HelperUtil.GetGridFilterByFieldType(C1GridView1.Columns, dt, .., null);
reStartGridFieldsAndBind();
//this.C1GridView1.DataSource = dt;
//this.C1GridView1.DataBind();
UpdatePanelGrid.Update();
}
else if (e.CommandName == "GoToLiquidation")
{
C1ReportViewer:
<cc1:C1ReportViewer ID="ReportViewer" runat="server"
ReportsFolderPath="~/_Reports/Temp"
Width="850px" Height="650px"
Zoom="100%"
ReportName="report"
EnableLogs="false" CollapseToolsPanel="True" />
BuildReport
public static C1ReportV48.C1Report BuildReport(int Id, ....)
{
IReportsService rptService = new ReportConmexService();
var report = C1ReportViewer.CreateC1Report();
var path = $"{HttpContext.Current.Request.PhysicalApplicationPath}/ReportsPath/CollectionReports.xml";
report.Load(Path.GetFullPath(path), "report");
report.ReportName = "report";
// === Logo ===
report.Fields["logo"].Picture = ...
report.Fields["logo"].PictureScale = C1ReportV48.PictureScaleEnum.Scale;
// ...
report.Fields["lblParamFechaHoraLF"].Text = header.Rows[0]["DATE_TIME"].ToString();
report.Fields["lblParamPlace"].Text = header.Rows[0]["PLACE"].ToString();
// === Page layout ===
var settings = report.C1Document.PageLayout.PageSettings;
settings.TopMargin = new c1v48::C1.C1Preview.Unit(Convert.ToDouble(GenericService.Instance.GetConfigurationParameter(ConfigurationParamType.ReportsTopMargin)), c1v48::C1.C1Preview.UnitTypeEnum.Mm);
settings.BottomMargin = new c1v48::C1.C1Preview.Unit(Convert.ToDouble(GenericService.Instance.GetConfigurationParameter(ConfigurationParamType.ReportsBottomMargin)), c1v48::C1.C1Preview.UnitTypeEnum.Mm);
settings.LeftMargin = new c1v48::C1.C1Preview.Unit(Convert.ToDouble(GenericService.Instance.GetConfigurationParameter(ConfigurationParamType.ReportsLeftMargin)), c1v48::C1.C1Preview.UnitTypeEnum.Mm);
settings.RightMargin = new c1v48::C1.C1Preview.Unit(Convert.ToDouble(GenericService.Instance.GetConfigurationParameter(ConfigurationParamType.ReportsRightMargin)), c1v48::C1.C1Preview.UnitTypeEnum.Mm);
settings.PaperKind = System.Drawing.Printing.PaperKind.A4;
// === MAIN DATASOURCE ===
report.DataSource.Recordset = dvShift;
return report;
Can I use C1ReportViewer in a C1Dialog ?
In RowCommand, can be show a C1Dialog, that contains a C1ReportViewer visible ?
The user view the report, and can select export to pdf or excel
Any suggestions ?
