The viewer and designer can be combined into one edit-and-preview flow, switching between them with a reactive flag (Vue).

Toggle the two components with a ref.
<script setup lang="ts">
import { ref } from 'vue';
import { Viewer, Stimulsoft } from 'stimulsoft-reports-js-vuejs/viewer'
import { Designer } from 'stimulsoft-reports-js-vuejs/designer'

const isViewer = ref(true);
function onDesignReport(args) { isViewer.value = false; }
async function onExitDesigner() { await report.renderAsync2(); isViewer.value = true; }
</script>

<template>
    <Viewer v-if="isViewer" :options="viewerOptions" :report="report" @design-report="onDesignReport" />
    <Designer v-else :options="designerOptions" :report="report" @exit="onExitDesigner" />
</template>

How it works. A reactive ref chooses which component renders, so users move from preview to editing and back within one screen.

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.