Code: Select all
TypeError: Cannot read properties of undefined (reading '@language')
Code: Select all
"use client";
import { useEffect } from "react";
import { Stimulsoft } from "stimulsoft-reports-js/Scripts/stimulsoft.designer";
const TemplateGenerator = () => {
useEffect(() => {
Stimulsoft.Base.StiLicense.key =
process.env.NEXT_PUBLIC_STIMULSOFT_LICENSE_KEY || "";
Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile(
"/stimulsoft-localization/tr.xml",
true,
);
var options = new Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = true;
options.appearance.showLocalization = true;
options.appearance.theme =
Stimulsoft.Designer.StiDesignerTheme.Office2022WhiteBlue;
options.height = "calc(100% - 1px)";
var designer = new Stimulsoft.Designer.StiDesigner(
options,
"StiDesigner",
false,
);
designer.renderHtml("designer");
}, []);
return <div id="designer" className="h-full w-full"></div>;
};
export default TemplateGenerator;